pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

option for net/openvpn to review



Hello

I added a pam option to net.openvpn. The result smells a bit like a hack, I'd
like to have a review of it before committing.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/openvpn/Makefile,v
retrieving revision 1.30
diff -U 2 -r1.30 Makefile
--- Makefile    21 Sep 2009 12:33:31 -0000      1.30
+++ Makefile    27 Oct 2009 15:58:30 -0000
@@ -4,5 +4,5 @@
 DISTNAME=      openvpn-2.1_rc13
 PKGNAME=       ${DISTNAME:S/_//}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    net
 MASTER_SITES=  http://openvpn.net/release/ \
@@ -81,4 +81,9 @@
                ${INSTALL_DATA} $$file ${DESTDIR}${EGDIR:Q}/keys;       \
        done
+       test "x${OPENVPN_INSTALL_PAM}" = "xyes" &&                      \
+               ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib/openvpn &&   \
+               cd ${WRKSRC:Q}/plugin/auth-pam &&                       \
+               ${INSTALL_LIB} openvpn-auth-pam.so                      \
+                              ${DESTDIR}${PREFIX}/lib/openvpn || true
 
 .include "options.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/openvpn/PLIST,v
retrieving revision 1.8
diff -U 2 -r1.8 PLIST
--- PLIST       14 Jun 2009 18:09:38 -0000      1.8
+++ PLIST       27 Oct 2009 15:58:30 -0000
@@ -56,2 +56,4 @@
 share/openvpn/easy-rsa/vars
 share/openvpn/easy-rsa/whichopensslcnf
+${PLIST.pam}lib/openvpn/openvpn-auth-pam.so
+${PLIST.pam}@dirrm lib/openvpn
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/net/openvpn/options.mk,v
retrieving revision 1.1
diff -U 2 -r1.1 options.mk
--- options.mk  21 Sep 2009 12:33:31 -0000      1.1
+++ options.mk  27 Oct 2009 15:58:30 -0000
@@ -2,5 +2,5 @@
 
 PKG_OPTIONS_VAR=        PKG_OPTIONS.openvpn
-PKG_SUPPORTED_OPTIONS=  pkcs11
+PKG_SUPPORTED_OPTIONS=  pkcs11 pam
 PKG_SUGGESTED_OPTIONS=
 
@@ -15,2 +15,16 @@
 CONFIGURE_ARGS+= --disable-pkcs11
 .endif
+
+PLIST_VARS+=   pam
+.if !empty(PKG_OPTIONS:Mpam)
+USE_TOOLS+=    gmake
+BUILD_DIRS+=   plugin/auth-pam
+BUILD_TARGET=  
+INSTALL_DIRS=  ${WRKSRC}
+INSTALL_TARGET=        install
+OPENVPN_INSTALL_PAM=   yes
+PLIST.pam=     yes
+.include "../../mk/pam.buildlink3.mk"
+.else
+OPENVPN_INSTALL_PAM=
+.endif


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index