aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2008-07-24 20:00:10 +0800
committergarga <garga@FreeBSD.org>2008-07-24 20:00:10 +0800
commit77b81cc376b2d333f6c26d20bb0812cffc52d84f (patch)
treee61d0c6e1ec1a093cb727e11e65d7a96a42c1060 /security
parentaad42dda048b183f1ef6c0bec0c3ab4b535cfdbd (diff)
downloadfreebsd-ports-gnome-77b81cc376b2d333f6c26d20bb0812cffc52d84f.tar.gz
freebsd-ports-gnome-77b81cc376b2d333f6c26d20bb0812cffc52d84f.tar.zst
freebsd-ports-gnome-77b81cc376b2d333f6c26d20bb0812cffc52d84f.zip
No functional changes, just try to make Makefile a bit better:
- Remove conditional to set PORTDOCS - s/pre-patch/post-patch/ - Change Makefile's reinplace to use ?= instead of comment CC and CFLAGS lines and remove MAKE_ENV declaration - Remove redundances of program names, just set it one time and use the vars to repeat names Approved by: maintainer by email
Diffstat (limited to 'security')
-rw-r--r--security/chkrootkit/Makefile50
1 files changed, 24 insertions, 26 deletions
diff --git a/security/chkrootkit/Makefile b/security/chkrootkit/Makefile
index 7a678453b754..e3db36d504eb 100644
--- a/security/chkrootkit/Makefile
+++ b/security/chkrootkit/Makefile
@@ -20,40 +20,38 @@ MASTER_SITES= ftp://ftp.pangeia.com.br/pub/seg/pac/ \
MAINTAINER= cordeiro@nic.br
COMMENT= A tool to locally check for signs of a rootkit
-MAKE_ENV+= CC="${CC}"
-ALL_TARGET= chkrootkit chklastlog chkwtmp chkutmp chkproc chkdirs ifpromisc check_wtmpx strings
+SCRIPT_FILES= chkrootkit
+PROG_FILES= chklastlog \
+ chkwtmp \
+ chkutmp \
+ chkproc \
+ chkdirs \
+ ifpromisc \
+ check_wtmpx \
+ strings
+ALL_TARGET= ${SCRIPT_FILES} ${PROG_FILES}
+PORTDOCS= ACKNOWLEDGMENTS \
+ COPYRIGHT \
+ README \
+ README.chklastlog \
+ README.chkwtmp
PLIST_FILES= ${ALL_TARGET:C,^,sbin/,}
-.if !defined(NOPORTDOCS)
-PORTDOCS= ACKNOWLEDGMENTS COPYRIGHT README README.chklastlog README.chkwtmp
-.endif
-
BINMODE= 0700
-pre-patch:
- ${REINPLACE_CMD} -e "s/^CC/#CC/; s/^CFLAGS/#CFLAGS/" ${WRKSRC}/Makefile
- ${REINPLACE_CMD} -e \
- 's#\./chklastlog#${PREFIX}/sbin/chklastlog#g; \
- s#\./chkwtmp#${PREFIX}/sbin/chkwtmp#g; \
- s#\./chkutmp#${PREFIX}/sbin/chkutmp#g; \
- s#\./chkproc#${PREFIX}/sbin/chkproc#g; \
- s#\./chkdirs#${PREFIX}/sbin/chkdirs#g; \
- s#\./check_wtmpx#${PREFIX}/sbin/check_wtmpx#g; \
- s#\./strings#${PREFIX}/sbin/strings#g; \
- s#\./ifpromisc#${PREFIX}/sbin/ifpromisc#g;' \
+post-patch:
+ @${REINPLACE_CMD} -E "s/^(CC|CFLAGS)[^a-zA-Z]*=/\1 ?=/" \
+ ${WRKSRC}/Makefile
+
+.for prog in ${PROG_FILES}
+ @${REINPLACE_CMD} -E 's,\./(${prog}),${PREFIX}/sbin/\1,g' \
${WRKSRC}/chkrootkit
+.endfor
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/chkrootkit ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/chklastlog ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/chkwtmp ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/chkutmp ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/chkproc ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/chkdirs ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/ifpromisc ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/check_wtmpx ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/strings ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${SCRIPT_FILES:C,^,${WRKSRC}/,} ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${PROG_FILES:C,^,${WRKSRC}/,} ${PREFIX}/sbin
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:C,^,${WRKSRC}/,} ${DOCSDIR}