]> git.pld-linux.org Git - packages/pound.git/blobdiff - pound.spec
- logging patch bugfixes; rel 5
[packages/pound.git] / pound.spec
index ee0bf9dfa52bc7666964f5837b76e62a59a16586..9d95243324158d1f3b3fae3878319248df83f7d6 100644 (file)
@@ -2,23 +2,40 @@ Summary:      Pound - reverse-proxy and load-balancer
 Summary(pl.UTF-8):     Pound - reverse-proxy i load-balancer
 Name:          pound
 Version:       2.4.3
-Release:       2
+Release:       5
 License:       GPL
 Group:         Networking/Daemons
 Source0:       http://www.apsis.ch/pound/Pound-%{version}.tgz
 # Source0-md5: 2de4c2ac1023b420b74a1bc08fb93b8a
+Patch0:                %{name}-overquote.patch
+Patch1:                %{name}-hash-UL.patch
+Patch2:                %{name}-logfile.patch
+Patch3:                %{name}-daemonize.patch
+Patch4:                %{name}-log-notice.patch
 Source1:       %{name}.cfg
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
+Source4:       %{name}.logrotate
 URL:           http://www.apsis.ch/pound/
 BuildRequires: automake
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pcre-devel
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Requires:      rc-scripts
+Provides:      group(pound)
+Provides:      user(pound)
+Conflicts:     logrotate < 3.7-4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _sysconfdir     /etc/pound
+
 %description
 The Pound program is a reverse proxy, load balancer and HTTPS
 front-end for Web server(s). Pound was developped to enable
@@ -37,34 +54,49 @@ swobodnego używania, kopiowania i rozdawania.
 
 %prep
 %setup -q -n Pound-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 cp -f /usr/share/automake/config.sub .
 %configure \
        --with-maxbuf=2048
-
-%{__make} \
-       CC="%{__cc}" \
-       F_CONF=%{_sysconfdir}/%{name}/pound.cfg
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir}/pound,/var/run/%{name},/etc/{sysconfig,rc.d/init.d}}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
+       $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}}
 
 install pound    $RPM_BUILD_ROOT%{_sbindir}
 install poundctl $RPM_BUILD_ROOT%{_sbindir}
 install pound.8  $RPM_BUILD_ROOT%{_mandir}/man8
 install poundctl.8 $RPM_BUILD_ROOT%{_mandir}/man8
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 200 %{name}
+%useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
+
 %post
+for a in access.log pound.log; do
+       if [ ! -f /var/log/%{name}/$a ]; then
+               touch /var/log/%{name}/$a
+               chown pound:pound /var/log/%{name}/$a
+               chmod 644 /var/log/%{name}/$a
+       fi
+done
 /sbin/chkconfig --add %{name}
-%service %{name} restart "%{name} daemon"
+%service %{name} restart "Pound Daemon"
 
 %preun
 if [ "$1" = "0" ]; then
@@ -72,13 +104,23 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %userremove %{name}
+       %groupremove %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README FAQ CHANGELOG z*.py
-%attr(755,root,root) %{_sbindir}/*
-%dir %{_sysconfdir}/pound
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound/*
+%attr(755,root,root) %{_sbindir}/pound
+%attr(755,root,root) %{_sbindir}/poundctl
+%dir %{_sysconfdir}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.cfg
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %{_mandir}/man8/*
-%dir %attr(755,root,root) /var/run/%{name}
+%dir /var/run/%{name}
+%dir %attr(751,root,root) /var/log/%{name}
+%attr(750,root,root) %dir /var/log/archive/%{name}
This page took 0.03508 seconds and 4 git commands to generate.