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 URL: http://www.blitzed.org/bopm/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: libtool
25 BuildRequires: rpm-perlprov >= 4.1-13
26 BuildRequires: rpmbuild(macros) >= 1.268
27 Requires(post,preun): /sbin/chkconfig
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
34 Requires: %{name}-libs = %{version}-%{release}
35 Requires: rc-scripts >= 0.4.0.17
36 Provides: group(%{name})
37 Provides: user(%{name})
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 The Blitzed Open Proxy Monitor is designed to connect to an IRC server
42 and become an IRC operator. It then watches connect notices in order
43 to scan all connecting clients for open (insecure) proxies. Such
44 insecure proxies are commonly used for spamming, floods and other
47 BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco
48 routers with default passwords. BOPM also has support for checking
49 against a DNS-Based Blacklist (similar to MAPS RBL) and can be
50 configured to report new proxies back to the Blitzed Open Proxy
54 Blitzed Open Proxy Monitor jest zaprojektowany tak, ¿e ³±czy siê z
55 serwerem IRC i staje operatorem. Nastêpnie ogl±da informacje o
56 po³±czeniach w celu skanowania wszystkich klientów pod k±tem otwartych
57 (niebezpiecznych) proxy. Takie niebezpieczne proxy zwykle s± u¿ywane
58 do spamowania, floodowania i innych nadu¿yæ.
60 BOPM jest w stanie wykryæ WinGates, proxy HTTP, proxy SOCKS 4/5 oraz
61 routery Cisco z domy¶lnymi has³ami. BOPM obs³uguje tak¿e sprawdzanie
62 czarnych list opartych na DNS (takich jak MAPS RBL) i mo¿e byæ
63 skonfigurowany do zg³aszania nowych proxy z powrotem do projektu
64 Blitzed Open Proxy Monitoring.
67 Summary: libopm open proxy scanning library
71 libopm open proxy scanning library.
74 Summary: Header files for libopm library
75 Group: Development/Libraries
76 Requires: %{name}-libs = %{version}-%{release}
79 This is the package containing the header files for libopm library.
82 Summary: Static ... library
83 Group: Development/Libraries
84 Requires: %{name}-devel = %{version}-%{release}
87 Static libopm library.
89 %package -n perl-%{pnam}
90 Summary: OPM - Perl interface to libopm open proxy scanning library
91 Group: Development/Languages/Perl
92 Requires: %{name}-libs = %{version}-%{release}
93 # should here be Version: 0.01 due to "Provides: OPM.so perl(OPM) = 0.01"?
95 %description -n perl-%{pnam}
96 OPM - Perl interface to libopm open proxy scanning library.
104 # we include contrib in %doc. cleanup it
105 find -name CVS | xargs -r rm -rf
106 rm -f contrib/bopm.spec
115 --localstatedir=/var/log/%{name} \
121 %{__perl} Makefile.PL \
124 OPTIMIZE="%{rpmcflags}"
125 %{?with_tests:%{__make} test}
128 rm -rf $RPM_BUILD_ROOT
129 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/{run,log}/%{name}}
132 DESTDIR=$RPM_BUILD_ROOT
134 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
135 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
136 > $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
137 > $RPM_BUILD_ROOT/var/log/%{name}/scan.log
140 %{__make} pure_install \
141 DESTDIR=$RPM_BUILD_ROOT
142 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{pnam}/.packlist
143 install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-%{pnam}-%{version}
144 mv $RPM_BUILD_ROOT{%{perl_vendorarch},%{_examplesdir}/perl-%{pnam}-%{version}}/bopchecker.pl
147 rm -rf $RPM_BUILD_ROOT
150 %groupadd -g 151 %{name}
151 %useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
154 /sbin/chkconfig --add %{name}
155 %service %{name} restart "BOPM daemon"
158 if [ "$1" = "0" ]; then
159 %service %{name} stop
160 /sbin/chkconfig --del %{name}
164 if [ "$1" = "0" ]; then
169 %post libs -p /sbin/ldconfig
170 %postun libs -p /sbin/ldconfig
173 %defattr(644,root,root,755)
174 %doc ChangeLog INSTALL README bopm.conf.sample
175 %doc contrib/ network-bopm/
176 %attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
177 %attr(754,root,root) /etc/rc.d/init.d/%{name}
178 %attr(755,root,root) %{_sbindir}/%{name}
180 %attr(770,root,bopm) %dir /var/run/%{name}
181 %attr(770,root,bopm) %dir /var/log/%{name}
182 %attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
183 %attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/libopm.so.*.*.*
190 %defattr(644,root,root,755)
192 %{_includedir}/opm_common.h
193 %{_includedir}/opm_error.h
194 %{_includedir}/opm_types.h
198 %defattr(644,root,root,755)
201 %files -n perl-%{pnam}
202 %defattr(644,root,root,755)
203 %{perl_vendorarch}/OPM.pm
204 %dir %{perl_vendorarch}/auto/OPM
205 %{perl_vendorarch}/auto/OPM/OPM.bs
206 %attr(755,root,root) %{perl_vendorarch}/auto/OPM/OPM.so
207 %{_examplesdir}/perl-OPM-%{version}
208 %{_mandir}/man3/OPM.3pm*