summaryrefslogtreecommitdiff
path: root/security/tcp_wrappers/Makefile
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-26 11:02:14 +0000
committerjlam <jlam>2004-03-26 11:02:14 +0000
commit0ddac8ea56df3721e7150b51aecc7a8da85f2e26 (patch)
treedadb05624fc2f9f82ebb088bbd7615311d863814 /security/tcp_wrappers/Makefile
parentb137e99ac28275fa7a3ecaa5a7a11d11819a8061 (diff)
downloadpkgsrc-0ddac8ea56df3721e7150b51aecc7a8da85f2e26.tar.gz
Teach security/tcp_wrappers to build on NetBSD systems. Remove the
ONLY_FOR_PLATFORMS setting and simply allow the build to fail on systems on which it currently doesn't build. Replace the cascading if statement that set the Makefile target with something more compact. Lastly, teach tcp_wrappers to partially honor PKG_SYSCONFDIR -- it will default to the historic locations /etc/host.{allow,deny} for the config files, but if PKG_SYSCONFDIR.tcp_wrappers is set in /etc/mk.conf, then it will use that instead.
Diffstat (limited to 'security/tcp_wrappers/Makefile')
-rw-r--r--security/tcp_wrappers/Makefile45
1 files changed, 31 insertions, 14 deletions
diff --git a/security/tcp_wrappers/Makefile b/security/tcp_wrappers/Makefile
index 504a2a82dbf..f472f088ab4 100644
--- a/security/tcp_wrappers/Makefile
+++ b/security/tcp_wrappers/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2004/02/10 09:06:55 grant Exp $
+# $NetBSD: Makefile,v 1.16 2004/03/26 11:02:14 jlam Exp $
DISTNAME= tcp_wrappers_7.6-ipv6.1
PKGNAME= tcp_wrappers-7.6.1
@@ -10,8 +10,6 @@ MAINTAINER= tron@NetBSD.org
HOMEPAGE= ftp://ftp.porcupine.org/pub/security/index.html
COMMENT= Monitor and filter incoming requests for network services
-ONLY_FOR_PLATFORM= IRIX-*-* Darwin-*-* SunOS-*-* Linux-*-* # in NetBSD base system
-
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_BUILDLINK3= yes
@@ -19,22 +17,41 @@ USE_LIBTOOL= yes
.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} == "Darwin"
-ALL_TARGET= netbsd
-.elif ${OPSYS} == "SunOS"
-ALL_TARGET= sunos5
-.elif ${OPSYS} == "IRIX"
-ALL_TARGET= ${LOWER_OPSYS:C|\..*||}
-.elif ${OPSYS} == "Linux"
-ALL_TARGET= ${LOWER_OPSYS}
-.else
-ALL_TARGET= generic # good luck!
+ALL_TARGET.${OPSYS}?= generic # good luck!
+ALL_TARGET.Darwin= netbsd
+ALL_TARGET.Linux= ${LOWER_OPSYS}
+.if !empty(OPSYS:M*BSD)
+ALL_TARGET.${OPSYS}= netbsd
.endif
+ALL_TARGET.SunOS= sunos5
+ALL_TARGET.IRIX= ${LOWER_OPSYS:C|\..*||}
+ALL_TARGET= ${ALL_TARGET.${OPSYS}}
-.if defined(USE_INET6) && ${USE_INET6} == "YES" && ${OPSYS} != "Linux"
+.if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
+. if !empty(OPSYS:M*BSD)
+MAKE_ENV+= IPV6="-DHAVE_IPV6 -DUSE_GETHOSTBYNAME2"
+MAKE_ENV+= UCHAR="-Duchar_t=\"unsigned char\""
+. elif ${OPSYS} != "Linux"
MAKE_ENV+= IPV6=-DHAVE_IPV6
+. endif
.endif
+# Default to /etc/hosts.{allow,deny} for the configuration files to match
+# the historic location of these files. This may be changed by setting
+# PKG_SYSCONFDIR.tcp_wrappers to a different value in /etc/mk.conf.
+#
+PKG_SYSCONFDIR.tcp_wrappers?= /etc
+MAKE_ENV+= PKGSYSCONFDIR=${PKG_SYSCONFDIR:Q}
+
+INSTALLATION_DIRS= bin include lib libexec man/man3 man/man5 man/man8
+
+post-build:
+ cd ${WRKSRC}; for file in *.[0-9]; do \
+ ${MV} -f $$file $$file.BAK; \
+ ${SED} -e "s|/etc/hosts\.|${PKG_SYSCONFDIR}/hosts.|g" \
+ $$file.BAK > $$file; \
+ done
+
do-install:
cd ${WRKSRC}; ${LIBTOOL} ${INSTALL_DATA} libwrap.la ${PREFIX}/lib
cd ${WRKSRC}; ${LIBTOOL} ${INSTALL_PROGRAM} \