# Conditional build:
%bcond_without tests # do not perform "make test"
%bcond_without supervise # install initscript instead of supervise
-#
Summary: Open proxy monitor and blocker, designed for use with ircds
Summary(pl.UTF-8): Monitorowanie i blokowanie otwartych proxy do używania z ircd
Name: bopm
Version: 3.1.3
-Release: 1
+Release: 4
License: GPL
Group: Applications/Communications
Source0: http://static.blitzed.org/www.blitzed.org/bopm/files/%{name}-%{version}.tar.gz
# Source4-md5: 9a21dbeadbd731b324e7f740aadea697
Source5: http://www.sfr-fresh.com/unix/www/cherokee-0.7.2.tar.gz:t/cherokee-0.7.2/m4/etr_socket_nsl.m4
# Source5-md5: 137b516e92db49874d3ed1dcf45ea4a9
+Source6: %{name}.tmpfiles
Patch0: %{name}-DESTDIR.patch
Patch1: %{name}-shared.patch
Patch2: %{name}-cr-connect.patch
URL: http://wiki.blitzed.org/BOPM
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex
BuildRequires: libtool
BuildRequires: rpmbuild(macros) >= 1.268
%{!?with_supervise:Requires(post,preun): /sbin/chkconfig}
Provides: user(%{name})
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%undefine __cxx
%define _supervise /etc/supervise/%{name}
%description
DESTDIR=$RPM_BUILD_ROOT
%if %{with supervise}
-install -d $RPM_BUILD_ROOT%{_supervise}
+install -d $RPM_BUILD_ROOT%{_supervise} \
+ $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+
tar xf %{SOURCE3} -C $RPM_BUILD_ROOT%{_supervise}
install -d $RPM_BUILD_ROOT%{_supervise}/{,log/}supervise
%else
install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install -d $RPM_BUILD_ROOT/var/run/%{name}
%endif
+install -d $RPM_BUILD_ROOT/var/run/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
> $RPM_BUILD_ROOT/var/log/%{name}/bopm.log
> $RPM_BUILD_ROOT/var/log/%{name}/scan.log
+install %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
+rm $RPM_BUILD_ROOT%{_datadir}/bopm.conf.blitzed
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc ChangeLog INSTALL README bopm.conf.sample
+%doc ChangeLog INSTALL README bopm.conf.sample bopm.conf.blitzed
%doc contrib/ network-bopm/
%attr(640,root,bopm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
%attr(755,root,root) %{_sbindir}/%{name}
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_supervise}/log/supervise/*
%else
%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%attr(770,root,bopm) %dir /var/run/%{name}
%endif
-
+/usr/lib/tmpfiles.d/%{name}.conf
+%attr(770,root,bopm) %dir /var/run/%{name}
%attr(770,root,bopm) %dir /var/log/%{name}
%attr(640,bopm,bopm) %ghost /var/log/%{name}/bopm.log
%attr(640,bopm,bopm) %ghost /var/log/%{name}/scan.log