]>
Commit | Line | Data |
---|---|---|
247723c2 ER |
1 | Summary: Open proxy monitor and blocker, designed for use with ircds |
2 | Name: bopm | |
3 | Version: 3.1.2 | |
4 | Release: 0.10 | |
5 | Epoch: 0 | |
6 | License: GPL | |
7 | Group: Applications/Communications | |
8 | Source0: http://static.blitzed.org/www.blitzed.org/bopm/files/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: ab1b7494c4242eef957b5fca61c92b18 | |
10 | Source1: %{name}.init | |
11 | Source2: %{name}.conf | |
12 | BuildRequires: rpmbuild(macros) >= 1.202 | |
13 | Patch0: %{name}-DESTDIR.patch | |
14 | URL: http://www.blitzed.org/bopm/ | |
15 | BuildRequires: automake | |
16 | BuildRequires: autoconf | |
17 | BuildRequires: libtool | |
18 | BuildRequires: findutils | |
19 | Requires: rc-scripts | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | The Blitzed Open Proxy Monitor is designed to connect to an IRC server | |
24 | and become an IRC operator. It then watches connect notices in order | |
25 | to scan all connecting clients for open (insecure) proxies. Such | |
26 | insecure proxies are commonly used for spamming, floods and other | |
27 | abusive activities. | |
28 | ||
29 | BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco | |
30 | routers with default passwords. BOPM also has support for checking | |
31 | against a DNS-Based Blacklist (similar to MAPS RBL) and can be | |
32 | configured to report new proxies back to the Blitzed Open Proxy | |
33 | Monitoring project. | |
34 | ||
35 | %prep | |
36 | %setup -q | |
37 | %patch0 -p1 | |
38 | ||
39 | find -name CVS | xargs -r rm -rf | |
40 | rm -f contrib/bopm.spec | |
41 | ||
42 | %build | |
43 | %{__libtoolize} | |
44 | %{__aclocal} | |
45 | %{__autoconf} | |
46 | %{__autoheader} | |
47 | %{__automake} | |
48 | %configure \ | |
49 | --localstatedir=/var/log/%{name} \ | |
50 | --bindir=%{_sbindir} | |
51 | ||
52 | %{__make} | |
53 | ||
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/{run,log}/%{name}} | |
58 | %{__make} install \ | |
59 | DESTDIR=$RPM_BUILD_ROOT | |
60 | ||
61 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
62 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf | |
63 | > $RPM_BUILD_ROOT/var/log/%{name}/bopm.log | |
64 | > $RPM_BUILD_ROOT/var/log/%{name}/scan.log | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %pre | |
70 | %groupadd -g 151 %{name} | |
71 | %useradd -u 151 -c "BOPM Daemon" -g %{name} %{name} | |
72 | ||
73 | %post | |
74 | /sbin/chkconfig --add %{name} | |
75 | if [ -f /var/lock/subsys/%{name} ]; then | |
76 | /etc/rc.d/init.d/%{name} restart 1>&2 | |
77 | else | |
78 | echo "Run \"/etc/rc.d/init.d/%{name} start\" to start BOPM daemon." | |
79 | fi | |
80 | ||
81 | %preun | |
82 | if [ "$1" = "0" ]; then | |
83 | if [ -f /var/lock/subsys/%{name} ]; then | |
84 | /etc/rc.d/init.d/%{name} stop 1>&2 | |
85 | fi | |
86 | /sbin/chkconfig --del %{name} | |
87 | fi | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc ChangeLog INSTALL README bopm.conf.sample | |
92 | %doc contrib/ network-bopm/ | |
93 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
94 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
95 | %attr(755,root,root) %{_sbindir}/%{name} | |
96 | ||
97 | %attr(770,root,bopm) %dir /var/run/%{name} | |
98 | %attr(770,root,bopm) %dir /var/log/%{name} | |
99 | %attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log | |
100 | %attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log |