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