File Supybot.spec of Package Supybot

# spec file for package Supybot (Version
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           Supybot
Summary:        IRC Bot
Release:        5
Group:          Productivity/Networking/IRC
License:        BSD3c(or similar) ; GPLv2+ ; Python License ..
PreReq:         %fillup_prereq %insserv_prereq
Recommends:     python-twisted python-sqlite2
BuildRequires:  python-devel
BuildRequires:  fdupes
Source:         %{name}-%{version}.tar.bz2
%define plugins_version 20060723
Source1:        %{name}-plugins-%{plugins_version}.tar.bz2
Source2:        %{name}.sysconfig
Source3:        %{name}.init
Source10:       Supybot-rpmlintrc
Patch1:         Supybot-
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{!?python_sitelib:  %global python_sitelib  %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Supybot is a robust, user and programmer friendly IRC bot written in
Python. It aims to be an adequate replacement for most existing IRC
bots. It includes a very flexible and powerful ACL system for
controlling access to commands, as well as more than 50 builtin plugins
providing around 400 actual commands.

%setup -q -b 1
%patch1 -p0
cp -a ../%{name}-plugins-%{plugins_version}/* plugins/

python build

python install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
install -d %{buildroot}/%{_mandir}/man1
install -m 644 docs/man/*.1 %{buildroot}/%{_mandir}/man1
# fix non executable scripts
chmod +x %{buildroot}/%{python_sitelib}/supybot/plugins/RSS/local/
chmod +x %{buildroot}/%{python_sitelib}/supybot/plugins/Supybot/
chmod +x %{buildroot}/%{python_sitelib}/supybot/plugins/ExternalNotice/
# install init and sysconfig script
install -Dm644 %{SOURCE2} %{buildroot}/var/adm/fillup-templates/sysconfig.supybot
install -Dm755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/supybot
mkdir -p %{buildroot}/%{_sbindir}
ln -s %{_sysconfdir}/init.d/supybot %{buildroot}/%{_sbindir}/rcsupybot
%fdupes %{buildroot}

rm -fr %{buildroot}

%fillup_and_insserv supybot

%stop_on_removal supybot

%restart_on_update supybot

%defattr(-, root, root)
%doc %{_mandir}/man1/*.gz

openSUSE Build Service is sponsored by