summaryrefslogtreecommitdiff
path: root/net/rp-pppoe
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2000-07-18 18:42:48 +0000
committertron <tron@pkgsrc.org>2000-07-18 18:42:48 +0000
commit41565a8e82898b9f3e027c49548add9102e7826c (patch)
treeec0448b934d7fd469662011d5385284e084b8acf /net/rp-pppoe
parent03dabdb86e5d3bd1300d12801c58aed57aa60ed3 (diff)
downloadpkgsrc-41565a8e82898b9f3e027c49548add9102e7826c.tar.gz
If base system includes "pppd" 2.3.10 or newer use that instead of the
"ppp" package.
Diffstat (limited to 'net/rp-pppoe')
-rw-r--r--net/rp-pppoe/Makefile25
1 files changed, 22 insertions, 3 deletions
diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile
index 17e4a4a06ef..eecfbd38439 100644
--- a/net/rp-pppoe/Makefile
+++ b/net/rp-pppoe/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2000/07/17 21:11:45 tron Exp $
+# $NetBSD: Makefile,v 1.4 2000/07/18 18:42:48 tron Exp $
DISTNAME= rp-pppoe-2.0
CATEGORIES= net
@@ -7,14 +7,33 @@ MASTER_SITES= http://www.roaringpenguin.com/pppoe/
MAINTAINER= tron@netbsd.org
HOMEPAGE= http://home.sprynet.com/~minaret/pppoe/
-DEPENDS+= ppp>=2.3.10:../ppp
+.if !defined(CHECK_PPPD_DEPENDS)
+DEPENDS!= ${MAKE} CHECK_PPPD_DEPENDS=1 ${MAKEFLAGS} pppd-depend
+.endif
CONFLICTS+= mouse_pppoe-*
GNU_CONFIGURE= yes
-CONFIGURE_ENV= PPPD=${LOCALBASE}/sbin/pppd
+CONFIGURE_ENV+= PPPD=${PPPD}
post-install:
${INSTALL_DATA} ${WRKSRC}/pppoe.conf ${PREFIX}/share/doc/rp-pppoe
.include "../../mk/bsd.pkg.mk"
+
+BASE_PPPD= /usr/sbin/pppd
+PPPD_VERSION!= ${BASE_PPPD} --version 2>&1 | \
+ ${SED} -e 's/ patch level /\./' -e 's/.* //' | \
+ ${AWK} -F. '{printf("%d\n",$$1*1000000+$$2*1000+$$3)}'
+
+.if ${PPPD_VERSION} < 2003010
+PPPD= ${LOCALBASE}/sbin/pppd
+
+pppd-depend:
+ @${ECHO} "ppp>=2.3.10:../ppp"
+.else
+PPPD= ${BASE_PPPD}
+
+pppd-depend:
+ @${ECHO} ""
+.endif