2 # - bncsetup working partially, needs newer dialog
3 Summary: Simple IRC bouncer
4 Summary(pl): Proste narzêdzie do tunelowania IRC
9 Group: Networking/Utilities
10 Source0: http://www.gotbnc.com/files/%{name}%{version}.tar.gz
11 # Source0-md5: 190486d2346415e30f6381377e82eb3b
12 Source1: %{name}.sysconfig
15 Patch0: %{name}-setup.patch
16 Patch1: %{name}-typo.patch
17 URL: http://www.gotbnc.com/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: openssl-devel
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires: dialog >= 1:0.69
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _sysconfdir /etc/%{name}
30 BNC is a great IRC (Internet Relay Chat) proxying server under the GPL
31 (General Public License). It allows users to connect to chat servers
32 by bouncing off the computer which is running BNC. Basically, it
33 forwards the information from the user to the server and vise versa.
36 BNC jest rewelacyjnym i prostym proxy do IRC (Internet Relay Chat) na
37 licencji GPL (General Public License). BNC pozwala u¿ytkownikom na
38 po³±czenie siê z serwerem IRC wykorzystuj±c do tego komputer na którym
39 BNC zosta³o uruchomione. Mówi±c w skrócie, BNC przekazuje informacje
40 od u¿ytkownika do serwera i vice versa.
43 Summary: Simple IRC bouncer daemon
44 Summary(pl): Prosty demon do tunelowania IRC
45 Group: Networking/Utilities
47 Requires(post,preun): /sbin/chkconfig
48 Requires(postun): /usr/sbin/groupdel
49 Requires(postun): /usr/sbin/userdel
50 Requires(pre): /bin/id
51 Requires(pre): /usr/bin/getgid
52 Requires(pre): /usr/sbin/groupadd
53 Requires(pre): /usr/sbin/useradd
54 Requires: %{name} = %{version}-%{release}
55 Requires: /sbin/start-stop-daemon
58 This package contains the initscript to start bnc as system service.
60 %description init -l pl
61 Ten pakiet zawiera skrypt init do uruchamiania bnc jako us³ugi
65 %setup -q -n %{name}%{version}
70 cp -f /usr/share/automake/config.sub .
76 CFLAGS="%{rpmcflags} -include config.h"
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_bindir},%{_sysconfdir},/var/{log,run/%{name}}}
82 install bnc $RPM_BUILD_ROOT%{_bindir}
83 install bncsetup $RPM_BUILD_ROOT%{_bindir}/bncsetup
84 install mkpasswd $RPM_BUILD_ROOT%{_bindir}/bncmkpasswd
85 install motd $RPM_BUILD_ROOT%{_sysconfdir}/motd
86 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
88 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
89 > $RPM_BUILD_ROOT/var/log/%{name}.log
92 rm -rf $RPM_BUILD_ROOT
95 %groupadd -g 142 %{name}
96 %useradd -u 142 -d /var/run/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name}
99 if ! egrep -q '^(adminpass|password)' /etc/bnc/bnc.conf; then
100 %banner %{name} -e <<EOF
101 You need to setup passwords in %{_sysconfdir}/%{name}.conf!
102 The daemon will not start unless you've set them!
108 /sbin/chkconfig --add %{name}
109 %service %{name} restart "%{name} daemon"
112 if [ "$1" = "0" ]; then
113 %service %{name} stop
114 /sbin/chkconfig --del %{name}
118 if [ "$1" = "0" ]; then
124 %defattr(644,root,root,755)
125 %doc README Changelog motd example.conf bncchk
126 %attr(755,root,root) %{_bindir}/*
129 %defattr(644,root,root,755)
130 %dir %attr(750,root,bnc) %{_sysconfdir}
131 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,bnc) %{_sysconfdir}/*
132 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
133 %attr(754,root,root) /etc/rc.d/init.d/%{name}
134 %dir %attr(770,root,bnc) /var/run/%{name}
135 %attr(620,bnc,bnc) %ghost /var/log/%{name}.log