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: 5012f3eb112f0fda545b1aaf66a06150
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.177
24 Requires: dialog >= 1:0.69
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _sysconfdir /etc/%{name}
33 BNC is a great IRC (Internet Relay Chat) proxying server under the GPL
34 (General Public License). It allows users to connect to chat servers
35 by bouncing off the computer which is running BNC. Basically, it
36 forwards the information from the user to the server and vise versa.
39 BNC jest rewelacyjnym i prostym proxy do IRC (Internet Relay Chat) na
40 licencji GPL (General Public License). BNC pozwala u¿ytkownikom na
41 po³±czenie siê z serwerem IRC wykorzystuj±c do tego komputer na którym
42 BNC zosta³o uruchomione. Mówi±c w skrócie, BNC przekazuje informacje
43 od u¿ytkownika do serwera i vice versa.
46 Summary: Simple IRC bouncer daemon
47 Summary(pl): Prosty demon do tunelowania IRC
48 Group: Networking/Utilities
49 Requires: %{name} = %{epoch}:%{version}-%{release}
50 Requires: /sbin/start-stop-daemon
53 This package contains the initscript to start bnc as system service.
55 %description init -l pl
56 Ten pakiet zawiera skrypt init do uruchamiania bnc jako us³ugi
60 %setup -q -n %{name}%{version}
65 cp -f /usr/share/automake/config.sub .
71 CFLAGS="%{rpmcflags}" \
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_bindir},%{_sysconfdir},/var/{log,run/%{name}}}
78 install bnc $RPM_BUILD_ROOT%{_bindir}
79 install bncsetup $RPM_BUILD_ROOT%{_bindir}/bncsetup
80 install mkpasswd $RPM_BUILD_ROOT%{_bindir}/bncmkpasswd
81 install motd $RPM_BUILD_ROOT%{_sysconfdir}/motd
82 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
83 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
84 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
85 > $RPM_BUILD_ROOT/var/log/%{name}.log
88 rm -rf $RPM_BUILD_ROOT
91 if [ -n "`/usr/bin/getgid %{name}`" ]; then
92 if [ "`/usr/bin/getgid %{name}`" != %{groupid} ]; then
93 echo "Error: group %{name} doesn't have gid=%{groupid}. Correct this before installing %{name}." 1>&2
97 /usr/sbin/groupadd -g %{groupid} %{name}
99 if [ -n "`/bin/id -u %{name} 2>/dev/null`" ]; then
100 if [ "`/bin/id -u %{name}`" != %{userid} ]; then
101 echo "Error: user %{name} doesn't have uid=%{userid}. Correct this before installing %{name}." 1>&2
105 /usr/sbin/useradd -u %{userid} -d /var/run/%{name} -s /bin/false \
106 -c "%{name} User" -g %{name} %{name} 1>&2
110 if ! egrep -q '^(adminpass|password)' /etc/bnc/bnc.conf; then
111 %banner %{name} -e <<EOF
112 You need to setup passwords in /etc/bnc/bnc.conf!
113 The daemon will not start unless you've set them!
120 /sbin/chkconfig --add %{name}
122 if [ -f /var/lock/subsys/%{name} ]; then
123 /etc/rc.d/init.d/%{name} restart 1>&2
125 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
129 if [ "$1" = "0" ]; then
130 if [ -f /var/lock/subsys/%{name} ]; then
131 /etc/rc.d/init.d/%{name} stop 1>&2
133 /sbin/chkconfig --del %{name}
137 if [ "$1" = "0" ]; then
143 %defattr(644,root,root,755)
144 %doc README Changelog motd example.conf bncchk
145 %attr(755,root,root) %{_bindir}/*
148 %defattr(644,root,root,755)
149 %dir %attr(750,root,bnc) %{_sysconfdir}
150 %config(noreplace) %verify(not size mtime md5) %attr(640,root,bnc) %{_sysconfdir}/*
151 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
152 %attr(754,root,root) /etc/rc.d/init.d/%{name}
153 %dir %attr(770,root,bnc) /var/run/%{name}
154 %attr(620,bnc,bnc) %ghost /var/log/%{name}.log