|
|
@@ -33,11 +33,13 @@ Distribution: OpenPKG [REL]
|
|
|
Group: Mail
|
|
|
License: GPL
|
|
|
Version: 4.0.3
|
|
|
-Release: 20011201
|
|
|
+Release: 20011228
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
|
|
|
-Source1: rc.qpopper
|
|
|
+Source1: fakesyslog.tar.gz
|
|
|
+Source2: rc.qpopper
|
|
|
+Patch0: qpopper.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
@@ -51,47 +53,75 @@ AutoReqProv: no
|
|
|
Qualcom Popper is a POP3 Daemon.
|
|
|
|
|
|
%prep
|
|
|
- %setup0 -q -n qpopper%{version}
|
|
|
+ %setup0 -q -c -a 0
|
|
|
+ %setup1 -q -T -D -a 1
|
|
|
+ cd qpopper%{version}
|
|
|
+ %patch0 -p0
|
|
|
|
|
|
%build
|
|
|
- CC="%{l_cc}" \
|
|
|
- CFLAGS="%{l_cflags -O}" \
|
|
|
- ./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_LOCAL5 \
|
|
|
- --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
|
|
|
- --with-openssl=%{l_prefix} \
|
|
|
- --disable-nls
|
|
|
- %{l_rpmtool} subst \
|
|
|
- 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
|
|
|
- -- config.h
|
|
|
- %{l_make} %{l_mflags -O}
|
|
|
+ # 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_rpmtool} subst \
|
|
|
+ '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
|
|
|
- %{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
|
|
|
+ $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" \
|
|
|
%{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
|
|
|
@@ -101,31 +131,21 @@ AutoReqProv: no
|
|
|
|
|
|
%post
|
|
|
# add PAM configuration entry
|
|
|
- check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
|
|
|
- if [ ".$check" = . ]; then
|
|
|
- ( echo "#<OpenPKG pkg=qpopper>"
|
|
|
- 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"
|
|
|
- ;;
|
|
|
+ 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
|
|
|
- echo "#</OpenPKG>"
|
|
|
- ) >>/etc/pam.conf
|
|
|
+ ) |\
|
|
|
+ $RPM_INSTALL_PREFIX/sbin/rpmtool config \
|
|
|
+ -a -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
|
|
|
fi
|
|
|
|
|
|
%preun
|
|
|
# remove PAM configuration entry
|
|
|
- check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
|
|
|
- if [ ".$check" != . ]; then
|
|
|
- cp /etc/pam.conf /etc/pam.conf.tmp && \
|
|
|
- sed -e '/^#<OpenPKG pkg=qpopper>/,/^#<\/OpenPKG>/d' \
|
|
|
- </etc/pam.conf.tmp >/etc/pam.conf && \
|
|
|
- rm -f /etc/pam.conf.tmp
|
|
|
+ if [ -f /etc/pam.conf ]; then
|
|
|
+ $RPM_INSTALL_PREFIX/sbin/rpmtool config \
|
|
|
+ -r -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
|
|
|
fi
|
|
|
|