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