Browse Source

cleanup package; switch to %option(s)

Ralf S. Engelschall 23 years ago
parent
commit
ffa150d10d
1 changed files with 39 additions and 47 deletions
  1. 39 47
      qpopper/qpopper.spec

+ 39 - 47
qpopper/qpopper.spec

@@ -24,9 +24,7 @@
 ##
 
 #   package options
-%ifndef       with_pam
-%define       with_pam  no
-%endif
+%option       with_pam  no
 
 #   package information
 Name:         qpopper
@@ -38,7 +36,7 @@ Distribution: OpenPKG [BASE]
 Group:        Mail
 License:      GPL
 Version:      4.0.4
-Release:      20021214
+Release:      20021230
 
 #   list of sources
 Source0:      ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
@@ -49,8 +47,8 @@ Patch0:       qpopper.patch
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206, MTA, openssl, fsl
-PreReq:       OpenPKG, openpkg >= 20020206, MTA, openssl, fsl
+BuildPreReq:  OpenPKG, openpkg >= 20021230, MTA, openssl, fsl
+PreReq:       OpenPKG, openpkg >= 20021230, MTA, openssl, fsl
 %if "%{with_pam}" == "yes"
 BuildPreReq:  PAM
 PreReq:       PAM
@@ -62,48 +60,44 @@ Provides:     POP
 %description
     Qualcom Popper is a full-featured POP3 daemon.
 
-    Options: 
-    --define 'with_pam %{with_pam}'
+    %options
 
 %prep
-    %setup0 -q -c
-    cd qpopper%{version}
-    %patch0 -p0
+    %setup -q -n qpopper%{version}
+    %patch -p0
 
 %build
     #   build qpopper
-    ( cd qpopper%{version}
-      CC="%{l_cc}" \
-      CFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
-      CPPFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
-      LDFLAGS="`%{l_prefix}/bin/fsl-config --all --ldflags`" \
-      LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
+    CC="%{l_cc}" \
+    CFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
+    CPPFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
+    LDFLAGS="`%{l_prefix}/bin/fsl-config --all --ldflags`" \
+    LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
 %if "%{with_pam}" == "yes"
-      CFLAGS="$CFLAGS -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`" \
+    CFLAGS="$CFLAGS -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`" \
 %endif
-      OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
-      ./configure \
-          --prefix=%{l_prefix} \
-          --sbindir=%{l_prefix}/sbin \
-          --disable-bulldb \
-          --enable-servermode \
-          --enable-standalone \
-          --enable-log-login \
+    OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
+    ./configure \
+        --prefix=%{l_prefix} \
+        --sbindir=%{l_prefix}/sbin \
+        --disable-bulldb \
+        --enable-servermode \
+        --enable-standalone \
+        --enable-log-login \
 %if "%{with_pam}" == "yes"
-          --with-pam=qpopper \
+        --with-pam=qpopper \
 %endif
-          --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}
-    )
+        --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
@@ -117,14 +111,12 @@ Provides:     POP
         $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
 
     #   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
-    )
+    %{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 \