]> git.pld-linux.org Git - packages/bopm.git/blame - bopm.spec
- package bopm.conf.blitzed in doc
[packages/bopm.git] / bopm.spec
CommitLineData
5724b556
ER
1# TODO
2# - ac that i don't know how to fix:
3#+ autoconf
4#configure.in:51: error: possibly undefined macro: AC_FUNC_SNPRINTF
5# If this token and others are legitimate, please use m4_pattern_allow.
6# See the Autoconf documentation.
7#
4f9ad698
ER
8#
9# Conditional build:
10%bcond_without tests # do not perform "make test"
43d026e1 11%bcond_without supervise # install initscript instead of supervise
247723c2 12Summary: Open proxy monitor and blocker, designed for use with ircds
0d7fc05d 13Summary(pl.UTF-8): Monitorowanie i blokowanie otwartych proxy do używania z ircd
247723c2 14Name: bopm
5724b556 15Version: 3.1.3
13bda5e9 16Release: 3
247723c2
ER
17License: GPL
18Group: Applications/Communications
19Source0: http://static.blitzed.org/www.blitzed.org/bopm/files/%{name}-%{version}.tar.gz
5724b556 20# Source0-md5: 643c7090b32dfe09a38b5440b2c480e3
247723c2
ER
21Source1: %{name}.init
22Source2: %{name}.conf
43d026e1
ER
23Source3: %{name}-supervise.tar.bz2
24# Source3-md5: 247c0438a5e2860097d09a374a521151
ebd355f0 25Source4: http://autoconf-archive.cryp.to/ac_func_snprintf.m4
bd259eab 26# Source4-md5: 9a21dbeadbd731b324e7f740aadea697
27Source5: http://www.sfr-fresh.com/unix/www/cherokee-0.7.2.tar.gz:t/cherokee-0.7.2/m4/etr_socket_nsl.m4
28# Source5-md5: 137b516e92db49874d3ed1dcf45ea4a9
247723c2 29Patch0: %{name}-DESTDIR.patch
dd92f00a 30Patch1: %{name}-shared.patch
230387e5 31Patch2: %{name}-cr-connect.patch
fd285861 32Patch3: http://www.nedworks.org/bopm/%{name}.whitelists.3.1.2.diff
ebd355f0 33Patch4: http://dgl.cx/2006/09/%{name}-conf-cmd.diff
5724b556 34URL: http://wiki.blitzed.org/BOPM
247723c2 35BuildRequires: autoconf
bf066d47 36BuildRequires: automake
bf066d47 37BuildRequires: libtool
5acd3d23 38BuildRequires: rpmbuild(macros) >= 1.268
3d54ec9d 39%{!?with_supervise:Requires(post,preun): /sbin/chkconfig}
5acd3d23
ER
40Requires(postun): /usr/sbin/groupdel
41Requires(postun): /usr/sbin/userdel
286f9739 42Requires(pre): /bin/id
2d088e6b 43Requires(pre): /usr/bin/getgid
286f9739
JB
44Requires(pre): /usr/sbin/groupadd
45Requires(pre): /usr/sbin/useradd
7de691a5 46Requires: %{name}-libs = %{version}-%{release}
43d026e1 47%{?with_supervise:Requires: daemontools >= 0.76-5}
ebd355f0 48%{!?with_supervise:Requires: rc-scripts >= 0.4.0.17}
26254c94 49Provides: group(%{name})
50Provides: user(%{name})
247723c2
ER
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
43d026e1
ER
53%define _supervise /etc/supervise/%{name}
54
247723c2
ER
55%description
56The Blitzed Open Proxy Monitor is designed to connect to an IRC server
57and become an IRC operator. It then watches connect notices in order
58to scan all connecting clients for open (insecure) proxies. Such
59insecure proxies are commonly used for spamming, floods and other
60abusive activities.
61
62BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco
63routers with default passwords. BOPM also has support for checking
64against a DNS-Based Blacklist (similar to MAPS RBL) and can be
65configured to report new proxies back to the Blitzed Open Proxy
66Monitoring project.
67
71f5af04
JR
68%description -l pl.UTF-8
69Blitzed Open Proxy Monitor jest zaprojektowany tak, że łączy się z
70serwerem IRC i staje operatorem. Następnie ogląda informacje o
71połączeniach w celu skanowania wszystkich klientów pod kątem otwartych
72(niebezpiecznych) proxy. Takie niebezpieczne proxy zwykle są używane
73do spamowania, floodowania i innych nadużyć.
74
75BOPM jest w stanie wykryć WinGates, proxy HTTP, proxy SOCKS 4/5 oraz
76routery Cisco z domyślnymi hasłami. BOPM obsługuje także sprawdzanie
77czarnych list opartych na DNS (takich jak MAPS RBL) i może być
78skonfigurowany do zgłaszania nowych proxy z powrotem do projektu
5acd3d23 79Blitzed Open Proxy Monitoring.
286f9739 80
dd92f00a
ER
81%package libs
82Summary: libopm open proxy scanning library
0d7fc05d 83Summary(pl.UTF-8): Biblioteka libopm do szukania otwartych proxy
dd92f00a
ER
84Group: Libraries
85
86%description libs
87libopm open proxy scanning library.
88
71f5af04 89%description libs -l pl.UTF-8
c5d2454c
JB
90Biblioteka libopm do szukania otwartych proxy.
91
7de691a5
ER
92%package devel
93Summary: Header files for libopm library
0d7fc05d 94Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libopm
7de691a5
ER
95Group: Development/Libraries
96Requires: %{name}-libs = %{version}-%{release}
97
98%description devel
99This is the package containing the header files for libopm library.
100
71f5af04
JR
101%description devel -l pl.UTF-8
102Ten pakiet zawiera pliki nagłówkowe biblioteki libopm.
c5d2454c 103
7de691a5 104%package static
c5d2454c 105Summary: Static libopm library
0d7fc05d 106Summary(pl.UTF-8): Statyczna biblioteka libopm
7de691a5
ER
107Group: Development/Libraries
108Requires: %{name}-devel = %{version}-%{release}
109
110%description static
111Static libopm library.
112
71f5af04 113%description static -l pl.UTF-8
c5d2454c
JB
114Statyczna biblioteka libopm.
115
247723c2
ER
116%prep
117%setup -q
118%patch0 -p1
dd92f00a 119%patch1 -p1
230387e5 120%patch2 -p0
24377f10 121%patch3 -p0
cea03816 122cd src
5724b556 123%patch4 -p0
247723c2 124
dd92f00a 125# we include contrib in %doc. cleanup it
247723c2
ER
126find -name CVS | xargs -r rm -rf
127rm -f contrib/bopm.spec
128
129%build
bd259eab 130install %{SOURCE4} .
131install %{SOURCE5} .
247723c2 132%{__libtoolize}
bd259eab 133%{__aclocal} -I .
247723c2
ER
134%{__autoconf}
135%{__autoheader}
136%{__automake}
137%configure \
138 --localstatedir=/var/log/%{name} \
139 --bindir=%{_sbindir}
140
141%{__make}
142
143%install
144rm -rf $RPM_BUILD_ROOT
43d026e1 145install -d $RPM_BUILD_ROOT/var/log/%{name}
286f9739 146
247723c2
ER
147%{__make} install \
148 DESTDIR=$RPM_BUILD_ROOT
149
43d026e1
ER
150%if %{with supervise}
151install -d $RPM_BUILD_ROOT%{_supervise}
152tar xf %{SOURCE3} -C $RPM_BUILD_ROOT%{_supervise}
153
154install -d $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise
155touch $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/lock
156touch $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/status
157mkfifo $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/control
158mkfifo $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/ok
159
160%else
161install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
43d026e1
ER
162%endif
163
13bda5e9 164install -d $RPM_BUILD_ROOT/var/run/%{name}
247723c2
ER
165install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
166> $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
167> $RPM_BUILD_ROOT/var/log/%{name}/scan.log
168
b07628ff
ER
169rm $RPM_BUILD_ROOT%{_datadir}/bopm.conf.blitzed
170
247723c2
ER
171%clean
172rm -rf $RPM_BUILD_ROOT
173
174%pre
175%groupadd -g 151 %{name}
176%useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
177
178%post
43d026e1 179%if %{with supervise}
43d026e1
ER
180if [ -d /service/%{name}/supervise ]; then
181 svc -t /service/%{name} /service/%{name}/log
182fi
3d54ec9d
ER
183if [ "$1" = 1 ]; then
184 ln -snf %{_supervise} /service/%{name}
185fi
186%else
187/sbin/chkconfig --add %{name}
188%service %{name} restart "BOPM daemon"
43d026e1 189%endif
247723c2
ER
190
191%preun
192if [ "$1" = "0" ]; then
43d026e1
ER
193%if %{with supervise}
194 if [ -d /service/%{name}/supervise ]; then
195 cd /service/%{name}
196 rm /service/%{name}
197 svc -dx . log
198 fi
199%else
5acd3d23 200 %service %{name} stop
247723c2 201 /sbin/chkconfig --del %{name}
43d026e1 202%endif
247723c2
ER
203fi
204
31fd28f8
ER
205%postun
206if [ "$1" = "0" ]; then
207 %userremove %{name}
208 %groupremove %{name}
209fi
210
dd92f00a
ER
211%post libs -p /sbin/ldconfig
212%postun libs -p /sbin/ldconfig
213
247723c2
ER
214%files
215%defattr(644,root,root,755)
b07628ff 216%doc ChangeLog INSTALL README bopm.conf.sample bopm.conf.blitzed
247723c2 217%doc contrib/ network-bopm/
fee36979 218%attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
247723c2
ER
219%attr(755,root,root) %{_sbindir}/%{name}
220
43d026e1
ER
221%if %{with supervise}
222%attr(1755,root,root) %dir %{_supervise}
223%attr(755,root,root) %{_supervise}/run
224%attr(700,root,root) %dir %{_supervise}/supervise
225
226%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_supervise}/supervise/*
227%attr(1755,root,root) %dir %{_supervise}/log
228%attr(755,root,root) %{_supervise}/log/run
229%attr(700,root,root) %dir %{_supervise}/log/supervise
230%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_supervise}/log/supervise/*
231%else
232%attr(754,root,root) /etc/rc.d/init.d/%{name}
43d026e1
ER
233%endif
234
5d74c8ed 235%attr(770,root,bopm) %dir /var/run/%{name}
247723c2
ER
236%attr(770,root,bopm) %dir /var/log/%{name}
237%attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
238%attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log
dd92f00a
ER
239
240%files libs
241%defattr(644,root,root,755)
242%attr(755,root,root) %{_libdir}/libopm.so.*.*.*
ebd355f0 243%attr(755,root,root) %ghost %{_libdir}/libopm.so.0
dd92f00a 244
dd92f00a
ER
245%files devel
246%defattr(644,root,root,755)
247%{_includedir}/opm.h
248%{_includedir}/opm_common.h
249%{_includedir}/opm_error.h
250%{_includedir}/opm_types.h
251%{_libdir}/libopm.la
ebd355f0 252%{_libdir}/libopm.so
dd92f00a
ER
253
254%files static
255%defattr(644,root,root,755)
256%{_libdir}/libopm.a
This page took 0.145849 seconds and 4 git commands to generate.