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