|
|
|
##
|
|
|
|
## qpopper.spec -- OpenPKG RPM Specification
|
|
|
|
## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
|
|
|
|
## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
##
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
## copies.
|
|
|
|
##
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
##
|
|
|
|
|
|
|
|
# package information
|
|
|
|
Name: qpopper
|
|
|
|
Summary: POP3 Daemon
|
|
|
|
URL: http://www.eudora.com/qpopper/
|
|
|
|
Vendor: Qualcom
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
Distribution: OpenPKG [REL]
|
|
|
|
Group: Mail
|
|
|
|
License: GPL
|
|
|
|
Version: 4.0.3
|
|
|
|
Release: 20020206
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
|
|
|
|
Source1: fakesyslog.tar.gz
|
|
|
|
Source2: rc.qpopper
|
|
|
|
Patch0: qpopper.patch
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, MTA, openssl
|
|
|
|
PreReq: OpenPKG, openpkg >= 20020206, MTA, openssl
|
|
|
|
AutoReq: no
|
|
|
|
AutoReqProv: no
|
|
|
|
Provides: POP
|
|
|
|
|
|
|
|
%description
|
|
|
|
Qualcom Popper is a POP3 Daemon.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup0 -q -c -a 0
|
|
|
|
%setup1 -q -T -D -a 1
|
|
|
|
cd qpopper%{version}
|
|
|
|
%patch0 -p0
|
|
|
|
|
|
|
|
%build
|
|
|
|
# build faked syslog(3) library
|
|
|
|
fakesyslogdir="`pwd`/fakesyslog"
|
|
|
|
( cd fakesyslog
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
./configure \
|
|
|
|
--with-logfile=%{l_prefix}/var/qpopper/qpopper.log
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
)
|
|
|
|
|
|
|
|
# build qpopper
|
|
|
|
( cd qpopper%{version}
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
|
|
|
|
LIBS="-L$fakesyslogdir -lfakesyslog" \
|
|
|
|
./configure \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--sbindir=%{l_prefix}/sbin \
|
|
|
|
--disable-bulldb \
|
|
|
|
--enable-servermode \
|
|
|
|
--enable-standalone \
|
|
|
|
--enable-log-login \
|
|
|
|
--with-pam=qpopper \
|
|
|
|
--enable-home-dir-mail=.mail/inbox \
|
|
|
|
--with-log-facility=LOG_MAIL \
|
|
|
|
--enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
|
|
|
|
--with-openssl=%{l_prefix} \
|
|
|
|
--disable-nls
|
|
|
|
%{l_shtool} subst \
|
|
|
|
-e 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
|
|
|
|
config.h
|
|
|
|
%{l_make} %{l_mflags -O}
|
|
|
|
)
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# create installation area
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man8 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/qpopper \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/qpopper
|
|
|
|
|
|
|
|
# install qpopper
|
|
|
|
( cd qpopper%{version}
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
|
|
|
|
%{l_shtool} install -c -s -m 755 \
|
|
|
|
popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
|
|
|
|
)
|
|
|
|
|
|
|
|
# add more stuff
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
/dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
-e 's;@l_musr@;%{l_musr};g' \
|
|
|
|
-e 's;@l_mgrp@;%{l_mgrp};g' \
|
|
|
|
%{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
# add PAM configuration entry
|
|
|
|
if [ -f /etc/pam.conf ]; then
|
|
|
|
( case "%{l_target}" in
|
|
|
|
*-freebsd* ) echo "qpopper auth required pam_unix.so try_first_pass" ;;
|
|
|
|
*-linux* ) echo "qpopper auth required /lib/security/pam_unix.so shadow nodelay" ;;
|
|
|
|
*-solaris* ) echo "qpopper auth required /usr/lib/security/pam_unix.so try_first_pass" ;;
|
|
|
|
esac
|
|
|
|
) |\
|
|
|
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \
|
|
|
|
-a -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
# remove PAM configuration entry
|
|
|
|
if [ -f /etc/pam.conf ]; then
|
|
|
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \
|
|
|
|
-r -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
|
|
|
|
fi
|
|
|
|
|