]> git.pld-linux.org Git - packages/bopm.git/blob - bopm.spec
- add perl tests
[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.18
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 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)
38
39 %description
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
44 abusive activities.
45
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
50 Monitoring project.
51
52 %description -l pl
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æ.
58
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.
64
65 %package libs
66 Summary:        libopm open proxy scanning library
67 Group:          Libraries
68
69 %description libs
70 libopm open proxy scanning library.
71
72 %package devel
73 Summary:        Header files for libopm library
74 Group:          Development/Libraries
75 Requires:       %{name}-libs = %{version}-%{release}
76
77 %description devel
78 This is the package containing the header files for libopm library.
79
80 %package static
81 Summary:        Static ... library
82 Group:          Development/Libraries
83 Requires:       %{name}-devel = %{version}-%{release}
84
85 %description static
86 Static libopm library.
87
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"?
93
94 %description -n perl-%{pnam}
95 OPM - Perl interface to libopm open proxy scanning library.
96
97 %prep
98 %setup -q
99 %patch0 -p1
100 %patch1 -p1
101
102 # we include contrib in %doc. cleanup it
103 find -name CVS | xargs -r rm -rf
104 rm -f contrib/bopm.spec
105
106 %build
107 %{__libtoolize}
108 %{__aclocal}
109 %{__autoconf}
110 %{__autoheader}
111 %{__automake}
112 %configure \
113         --localstatedir=/var/log/%{name} \
114         --bindir=%{_sbindir}
115
116 %{__make}
117
118 cd src/libopm/OPM
119 %{__perl} Makefile.PL \
120         INSTALLDIRS=vendor
121 %{__make} \
122         OPTIMIZE="%{rpmcflags}"
123 %{?with_tests:%{__make} test}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/{run,log}/%{name}}
128
129 %{__make} install \
130         DESTDIR=$RPM_BUILD_ROOT
131
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
136
137 cd src/libopm/OPM
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
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %pre
148 %groupadd -g 151 %{name}
149 %useradd -u 151 -c "BOPM Daemon" -g %{name} %{name}
150
151 %post
152 /sbin/chkconfig --add %{name}
153 %service %{name} restart "BOPM daemon"
154
155 %preun
156 if [ "$1" = "0" ]; then
157         %service %{name} stop
158         /sbin/chkconfig --del %{name}
159 fi
160
161 %postun
162 if [ "$1" = "0" ]; then
163         %userremove %{name}
164         %groupremove %{name}
165 fi
166
167 %post   libs -p /sbin/ldconfig
168 %postun libs -p /sbin/ldconfig
169
170 %files
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}
177
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
182
183 %files libs
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libopm.so.*.*.*
186
187 %files devel
188 %defattr(644,root,root,755)
189 %{_includedir}/opm.h
190 %{_includedir}/opm_common.h
191 %{_includedir}/opm_error.h
192 %{_includedir}/opm_types.h
193 %{_libdir}/libopm.la
194
195 %files static
196 %defattr(644,root,root,755)
197 %{_libdir}/libopm.a
198
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*
This page took 0.293666 seconds and 3 git commands to generate.