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