%global pound_uid 64510 %global pound_gid 64510 %global pound_user pound %global pound_group pound %global pound_home /var/lib/pound Name: Pound Version: 2.6 Release: 4 Summary: Reverse proxy and load balancer Group: System Environment/Daemons License: GPLv3 URL: http://www.apsis.ch/pound BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: openssl-devel >= 1.0.2j-2, pcre-devel >= 8.39-1 Requires: openssl >= 1.0.2j-2, pcre >= 8.39-1 Source0: http://www.apsis.ch/pound/%{name}-%{version}.tgz Source1: http://www.apsis.ch/pound/%{name}-%{version}.asc Source2: pound-%{version}.aix.init Source3: pound.cfg Patch0: %{name}-%{version}-aix.patch %description The Pound program is a reverse proxy, load balancer and HTTPS front-end for Web server(s). Pound was developed to enable distributing the load among several Web-servers and to allow for a convenient SSL wrapper for those Web servers that do not offer it natively. Pound is distributed under the GPL - no warranty, it's free to use, copy and give away. %prep %setup -q %patch0 %build ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/* || : mkdir -p ${RPM_BUILD_ROOT}%{pound_home} mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d cp %{SOURCE2} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pound chmod 0755 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pound mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/ mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/ ln -sf '../init.d/pound' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Spound ln -sf '../init.d/pound' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kpound ln -sf '../init.d/pound' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Spound ln -sf '../init.d/pound' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kpound mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir} cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/pound.cfg chmod 0644 ${RPM_BUILD_ROOT}%{_sysconfdir}/pound.cfg mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/pki/tls/certs touch ${RPM_BUILD_ROOT}%{_sysconfdir}/pki/tls/certs/pound.pem cd ${RPM_BUILD_ROOT} mkdir -p usr/sbin cd usr/sbin ln -sf ../..%{_sbindir}/* . %pre # add the "pound" group only if it does not yet exist result=`/usr/sbin/lsgroup %{pound_group} | /usr/bin/awk '{ print $1 }' 2>/dev/null` if [[ "${result}" != "%{pound_group}" ]] ; then /usr/bin/mkgroup -A id=%{pound_gid} %{pound_group} 2> /dev/null || : fi # add the "pound" user only if it does not yet exist result=`/usr/sbin/lsuser %{pound_user} | /usr/bin/awk '{ print $1 }' 2>/dev/null` if [[ "${result}" != "%{pound_user}" ]] ; then /usr/bin/mkuser id=%{pound_uid} pgrp=%{pound_group} gecos='Pound User' \ login='false' rlogin='false' %{pound_user} 2> /dev/null || : fi %post # generate dummy certificate if [ ! -f %{_sysconfdir}/pki/tls/certs/pound.pem ] ; then cd %{_sysconfdir}/pki/tls/certs umask 077 cat > pound.pem << EOF -- SomeState SomeCity Pound Example Certificate SomeOrganizationalUnit localhost.localdomain root@localhost.localdomain EOF chown root:pound pound.pem chmod 640 pound.pem fi exit 0 %preun if [ "$1" = 0 ] ; then /etc/rc.d/init.d/pound stop >/dev/null 2>&1 fi # remove "pound" user and group /usr/sbin/rmuser -p %{pound_user} || : /usr/sbin/rmgroup %{pound_group} || : %postun if [ "$1" -ge 1 ] ; then /etc/rc.d/init.d/pound condrestart > /dev/null 2>&1 || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGELOG FAQ GPL.txt README %config(noreplace) %{_sysconfdir}/pound.cfg %ghost %config(noreplace) %{_sysconfdir}/pki/tls/certs/pound.pem %attr(-,%{pound_user},%{pound_group}) %dir %{pound_home} %{_sbindir}/* /etc/rc.d/init.d/pound /etc/rc.d/rc2.d/Spound /etc/rc.d/rc2.d/Kpound /etc/rc.d/rc3.d/Spound /etc/rc.d/rc3.d/Kpound %{_mandir}/man8/* /usr/sbin/* %changelog * Mon Nov 21 2016 Michael Perzl - 2.6-4 - recompiled against latest versions * Fri Mar 04 2016 Michael Perzl - 2.6-3 - recompiled against latest versions * Tue Nov 13 2012 Michael Perzl - 2.6-2 - remove "pound" user and group when uninstalling * Thu Dec 29 2011 Michael Perzl - 2.6-1 - updated to version 2.6 * Thu Oct 06 2011 Michael Perzl - 2.5-1 - updated to version 2.5 * Wed Aug 24 2011 Michael Perzl - 2.4.5-1 - first version for AIX V5.1 and higher