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