]> git.pld-linux.org Git - packages/bopm.git/blame - bopm.spec
- tabs in preamble
[packages/bopm.git] / bopm.spec
CommitLineData
4f9ad698
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
43d026e1 4%bcond_without supervise # install initscript instead of supervise
4f9ad698 5#
7de691a5 6%include /usr/lib/rpm/macros.perl
4f9ad698 7%define pnam OPM
247723c2 8Summary: Open proxy monitor and blocker, designed for use with ircds
0d7fc05d 9Summary(pl.UTF-8): Monitorowanie i blokowanie otwartych proxy do używania z ircd
247723c2
ER
10Name: bopm
11Version: 3.1.2
3d54ec9d 12Release: 0.28
247723c2
ER
13License: GPL
14Group: Applications/Communications
15Source0: http://static.blitzed.org/www.blitzed.org/bopm/files/%{name}-%{version}.tar.gz
16# Source0-md5: ab1b7494c4242eef957b5fca61c92b18
17Source1: %{name}.init
18Source2: %{name}.conf
43d026e1
ER
19Source3: %{name}-supervise.tar.bz2
20# Source3-md5: 247c0438a5e2860097d09a374a521151
247723c2 21Patch0: %{name}-DESTDIR.patch
dd92f00a 22Patch1: %{name}-shared.patch
230387e5 23Patch2: %{name}-cr-connect.patch
fd285861
ER
24Patch3: http://www.nedworks.org/bopm/%{name}.whitelists.3.1.2.diff
25Patch4: %{name}-gcc4.patch
cea03816 26Patch5: http://dgl.cx/2006/09/bopm-conf-cmd.diff
247723c2 27URL: http://www.blitzed.org/bopm/
247723c2 28BuildRequires: autoconf
bf066d47 29BuildRequires: automake
bf066d47 30BuildRequires: libtool
7de691a5 31BuildRequires: rpm-perlprov >= 4.1-13
5acd3d23 32BuildRequires: rpmbuild(macros) >= 1.268
3d54ec9d 33%{!?with_supervise:Requires(post,preun): /sbin/chkconfig}
5acd3d23
ER
34Requires(postun): /usr/sbin/groupdel
35Requires(postun): /usr/sbin/userdel
286f9739 36Requires(pre): /bin/id
2d088e6b 37Requires(pre): /usr/bin/getgid
286f9739
JB
38Requires(pre): /usr/sbin/groupadd
39Requires(pre): /usr/sbin/useradd
7de691a5 40Requires: %{name}-libs = %{version}-%{release}
43d026e1
ER
41%{!?with_supervise:Requires: rc-scripts >= 0.4.0.17}
42%{?with_supervise:Requires: daemontools >= 0.76-5}
26254c94 43Provides: group(%{name})
44Provides: user(%{name})
247723c2
ER
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
43d026e1
ER
47%define _supervise /etc/supervise/%{name}
48
247723c2
ER
49%description
50The Blitzed Open Proxy Monitor is designed to connect to an IRC server
51and become an IRC operator. It then watches connect notices in order
52to scan all connecting clients for open (insecure) proxies. Such
53insecure proxies are commonly used for spamming, floods and other
54abusive activities.
55
56BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco
57routers with default passwords. BOPM also has support for checking
58against a DNS-Based Blacklist (similar to MAPS RBL) and can be
59configured to report new proxies back to the Blitzed Open Proxy
60Monitoring project.
61
71f5af04
JR
62%description -l pl.UTF-8
63Blitzed Open Proxy Monitor jest zaprojektowany tak, że łączy się z
64serwerem IRC i staje operatorem. Następnie ogląda informacje o
65połączeniach w celu skanowania wszystkich klientów pod kątem otwartych
66(niebezpiecznych) proxy. Takie niebezpieczne proxy zwykle są używane
67do spamowania, floodowania i innych nadużyć.
68
69BOPM jest w stanie wykryć WinGates, proxy HTTP, proxy SOCKS 4/5 oraz
70routery Cisco z domyślnymi hasłami. BOPM obsługuje także sprawdzanie
71czarnych list opartych na DNS (takich jak MAPS RBL) i może być
72skonfigurowany do zgłaszania nowych proxy z powrotem do projektu
5acd3d23 73Blitzed Open Proxy Monitoring.
286f9739 74
dd92f00a
ER
75%package libs
76Summary: libopm open proxy scanning library
0d7fc05d 77Summary(pl.UTF-8): Biblioteka libopm do szukania otwartych proxy
dd92f00a
ER
78Group: Libraries
79
80%description libs
81libopm open proxy scanning library.
82
71f5af04 83%description libs -l pl.UTF-8
c5d2454c
JB
84Biblioteka libopm do szukania otwartych proxy.
85
7de691a5
ER
86%package devel
87Summary: Header files for libopm library
0d7fc05d 88Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libopm
7de691a5
ER
89Group: Development/Libraries
90Requires: %{name}-libs = %{version}-%{release}
91
92%description devel
93This is the package containing the header files for libopm library.
94
71f5af04
JR
95%description devel -l pl.UTF-8
96Ten pakiet zawiera pliki nagłówkowe biblioteki libopm.
c5d2454c 97
7de691a5 98%package static
c5d2454c 99Summary: Static libopm library
0d7fc05d 100Summary(pl.UTF-8): Statyczna biblioteka libopm
7de691a5
ER
101Group: Development/Libraries
102Requires: %{name}-devel = %{version}-%{release}
103
104%description static
105Static libopm library.
106
71f5af04 107%description static -l pl.UTF-8
c5d2454c
JB
108Statyczna biblioteka libopm.
109
4f9ad698 110%package -n perl-%{pnam}
7de691a5 111Summary: OPM - Perl interface to libopm open proxy scanning library
0d7fc05d 112Summary(pl.UTF-8): OPM - perlowy interfejs do biblioteki libopm szukającej otwartych proxy
7de691a5
ER
113Group: Development/Languages/Perl
114Requires: %{name}-libs = %{version}-%{release}
115# should here be Version: 0.01 due to "Provides: OPM.so perl(OPM) = 0.01"?
116
4f9ad698 117%description -n perl-%{pnam}
7de691a5
ER
118OPM - Perl interface to libopm open proxy scanning library.
119
71f5af04
JR
120%description -n perl-%{pnam} -l pl.UTF-8
121OPM - perlowy interfejs do biblioteki libopm szukającej otwartych
c5d2454c
JB
122proxy.
123
247723c2
ER
124%prep
125%setup -q
126%patch0 -p1
dd92f00a 127%patch1 -p1
230387e5 128%patch2 -p0
24377f10 129%patch3 -p0
fd285861 130%patch4 -p1
cea03816
ER
131cd src
132%patch5 -p0
247723c2 133
dd92f00a 134# we include contrib in %doc. cleanup it
247723c2
ER
135find -name CVS | xargs -r rm -rf
136rm -f contrib/bopm.spec
137
138%build
139%{__libtoolize}
140%{__aclocal}
141%{__autoconf}
142%{__autoheader}
143%{__automake}
144%configure \
145 --localstatedir=/var/log/%{name} \
146 --bindir=%{_sbindir}
147
148%{__make}
149
7de691a5
ER
150cd src/libopm/OPM
151%{__perl} Makefile.PL \
152 INSTALLDIRS=vendor
153%{__make} \
154 OPTIMIZE="%{rpmcflags}"
4f9ad698 155%{?with_tests:%{__make} test}
7de691a5 156
247723c2
ER
157%install
158rm -rf $RPM_BUILD_ROOT
43d026e1 159install -d $RPM_BUILD_ROOT/var/log/%{name}
286f9739 160
247723c2
ER
161%{__make} install \
162 DESTDIR=$RPM_BUILD_ROOT
163
43d026e1
ER
164%if %{with supervise}
165install -d $RPM_BUILD_ROOT%{_supervise}
166tar xf %{SOURCE3} -C $RPM_BUILD_ROOT%{_supervise}
167
168install -d $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise
169touch $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/lock
170touch $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/status
171mkfifo $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/control
172mkfifo $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise/ok
173
174%else
175install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
176install -d $RPM_BUILD_ROOT/var/run/%{name}
177%endif
178
247723c2
ER
179install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
180> $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
181> $RPM_BUILD_ROOT/var/log/%{name}/scan.log
182
43d026e1 183# Perl module
7de691a5
ER
184cd src/libopm/OPM
185%{__make} pure_install \
186 DESTDIR=$RPM_BUILD_ROOT
4f9ad698
ER
187rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{pnam}/.packlist
188install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-%{pnam}-%{version}
189mv $RPM_BUILD_ROOT{%{perl_vendorarch},%{_examplesdir}/perl-%{pnam}-%{version}}/bopchecker.pl
7de691a5 190
247723c2
ER
191%clean
192rm -rf $RPM_BUILD_ROOT
193
194%pre
195%groupadd -g 151 %{name}
196%useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
197
198%post
43d026e1 199%if %{with supervise}
43d026e1
ER
200if [ -d /service/%{name}/supervise ]; then
201 svc -t /service/%{name} /service/%{name}/log
202fi
3d54ec9d
ER
203if [ "$1" = 1 ]; then
204 ln -snf %{_supervise} /service/%{name}
205fi
206%else
207/sbin/chkconfig --add %{name}
208%service %{name} restart "BOPM daemon"
43d026e1 209%endif
247723c2
ER
210
211%preun
212if [ "$1" = "0" ]; then
43d026e1
ER
213%if %{with supervise}
214 if [ -d /service/%{name}/supervise ]; then
215 cd /service/%{name}
216 rm /service/%{name}
217 svc -dx . log
218 fi
219%else
5acd3d23 220 %service %{name} stop
247723c2 221 /sbin/chkconfig --del %{name}
43d026e1 222%endif
247723c2
ER
223fi
224
31fd28f8
ER
225%postun
226if [ "$1" = "0" ]; then
227 %userremove %{name}
228 %groupremove %{name}
229fi
230
dd92f00a
ER
231%post libs -p /sbin/ldconfig
232%postun libs -p /sbin/ldconfig
233
247723c2
ER
234%files
235%defattr(644,root,root,755)
236%doc ChangeLog INSTALL README bopm.conf.sample
237%doc contrib/ network-bopm/
fee36979 238%attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
247723c2
ER
239%attr(755,root,root) %{_sbindir}/%{name}
240
43d026e1
ER
241%if %{with supervise}
242%attr(1755,root,root) %dir %{_supervise}
243%attr(755,root,root) %{_supervise}/run
244%attr(700,root,root) %dir %{_supervise}/supervise
245
246%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_supervise}/supervise/*
247%attr(1755,root,root) %dir %{_supervise}/log
248%attr(755,root,root) %{_supervise}/log/run
249%attr(700,root,root) %dir %{_supervise}/log/supervise
250%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_supervise}/log/supervise/*
251%else
252%attr(754,root,root) /etc/rc.d/init.d/%{name}
247723c2 253%attr(770,root,bopm) %dir /var/run/%{name}
43d026e1
ER
254%endif
255
247723c2
ER
256%attr(770,root,bopm) %dir /var/log/%{name}
257%attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
258%attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log
dd92f00a
ER
259
260%files libs
261%defattr(644,root,root,755)
262%attr(755,root,root) %{_libdir}/libopm.so.*.*.*
263
dd92f00a
ER
264%files devel
265%defattr(644,root,root,755)
266%{_includedir}/opm.h
267%{_includedir}/opm_common.h
268%{_includedir}/opm_error.h
269%{_includedir}/opm_types.h
270%{_libdir}/libopm.la
271
272%files static
273%defattr(644,root,root,755)
274%{_libdir}/libopm.a
7de691a5 275
4f9ad698 276%files -n perl-%{pnam}
7de691a5
ER
277%defattr(644,root,root,755)
278%{perl_vendorarch}/OPM.pm
279%dir %{perl_vendorarch}/auto/OPM
280%{perl_vendorarch}/auto/OPM/OPM.bs
281%attr(755,root,root) %{perl_vendorarch}/auto/OPM/OPM.so
282%{_examplesdir}/perl-OPM-%{version}
283%{_mandir}/man3/OPM.3pm*
This page took 0.129325 seconds and 4 git commands to generate.