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