3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 Summary: Open proxy monitor and blocker, designed for use with ircds
8 Summary(pl): Monitorowanie i blokowanie otwartych proxy do u¿ywania z ircd
13 Group: Applications/Communications
14 Source0: http://static.blitzed.org/www.blitzed.org/bopm/files/%{name}-%{version}.tar.gz
15 # Source0-md5: ab1b7494c4242eef957b5fca61c92b18
18 Patch0: %{name}-DESTDIR.patch
19 Patch1: %{name}-shared.patch
20 Patch2: %{name}-cr-connect.patch
21 Patch3: http://www.nedworks.org/bopm/%{name}.whitelists.3.1.2.diff
22 Patch4: %{name}-gcc4.patch
23 Patch5: http://dgl.cx/2006/09/bopm-conf-cmd.diff
24 URL: http://www.blitzed.org/bopm/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: libtool
28 BuildRequires: rpm-perlprov >= 4.1-13
29 BuildRequires: rpmbuild(macros) >= 1.268
30 Requires(post,preun): /sbin/chkconfig
31 Requires(postun): /usr/sbin/groupdel
32 Requires(postun): /usr/sbin/userdel
33 Requires(pre): /bin/id
34 Requires(pre): /usr/bin/getgid
35 Requires(pre): /usr/sbin/groupadd
36 Requires(pre): /usr/sbin/useradd
37 Requires: %{name}-libs = %{version}-%{release}
38 Requires: rc-scripts >= 0.4.0.17
39 Provides: group(%{name})
40 Provides: user(%{name})
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 The Blitzed Open Proxy Monitor is designed to connect to an IRC server
45 and become an IRC operator. It then watches connect notices in order
46 to scan all connecting clients for open (insecure) proxies. Such
47 insecure proxies are commonly used for spamming, floods and other
50 BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco
51 routers with default passwords. BOPM also has support for checking
52 against a DNS-Based Blacklist (similar to MAPS RBL) and can be
53 configured to report new proxies back to the Blitzed Open Proxy
57 Blitzed Open Proxy Monitor jest zaprojektowany tak, ¿e ³±czy siê z
58 serwerem IRC i staje operatorem. Nastêpnie ogl±da informacje o
59 po³±czeniach w celu skanowania wszystkich klientów pod k±tem otwartych
60 (niebezpiecznych) proxy. Takie niebezpieczne proxy zwykle s± u¿ywane
61 do spamowania, floodowania i innych nadu¿yæ.
63 BOPM jest w stanie wykryæ WinGates, proxy HTTP, proxy SOCKS 4/5 oraz
64 routery Cisco z domy¶lnymi has³ami. BOPM obs³uguje tak¿e sprawdzanie
65 czarnych list opartych na DNS (takich jak MAPS RBL) i mo¿e byæ
66 skonfigurowany do zg³aszania nowych proxy z powrotem do projektu
67 Blitzed Open Proxy Monitoring.
70 Summary: libopm open proxy scanning library
71 Summary(pl): Biblioteka libopm do szukania otwartych proxy
75 libopm open proxy scanning library.
77 %description libs -l pl
78 Biblioteka libopm do szukania otwartych proxy.
81 Summary: Header files for libopm library
82 Summary(pl): Pliki nag³ówkowe biblioteki libopm
83 Group: Development/Libraries
84 Requires: %{name}-libs = %{version}-%{release}
87 This is the package containing the header files for libopm library.
89 %description devel -l pl
90 Ten pakiet zawiera pliki nag³ówkowe biblioteki libopm.
93 Summary: Static libopm library
94 Summary(pl): Statyczna biblioteka libopm
95 Group: Development/Libraries
96 Requires: %{name}-devel = %{version}-%{release}
99 Static libopm library.
101 %description static -l pl
102 Statyczna biblioteka libopm.
104 %package -n perl-%{pnam}
105 Summary: OPM - Perl interface to libopm open proxy scanning library
106 Summary(pl): OPM - perlowy interfejs do biblioteki libopm szukaj±cej otwartych proxy
107 Group: Development/Languages/Perl
108 Requires: %{name}-libs = %{version}-%{release}
109 # should here be Version: 0.01 due to "Provides: OPM.so perl(OPM) = 0.01"?
111 %description -n perl-%{pnam}
112 OPM - Perl interface to libopm open proxy scanning library.
114 %description -n perl-%{pnam} -l pl
115 OPM - perlowy interfejs do biblioteki libopm szukaj±cej otwartych
128 # we include contrib in %doc. cleanup it
129 find -name CVS | xargs -r rm -rf
130 rm -f contrib/bopm.spec
139 --localstatedir=/var/log/%{name} \
145 %{__perl} Makefile.PL \
148 OPTIMIZE="%{rpmcflags}"
149 %{?with_tests:%{__make} test}
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/{run,log}/%{name}}
156 DESTDIR=$RPM_BUILD_ROOT
158 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
159 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
160 > $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
161 > $RPM_BUILD_ROOT/var/log/%{name}/scan.log
164 %{__make} pure_install \
165 DESTDIR=$RPM_BUILD_ROOT
166 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{pnam}/.packlist
167 install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-%{pnam}-%{version}
168 mv $RPM_BUILD_ROOT{%{perl_vendorarch},%{_examplesdir}/perl-%{pnam}-%{version}}/bopchecker.pl
171 rm -rf $RPM_BUILD_ROOT
174 %groupadd -g 151 %{name}
175 %useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
178 /sbin/chkconfig --add %{name}
179 %service %{name} restart "BOPM daemon"
182 if [ "$1" = "0" ]; then
183 %service %{name} stop
184 /sbin/chkconfig --del %{name}
188 if [ "$1" = "0" ]; then
193 %post libs -p /sbin/ldconfig
194 %postun libs -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 %doc ChangeLog INSTALL README bopm.conf.sample
199 %doc contrib/ network-bopm/
200 %attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
201 %attr(754,root,root) /etc/rc.d/init.d/%{name}
202 %attr(755,root,root) %{_sbindir}/%{name}
204 %attr(770,root,bopm) %dir /var/run/%{name}
205 %attr(770,root,bopm) %dir /var/log/%{name}
206 %attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
207 %attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_libdir}/libopm.so.*.*.*
214 %defattr(644,root,root,755)
216 %{_includedir}/opm_common.h
217 %{_includedir}/opm_error.h
218 %{_includedir}/opm_types.h
222 %defattr(644,root,root,755)
225 %files -n perl-%{pnam}
226 %defattr(644,root,root,755)
227 %{perl_vendorarch}/OPM.pm
228 %dir %{perl_vendorarch}/auto/OPM
229 %{perl_vendorarch}/auto/OPM/OPM.bs
230 %attr(755,root,root) %{perl_vendorarch}/auto/OPM/OPM.so
231 %{_examplesdir}/perl-OPM-%{version}
232 %{_mandir}/man3/OPM.3pm*