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 URL: http://www.blitzed.org/bopm/
24 BuildRequires: autoconf
25 BuildRequires: automake
26 BuildRequires: libtool
27 BuildRequires: rpm-perlprov >= 4.1-13
28 BuildRequires: rpmbuild(macros) >= 1.268
29 Requires(post,preun): /sbin/chkconfig
30 Requires(postun): /usr/sbin/groupdel
31 Requires(postun): /usr/sbin/userdel
32 Requires(pre): /bin/id
33 Requires(pre): /usr/bin/getgid
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Requires: %{name}-libs = %{version}-%{release}
37 Requires: rc-scripts >= 0.4.0.17
38 Provides: group(%{name})
39 Provides: user(%{name})
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 The Blitzed Open Proxy Monitor is designed to connect to an IRC server
44 and become an IRC operator. It then watches connect notices in order
45 to scan all connecting clients for open (insecure) proxies. Such
46 insecure proxies are commonly used for spamming, floods and other
49 BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco
50 routers with default passwords. BOPM also has support for checking
51 against a DNS-Based Blacklist (similar to MAPS RBL) and can be
52 configured to report new proxies back to the Blitzed Open Proxy
56 Blitzed Open Proxy Monitor jest zaprojektowany tak, ¿e ³±czy siê z
57 serwerem IRC i staje operatorem. Nastêpnie ogl±da informacje o
58 po³±czeniach w celu skanowania wszystkich klientów pod k±tem otwartych
59 (niebezpiecznych) proxy. Takie niebezpieczne proxy zwykle s± u¿ywane
60 do spamowania, floodowania i innych nadu¿yæ.
62 BOPM jest w stanie wykryæ WinGates, proxy HTTP, proxy SOCKS 4/5 oraz
63 routery Cisco z domy¶lnymi has³ami. BOPM obs³uguje tak¿e sprawdzanie
64 czarnych list opartych na DNS (takich jak MAPS RBL) i mo¿e byæ
65 skonfigurowany do zg³aszania nowych proxy z powrotem do projektu
66 Blitzed Open Proxy Monitoring.
69 Summary: libopm open proxy scanning library
70 Summary(pl): Biblioteka libopm do szukania otwartych proxy
74 libopm open proxy scanning library.
76 %description libs -l pl
77 Biblioteka libopm do szukania otwartych proxy.
80 Summary: Header files for libopm library
81 Summary(pl): Pliki nag³ówkowe biblioteki libopm
82 Group: Development/Libraries
83 Requires: %{name}-libs = %{version}-%{release}
86 This is the package containing the header files for libopm library.
88 %description devel -l pl
89 Ten pakiet zawiera pliki nag³ówkowe biblioteki libopm.
92 Summary: Static libopm library
93 Summary(pl): Statyczna biblioteka libopm
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
98 Static libopm library.
100 %description static -l pl
101 Statyczna biblioteka libopm.
103 %package -n perl-%{pnam}
104 Summary: OPM - Perl interface to libopm open proxy scanning library
105 Summary(pl): OPM - perlowy interfejs do biblioteki libopm szukaj±cej otwartych proxy
106 Group: Development/Languages/Perl
107 Requires: %{name}-libs = %{version}-%{release}
108 # should here be Version: 0.01 due to "Provides: OPM.so perl(OPM) = 0.01"?
110 %description -n perl-%{pnam}
111 OPM - Perl interface to libopm open proxy scanning library.
113 %description -n perl-%{pnam} -l pl
114 OPM - perlowy interfejs do biblioteki libopm szukaj±cej otwartych
125 # we include contrib in %doc. cleanup it
126 find -name CVS | xargs -r rm -rf
127 rm -f contrib/bopm.spec
136 --localstatedir=/var/log/%{name} \
142 %{__perl} Makefile.PL \
145 OPTIMIZE="%{rpmcflags}"
146 %{?with_tests:%{__make} test}
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/{run,log}/%{name}}
153 DESTDIR=$RPM_BUILD_ROOT
155 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
156 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
157 > $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
158 > $RPM_BUILD_ROOT/var/log/%{name}/scan.log
161 %{__make} pure_install \
162 DESTDIR=$RPM_BUILD_ROOT
163 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{pnam}/.packlist
164 install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-%{pnam}-%{version}
165 mv $RPM_BUILD_ROOT{%{perl_vendorarch},%{_examplesdir}/perl-%{pnam}-%{version}}/bopchecker.pl
168 rm -rf $RPM_BUILD_ROOT
171 %groupadd -g 151 %{name}
172 %useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
175 /sbin/chkconfig --add %{name}
176 %service %{name} restart "BOPM daemon"
179 if [ "$1" = "0" ]; then
180 %service %{name} stop
181 /sbin/chkconfig --del %{name}
185 if [ "$1" = "0" ]; then
190 %post libs -p /sbin/ldconfig
191 %postun libs -p /sbin/ldconfig
194 %defattr(644,root,root,755)
195 %doc ChangeLog INSTALL README bopm.conf.sample
196 %doc contrib/ network-bopm/
197 %attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
198 %attr(754,root,root) /etc/rc.d/init.d/%{name}
199 %attr(755,root,root) %{_sbindir}/%{name}
201 %attr(770,root,bopm) %dir /var/run/%{name}
202 %attr(770,root,bopm) %dir /var/log/%{name}
203 %attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
204 %attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_libdir}/libopm.so.*.*.*
211 %defattr(644,root,root,755)
213 %{_includedir}/opm_common.h
214 %{_includedir}/opm_error.h
215 %{_includedir}/opm_types.h
219 %defattr(644,root,root,755)
222 %files -n perl-%{pnam}
223 %defattr(644,root,root,755)
224 %{perl_vendorarch}/OPM.pm
225 %dir %{perl_vendorarch}/auto/OPM
226 %{perl_vendorarch}/auto/OPM/OPM.bs
227 %attr(755,root,root) %{perl_vendorarch}/auto/OPM/OPM.so
228 %{_examplesdir}/perl-OPM-%{version}
229 %{_mandir}/man3/OPM.3pm*