]> git.pld-linux.org Git - SPECS.git/blob - tuxaator.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / tuxaator.spec
1 %define _pre    pre2
2 %define _snap   20070614
3 %define _rel    0.1
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
6 Name:           tuxaator
7 Version:        2.0
8 Release:        0.%{_pre}.%{_snap}.%{_rel}
9 Epoch:          0
10 License:        BSD
11 Group:          Applications/Communications
12 Source0:        %{name}-%{_snap}.tar.bz2
13 # Source0-md5:  fb1ec38d6ef8528c5a0b5874bec89580
14 Source1:        %{name}.init
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)
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _sysconfdir     /etc/%{name}
27 %define         _appdir %{_datadir}/%{name}
28
29 %description
30 A lightweight IRC bot/dictionary, easy to set up, easy to localize.
31
32 %description -l pl.UTF-8
33 Lekki bot/słownik IRC, łatwy do postawienia, łatwy do zlokalizowania.
34
35 %package init
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)
46
47 %description init
48 Initscript for tuxaator IRC bot.
49
50 %description init -l pl.UTF-8
51 Skrypt init dla bota IRC-owego tuxaator.
52
53 %prep
54 %setup -q -n %{name}
55 %patch0 -p1
56 %patch1 -p1
57 find -name CVS -print0 | xargs -0 rm -rf
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{perl_vendorlib},/etc/rc.d/init.d}
62
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}
66 #!/bin/sh
67 cd %{_appdir}
68 exec ./%{name} "$@"
69 EOF
70
71 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
72
73 for a in config/*.dist; do
74         install $a $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $a .dist)
75 done
76 install config/{rss.tux,messages.*} $RPM_BUILD_ROOT%{_sysconfdir}
77 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %pre
83 %groupadd -P %{name}-init -g 153 %{name}
84
85 %postun
86 if [ "$1" = "0" ]; then
87         %groupremove %{name}
88 fi
89
90 %pre init
91 %useradd -P %{name}-init -u 153 -g %{name} -c "Tuxaator" %{name}
92
93 %post init
94 /sbin/chkconfig --add %{name}
95 %service %{name} restart
96
97 %preun init
98 if [ "$1" = "0" ]; then
99         %service -q %{name} stop
100         /sbin/chkconfig --del %{name}
101 fi
102
103 %postun init
104 if [ "$1" = "0" ]; then
105         %userremove %{name}
106 fi
107
108 %files
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}/*
115 %dir %{_appdir}
116 %attr(755,root,root) %{_appdir}/tuxaator
117 %{_appdir}/Plugins
118 %{_appdir}/config
119 %{_appdir}/*.pm
120 %{_appdir}/*.txt
121 %{_appdir}/reasons
122
123 %files init
124 %defattr(644,root,root,755)
125 %attr(754,root,root) /etc/rc.d/init.d/tuxaator
This page took 0.489405 seconds and 3 git commands to generate.