Quellcode durchsuchen

better PAM support

Ralf S. Engelschall vor 24 Jahren
Ursprung
Commit
335ecaaa0d
1 geänderte Dateien mit 16 neuen und 1 gelöschten Zeilen
  1. 16 1
      pureftpd/pureftpd.spec

+ 16 - 1
pureftpd/pureftpd.spec

@@ -23,6 +23,11 @@
 ##  SUCH DAMAGE. 
 ##  
 
+#   package options
+%ifndef       with_pam
+%define       with_pam  no
+%endif
+
 #   package information
 Name:         pureftpd
 Summary:      Alternative FTP Server
@@ -33,7 +38,7 @@ Distribution: OpenPKG [REL]
 Group:        FTP
 License:      GPL
 Version:      1.1.0
-Release:      20020308
+Release:      20020315
 
 #   list of sources
 Source0:      http://prdownloads.sourceforge.net/pureftpd/pure-ftpd-%{version}.tar.gz
@@ -44,6 +49,10 @@ Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20020206, make
 PreReq:       OpenPKG, openpkg >= 20020206
+%if "%{with_pam}" == "yes"
+BuildPreReq:  PAM
+PreReq:       PAM
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -64,6 +73,10 @@ AutoReqProv:  no
 %build
     CC="%{l_cc}" \
     CFLAGS="%{l_cflags -O}" \
+%if "%{with_pam}" == "yes"
+    CPPFLAGS="-I`%{l_prefix}/etc/rc --query pam_incdir`" \
+    LDFLAGS="-L`%{l_prefix}/etc/rc --query pam_libdir`" \
+%endif
     ./configure \
         --prefix=%{l_prefix} \
         --sysconfdir=%{l_prefix}/etc/pureftpd \
@@ -71,7 +84,9 @@ AutoReqProv:  no
         --without-humor \
         --without-cookie \
         --without-welcomemsg \
+%if "%{with_pam}" == "yes"
         --with-pam \
+%endif
         --with-ftpwho \
         --with-virtualhosts \
         --with-language=english