]> git.pld-linux.org Git - packages/bnc.git/blame - bnc.spec
- tabs in preamble
[packages/bnc.git] / bnc.spec
CommitLineData
3c5d104e 1# TODO
884a95d4 2# - bncsetup working partially, needs newer dialog
ebb1434d 3Summary: Simple IRC bouncer
8a0006c6 4Summary(pl.UTF-8): Proste narzędzie do tunelowania IRC
ebb1434d 5Name: bnc
7846a4f9 6Version: 2.9.4
1b6d5725 7Release: 3
ebb1434d 8License: GPL
9Group: Networking/Utilities
3c5d104e 10Source0: http://www.gotbnc.com/files/%{name}%{version}.tar.gz
7846a4f9 11# Source0-md5: 190486d2346415e30f6381377e82eb3b
ef87b41a
ER
12Source1: %{name}.sysconfig
13Source2: %{name}.init
14Source3: %{name}.conf
3c5d104e 15Patch0: %{name}-setup.patch
ef87b41a
ER
16Patch1: %{name}-typo.patch
17URL: http://www.gotbnc.com/
d9d2323a 18BuildRequires: autoconf
36eb5254 19BuildRequires: automake
3c5d104e 20BuildRequires: openssl-devel
d5191b10 21BuildRequires: rpmbuild(macros) >= 1.268
3bf8051e 22Requires: dialog >= 1:0.69
ef87b41a
ER
23Provides: group(bnc)
24Provides: user(bnc)
ebb1434d 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
0f586f11 27%define _sysconfdir /etc/%{name}
ef87b41a 28
ebb1434d 29%description
1ae0db7c
ŁJM
30BNC is a great IRC (Internet Relay Chat) proxying server under the GPL
31(General Public License). It allows users to connect to chat servers
32by bouncing off the computer which is running BNC. Basically, it
33forwards the information from the user to the server and vise versa.
ebb1434d 34
8dc521d9 35%description -l pl.UTF-8
1ae0db7c 36BNC jest rewelacyjnym i prostym proxy do IRC (Internet Relay Chat) na
8dc521d9
JR
37licencji GPL (General Public License). BNC pozwala użytkownikom na
38połączenie się z serwerem IRC wykorzystując do tego komputer na którym
39BNC zostało uruchomione. Mówiąc w skrócie, BNC przekazuje informacje
40od użytkownika do serwera i vice versa.
ebb1434d 41
884a95d4
ER
42%package init
43Summary: Simple IRC bouncer daemon
8a0006c6 44Summary(pl.UTF-8): Prosty demon do tunelowania IRC
884a95d4 45Group: Networking/Utilities
3177b688 46Requires(post): grep
3bf8051e
ER
47Requires(post,preun): /sbin/chkconfig
48Requires(postun): /usr/sbin/groupdel
49Requires(postun): /usr/sbin/userdel
3177b688
ER
50Requires(pre): /bin/id
51Requires(pre): /usr/bin/getgid
52Requires(pre): /usr/sbin/groupadd
53Requires(pre): /usr/sbin/useradd
8c715459 54Requires: %{name} = %{version}-%{release}
3bf8051e 55Requires: /sbin/start-stop-daemon
884a95d4
ER
56
57%description init
58This package contains the initscript to start bnc as system service.
59
8dc521d9
JR
60%description init -l pl.UTF-8
61Ten pakiet zawiera skrypt init do uruchamiania bnc jako usługi
0f586f11
JB
62systemowej.
63
ebb1434d 64%prep
65%setup -q -n %{name}%{version}
3c5d104e 66%patch0 -p1
ef87b41a 67%patch1 -p1
ebb1434d 68
19abfcf5 69%build
f03e3449 70cp -f /usr/share/automake/config.sub .
d9d2323a 71%{__autoconf}
3c5d104e
ER
72%configure \
73 --with-ssl
ebb1434d 74
36eb5254 75%{__make} \
7846a4f9 76 CFLAGS="%{rpmcflags} -include config.h"
ebb1434d 77
78%install
79rm -rf $RPM_BUILD_ROOT
ef87b41a 80install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_bindir},%{_sysconfdir},/var/{log,run/%{name}}}
36eb5254 81
62e4cea9 82install bnc $RPM_BUILD_ROOT%{_bindir}
3c5d104e 83install bncsetup $RPM_BUILD_ROOT%{_bindir}/bncsetup
62e4cea9 84install mkpasswd $RPM_BUILD_ROOT%{_bindir}/bncmkpasswd
ef87b41a
ER
85install motd $RPM_BUILD_ROOT%{_sysconfdir}/motd
86install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
87install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
88install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
89> $RPM_BUILD_ROOT/var/log/%{name}.log
ebb1434d 90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
884a95d4 94%pre init
71beece0
ER
95%groupadd -g 142 %{name}
96%useradd -u 142 -d /var/run/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name}
ef87b41a 97
884a95d4 98%post init
ef87b41a
ER
99if ! egrep -q '^(adminpass|password)' /etc/bnc/bnc.conf; then
100%banner %{name} -e <<EOF
58a9ced5 101You need to setup passwords in %{_sysconfdir}/%{name}.conf!
ef87b41a
ER
102The daemon will not start unless you've set them!
103
104EOF
105# ' vim
106
107fi
884a95d4 108/sbin/chkconfig --add %{name}
d5191b10 109%service %{name} restart "%{name} daemon"
ef87b41a 110
884a95d4 111%preun init
ef87b41a 112if [ "$1" = "0" ]; then
d5191b10 113 %service %{name} stop
ef87b41a
ER
114 /sbin/chkconfig --del %{name}
115fi
116
884a95d4 117%postun init
ef87b41a 118if [ "$1" = "0" ]; then
71beece0
ER
119 %userremove %{name}
120 %groupremove %{name}
ef87b41a
ER
121fi
122
ebb1434d 123%files
124%defattr(644,root,root,755)
ef87b41a 125%doc README Changelog motd example.conf bncchk
884a95d4
ER
126%attr(755,root,root) %{_bindir}/*
127
128%files init
129%defattr(644,root,root,755)
e34735a4 130%dir %attr(750,root,bnc) %{_sysconfdir}
71beece0
ER
131%config(noreplace) %verify(not md5 mtime size) %attr(640,root,bnc) %{_sysconfdir}/*
132%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
884a95d4 133%attr(754,root,root) /etc/rc.d/init.d/%{name}
b6ca2d06 134%dir %attr(770,root,bnc) /var/run/%{name}
ef87b41a 135%attr(620,bnc,bnc) %ghost /var/log/%{name}.log
This page took 0.105895 seconds and 4 git commands to generate.