#----------------------------------------------------------------------------- # # POPular -- A POP3 server and proxy for large mail systems # # $Id: popular.spec,v 1.2 2002/07/01 09:01:01 sqrt Exp $ # # http://www.remote.org/jochen/mail/popular/ # #----------------------------------------------------------------------------- # # Copyright (C) 1999-2002 Jochen Topf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA # #----------------------------------------------------------------------------- # # This is a RedHat spec file for the popular packages # #----------------------------------------------------------------------------- %define popular_version 1.5.5 %define popular_release 1 #----------------------------------------------------------------------------- Summary: POP3 server for large mail systems Name: popular Version: %{popular_version} Release: %{popular_release} Copyright: GPL Group: System Environment/Daemons Source: http://www.remote.org/jochen/mail/popular/popular-%{popular_version}.tar.gz URL: http://www.remote.org/jochen/mail/popular/ Packager: Jochen Topf Vendor: Jochen Topf %package db2 Summary: Berkeley DB2 module for POPular Group: System Environment/Daemons Requires: popular %package db3 Summary: Berkeley DB3 module for POPular Group: System Environment/Daemons Requires: popular #----------------------------------------------------------------------------- %description POPular is a suite of programs for running a large POP3 server cluster. It is meant to be used in large sites, where mailboxes are distributed over several storage servers. %description db2 This is a POPular Database Module (PDM) using the Berkeley DB version 2 library. It needs the popular package to work. %description db3 This is a POPular Database Module (PDM) using the Berkeley DB version 3 library. It needs the popular package to work. #----------------------------------------------------------------------------- %prep %setup #----------------------------------------------------------------------------- %build ./configure --prefix=$RPM_BUILD_ROOT/usr --mandir=$RPM_BUILD_ROOT/usr/share/man make #----------------------------------------------------------------------------- %install test "$RPM_BUILD_ROOT" != "/" && test "$RPM_BUILD_ROOT" != "" && rm -fr $RPM_BUILD_ROOT/* make install # gzip man pages POPULAR_MANDIR=$RPM_BUILD_ROOT/usr/share/man for i in $POPULAR_MANDIR/*/*; do gzip -9 -q $i # will compress the file if it isn't already compressed done # doc dir POPULAR_DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/popular-%{popular_version} mkdir -p $POPULAR_DOCDIR || exit 1 test -f doc/popular-%{popular_version}.ps && gzip -9 doc/popular-%{popular_version}.ps || exit 1 # copy init scripts POPULAR_INITDIR=$RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p $POPULAR_INITDIR || exit 1 for i in pcheckd pproxy pserv; do cp redhat/$i.init $POPULAR_INITDIR/$i || exit 1 done # copy config files POPULAR_ETCDIR=$RPM_BUILD_ROOT/etc/popular mkdir -p $POPULAR_ETCDIR || exit 1 mkdir -p $POPULAR_ETCDIR/capa || exit 1 for i in options pproxy.rc pserv.rc; do cp conf/$i $POPULAR_ETCDIR/ || exit 1 done cp pdm/master/masterauth.conf $POPULAR_ETCDIR/ || exit 1 # other directories mkdir -p $RPM_BUILD_ROOT/usr/lib/popular || exit 1 mkdir -p $RPM_BUILD_ROOT/var/log/popular || exit 1 mkdir -p $RPM_BUILD_ROOT/var/run/popular || exit 1 #----------------------------------------------------------------------------- %clean test "$RPM_BUILD_ROOT" != "/" && rm -fr $RPM_BUILD_ROOT/* #----------------------------------------------------------------------------- %files %defattr(-,root,root) %doc AUTHORS %doc COPYING %doc ChangeLog %doc README %doc THANKS %doc TODO %doc redhat/README.redhat %doc doc/html %doc doc/popular-%{popular_version}.ps.gz %config %dir /etc/popular %config %dir /etc/popular/capa %config /etc/popular/options %config /etc/popular/pproxy.rc %config /etc/popular/pserv.rc %config /etc/popular/masterauth.conf %config /etc/rc.d/init.d/pcheckd %config /etc/rc.d/init.d/pproxy %config /etc/rc.d/init.d/pserv /usr/bin/pcheck /usr/bin/pstatus /usr/bin/pdeliver /usr/bin/pcontrol /usr/bin/ptestpdm /usr/sbin/pcheckd /usr/sbin/pproxy /usr/sbin/pserv /usr/sbin/ringd /usr/share/man/man1/pcheck.1.gz /usr/share/man/man1/pstatus.1.gz /usr/share/man/man1/pdeliver.1.gz /usr/share/man/man1/pcontrol.1.gz /usr/share/man/man1/ptestpdm.1.gz /usr/share/man/man7/popular-log.7.gz /usr/share/man/man8/pcheckd.8.gz /usr/share/man/man8/pproxy.8.gz /usr/share/man/man8/pserv.8.gz %dir /usr/lib/popular /usr/lib/popular/libpdm_any-%{popular_version}.so /usr/lib/popular/libpdm_any.so /usr/lib/popular/libpdm_master-%{popular_version}.so /usr/lib/popular/libpdm_master.so %attr(0755,pop,pop) /var/log/popular %attr(0755,pop,pop) /var/run/popular %files db2 %defattr(-,root,root) /usr/lib/popular/libpdm_db2-%{popular_version}.so /usr/lib/popular/libpdm_db2.so %files db3 %defattr(-,root,root) /usr/lib/popular/libpdm_db3-%{popular_version}.so /usr/lib/popular/libpdm_db3.so #----------------------------------------------------------------------------- %pre set -e POPULAR_USER_ID=110 POPULAR_GROUP_ID=110 # add 'pop' user and group unless they are already there if ! grep -q '^pop:' /etc/passwd; then if ! grep -q '^pop:' /etc/group; then if ! groupadd -g $POPULAR_GROUP_ID -r pop; then echo "popular rpm: Can't install group 'pop' (gid=$POPULAR_GROUP_ID)" exit 1 fi if ! useradd -c "POPular POP3 server" -d /var/run/popular -g pop -r -u $POPULAR_USER_ID pop; then echo "popular rpm: Can't install user 'pop' (uid=$POPULAR_USER_ID)" groupdel pop exit 1 fi fi fi #----------------------------------------------------------------------------- %preun test "$1" = "0" && rm -fr /var/run/popular true #-- THE END ------------------------------------------------------------------