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