]>
Commit | Line | Data |
---|---|---|
c702686f | 1 | # |
2 | # Conditional build | |
3 | %bcond_with smode # build with /smode command support | |
9687b028 | 4 | %bcond_with crypt # build with crypted passwords support |
c702686f | 5 | # |
08f63afd | 6 | Summary: Internet Relay Chat Server |
252940b2 | 7 | Summary(pl.UTF-8): Serwer IRC (Internet Relay Chat) |
08f63afd | 8 | Name: bircd |
8faf4fa9 | 9 | %define _rc rc2 |
ba871649 | 10 | %define _rel 2 |
c7230fb8 | 11 | Version: 2.1.0 |
12 | Release: 0.%{_rc}.%{_rel} | |
f0313430 | 13 | Epoch: 1 |
08f63afd | 14 | License: GPL |
15 | Group: Daemons | |
c7230fb8 | 16 | Source0: ftp://ftp.benet.uu3.net/pub/irc/%{name}-%{version}%{_rc}.tgz |
17 | # Source0-md5: 03ba33362b131fc0441d9f1724207bf7 | |
08f63afd | 18 | Source1: %{name}.init |
19 | Source2: %{name}.sysconfig | |
20 | Source3: %{name}.logrotate | |
474b4a4c | 21 | Source4: %{name}.motd |
08f63afd | 22 | Patch0: %{name}-makefile.patch |
23 | Patch1: %{name}-config.patch | |
e1d6a7e3 | 24 | Patch2: %{name}-smode.patch |
25 | Patch3: %{name}-crypt.patch | |
474b4a4c | 26 | URL: http://www.benet.uu3.net/~borg/ |
848069bf | 27 | BuildRequires: rpmbuild(macros) >= 1.268 |
08f63afd | 28 | Requires(post): fileutils |
29 | Requires(post,preun): /sbin/chkconfig | |
08f63afd | 30 | Requires(postun): /usr/sbin/groupdel |
b9aa7658 | 31 | Requires(postun): /usr/sbin/userdel |
848069bf ER |
32 | Requires(pre): /bin/id |
33 | Requires(pre): /usr/bin/getgid | |
34 | Requires(pre): /usr/sbin/groupadd | |
35 | Requires(pre): /usr/sbin/useradd | |
36 | Requires: rc-scripts | |
b9aa7658 | 37 | Provides: group(ircd) |
38 | Provides: user(ircd) | |
bf6c5f29 | 39 | Obsoletes: ircd |
bf6c5f29 | 40 | Obsoletes: ircd-hybrid |
41 | Obsoletes: ircd-ptlink | |
848069bf | 42 | Obsoletes: ircd6 |
ba871649 | 43 | Conflicts: logrotate < 3.8.0 |
fb35bbdf | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
08f63afd | 45 | |
46 | %define _sysconfdir /etc/ircd | |
47 | %define _localstatedir /var/lib/ircd | |
48 | ||
49 | %description | |
50 | bIRCd is a small, simple and very fast IRC server. It is easy to | |
51 | configure and use. It also has support for IPv6. | |
52 | ||
f221519e JR |
53 | %description -l pl.UTF-8 |
54 | bIRCd jest małym, prostym i bardzo szybkim serwerem IRC. Jest bardzo | |
55 | prosty w konfiguracji i użytkowaniu. Posiada również wsparcie dla | |
08f63afd | 56 | IPv6. |
57 | ||
58 | %prep | |
a66a132f | 59 | %setup -q -n %{name} |
08f63afd | 60 | %patch0 -p1 |
61 | %patch1 -p1 | |
e1d6a7e3 | 62 | %{?with_smode:%patch2 -p1} |
63 | %{?with_crypt:%patch3 -p1} | |
08f63afd | 64 | |
65 | %build | |
66 | ./Config | |
e6cc96b8 | 67 | %{__make} \ |
68 | LIBDIR=%{_libdir} | |
08f63afd | 69 | |
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
ae0c1a58 | 72 | install -d $RPM_BUILD_ROOT{%{_var}/log/{,archive/}ircd,%{_sbindir}} \ |
08f63afd | 73 | $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,logrotate.d}} \ |
74 | $RPM_BUILD_ROOT%{_localstatedir} | |
75 | ||
76 | %{__make} install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT | |
78 | ||
79 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd | |
80 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd | |
81 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ircd | |
474b4a4c | 82 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd |
08f63afd | 83 | |
84 | touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.pid | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %pre | |
af018e58 ER |
90 | %groupadd -f -g 75 ircd |
91 | %useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd | |
08f63afd | 92 | |
93 | %post | |
94 | /sbin/chkconfig --add ircd | |
848069bf | 95 | %service ircd restart "IRC daemon" |
08f63afd | 96 | touch /var/log/ircd/{opers.log,rejects.log,users.log} |
97 | chmod 640 /var/log/ircd/* | |
98 | chown ircd:ircd /var/log/ircd/* | |
99 | ||
100 | %preun | |
08f63afd | 101 | if [ "$1" = "0" ]; then |
848069bf | 102 | %service ircd stop |
08f63afd | 103 | /sbin/chkconfig --del ircd |
104 | fi | |
105 | ||
106 | %postun | |
08f63afd | 107 | if [ "$1" = "0" ]; then |
b9aa7658 | 108 | %userremove ircd |
109 | %groupremove ircd | |
08f63afd | 110 | fi |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc README CHANGES | |
115 | %doc doc/{Advertisement,Authors,Etiquette,Manual,Operators,README.patches} | |
116 | %doc doc/{conf.doc,example.conf,tao.of.irc,whatsnew} | |
117 | %attr(755,root,root) %{_sbindir}/* | |
118 | %attr(770,root,ircd) %dir %{_var}/log/ircd | |
52d6fb4c | 119 | %attr(770,root,ircd) %dir %{_var}/log/archive/ircd |
08f63afd | 120 | %attr(770,root,ircd) %dir %{_localstatedir} |
121 | %attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.pid | |
122 | %attr(750,root,ircd) %dir %{_sysconfdir} | |
31dcef6c | 123 | %attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf |
124 | %attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd | |
08f63afd | 125 | %attr(754,root,root) /etc/rc.d/init.d/ircd |
31dcef6c | 126 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd |
127 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ircd |