4 Summary: A lightweight IRC bot/dictionary, easy to set up, easy to localize
5 Summary(pl.UTF-8): Lekki bot/słownik IRC, łatwy do postawienia, łatwy do zlokalizowania
8 Release: 0.%{_pre}.%{_snap}.%{_rel}
11 Group: Applications/Communications
12 Source0: %{name}-%{_snap}.tar.bz2
13 # Source0-md5: fb1ec38d6ef8528c5a0b5874bec89580
15 Patch0: %{name}-basedir.patch
16 Patch1: %{name}-perl.patch
17 URL: http://tuxaator.sourceforge.net/
18 BuildRequires: rpmbuild(macros) >= 1.228
19 Requires(postun): /usr/sbin/groupdel
20 Requires(pre): /usr/bin/getgid
21 Requires(pre): /usr/sbin/groupadd
22 Provides: group(tuxaator)
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _sysconfdir /etc/%{name}
27 %define _appdir %{_datadir}/%{name}
30 A lightweight IRC bot/dictionary, easy to set up, easy to localize.
32 %description -l pl.UTF-8
33 Lekki bot/słownik IRC, łatwy do postawienia, łatwy do zlokalizowania.
36 Summary: tuxaator initscript
37 Summary(pl.UTF-8): Skrypt init dla tuxaatora
38 Group: Applications/Communications
39 Requires(post,preun): /sbin/chkconfig
40 Requires(postun): /usr/sbin/userdel
41 Requires(pre): /bin/id
42 Requires(pre): /usr/sbin/useradd
43 Requires: %{name} = %{epoch}:%{version}-%{release}
44 Requires: rc-scripts >= 0.4.0.17
45 Provides: user(tuxaator)
48 Initscript for tuxaator IRC bot.
50 %description init -l pl.UTF-8
51 Skrypt init dla bota IRC-owego tuxaator.
57 find -name CVS -print0 | xargs -0 rm -rf
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{perl_vendorlib},/etc/rc.d/init.d}
63 cp -a *.txt reasons $RPM_BUILD_ROOT%{_appdir}
64 cp -a %{name} *.pm Plugins $RPM_BUILD_ROOT%{_appdir}
65 cat <<'EOF' > $RPM_BUILD_ROOT%{_bindir}/%{name}
71 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
73 for a in config/*.dist; do
74 install $a $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $a .dist)
76 install config/{rss.tux,messages.*} $RPM_BUILD_ROOT%{_sysconfdir}
77 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
80 rm -rf $RPM_BUILD_ROOT
83 %groupadd -P %{name}-init -g 153 %{name}
86 if [ "$1" = "0" ]; then
91 %useradd -P %{name}-init -u 153 -g %{name} -c "Tuxaator" %{name}
94 /sbin/chkconfig --add %{name}
95 %service %{name} restart
98 if [ "$1" = "0" ]; then
99 %service -q %{name} stop
100 /sbin/chkconfig --del %{name}
104 if [ "$1" = "0" ]; then
109 %defattr(644,root,root,755)
110 %doc CONTRIBUTORS Changelog HELP INSTALL LICENSE UPGRADING
111 %doc *.sql upgrades/ scripts/
112 %dir %attr(750,root,tuxaator) %{_sysconfdir}
113 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,tuxaator) %{_sysconfdir}/*
114 %attr(755,root,root) %{_bindir}/*
116 %attr(755,root,root) %{_appdir}/tuxaator
124 %defattr(644,root,root,755)
125 %attr(754,root,root) /etc/rc.d/init.d/tuxaator