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