Browse Source

cleanup package; switch to %option(s)

master
parent
commit
ffa150d10d
  1. 86
      qpopper/qpopper.spec

86
qpopper/qpopper.spec

@ -24,9 +24,7 @@
## ##
# package options # package options
%ifndef with_pam %option with_pam no
%define with_pam no
%endif
# package information # package information
Name: qpopper Name: qpopper
@ -38,7 +36,7 @@ Distribution: OpenPKG [BASE]
Group: Mail Group: Mail
License: GPL License: GPL
Version: 4.0.4 Version: 4.0.4
Release: 20021214 Release: 20021230
# list of sources # list of sources
Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
@ -49,8 +47,8 @@ Patch0: qpopper.patch
# build information # build information
Prefix: %{l_prefix} Prefix: %{l_prefix}
BuildRoot: %{l_buildroot} BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206, MTA, openssl, fsl BuildPreReq: OpenPKG, openpkg >= 20021230, MTA, openssl, fsl
PreReq: OpenPKG, openpkg >= 20020206, MTA, openssl, fsl PreReq: OpenPKG, openpkg >= 20021230, MTA, openssl, fsl
%if "%{with_pam}" == "yes" %if "%{with_pam}" == "yes"
BuildPreReq: PAM BuildPreReq: PAM
PreReq: PAM PreReq: PAM
@ -62,48 +60,44 @@ Provides: POP
%description %description
Qualcom Popper is a full-featured POP3 daemon. Qualcom Popper is a full-featured POP3 daemon.
Options: %options
--define 'with_pam %{with_pam}'
%prep %prep
%setup0 -q -c %setup -q -n qpopper%{version}
cd qpopper%{version} %patch -p0
%patch0 -p0
%build %build
# build qpopper # build qpopper
( cd qpopper%{version} CC="%{l_cc}" \
CC="%{l_cc}" \ CFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
CFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \ CPPFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
CPPFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \ LDFLAGS="`%{l_prefix}/bin/fsl-config --all --ldflags`" \
LDFLAGS="`%{l_prefix}/bin/fsl-config --all --ldflags`" \ LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
%if "%{with_pam}" == "yes" %if "%{with_pam}" == "yes"
CFLAGS="$CFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \ CFLAGS="$CFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \
CPPFLAGS="$CPPFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \ CPPFLAGS="$CPPFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \
LDFLAGS="$LDFLAGS -L`%{l_prefix}/etc/rc --query pam_libdir`" \ LDFLAGS="$LDFLAGS -L`%{l_prefix}/etc/rc --query pam_libdir`" \
%endif %endif
OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \ OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
./configure \ ./configure \
--prefix=%{l_prefix} \ --prefix=%{l_prefix} \
--sbindir=%{l_prefix}/sbin \ --sbindir=%{l_prefix}/sbin \
--disable-bulldb \ --disable-bulldb \
--enable-servermode \ --enable-servermode \
--enable-standalone \ --enable-standalone \
--enable-log-login \ --enable-log-login \
%if "%{with_pam}" == "yes" %if "%{with_pam}" == "yes"
--with-pam=qpopper \ --with-pam=qpopper \
%endif %endif
--enable-home-dir-mail=.mail/inbox \ --enable-home-dir-mail=.mail/inbox \
--with-log-facility=LOG_MAIL \ --with-log-facility=LOG_MAIL \
--enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \ --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
--with-openssl=%{l_prefix} \ --with-openssl=%{l_prefix} \
--disable-nls --disable-nls
%{l_shtool} subst \ %{l_shtool} subst \
-e 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \ -e 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
config.h config.h
%{l_make} %{l_mflags -O} %{l_make} %{l_mflags -O}
)
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -117,14 +111,12 @@ Provides: POP
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
# install qpopper # install qpopper
( cd qpopper%{version} %{l_shtool} install -c -m 644 \
%{l_shtool} install -c -m 644 \ samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/ %{l_shtool} install -c -s -m 755 \
%{l_shtool} install -c -s -m 755 \ popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper %{l_shtool} install -c -m 644 \
%{l_shtool} install -c -m 644 \ man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
)
# add more stuff # add more stuff
%{l_shtool} install -c -m 644 \ %{l_shtool} install -c -m 644 \

Loading…
Cancel
Save