svn commit: r329967 - head/security/chntpw
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Thu Oct 10 06:53:57 UTC 2013
Author: sunpoet
Date: Thu Oct 10 06:53:56 2013
New Revision: 329967
URL: http://svnweb.freebsd.org/changeset/ports/329967
Log:
- Add LICENSE
- Convert to new OPTIONS framework
- Allow build on amd64
- Respect CC: fix build with clang
- Support STAGEDIR
- While I'm here, use USES=gmake
PR: ports/182832
Submitted by: Kuan-Chung Chiu <buganini at gmail.com> (maintainer)
Modified:
head/security/chntpw/Makefile (contents, props changed)
Modified: head/security/chntpw/Makefile
==============================================================================
--- head/security/chntpw/Makefile Thu Oct 10 06:53:51 2013 (r329966)
+++ head/security/chntpw/Makefile Thu Oct 10 06:53:56 2013 (r329967)
@@ -10,27 +10,36 @@ DISTNAME= ${PORTNAME}-source-${PORTVERSI
MAINTAINER= buganini at gmail.com
COMMENT= Utility to set the password and edit registry on Microsoft NT system
+LICENSE= GPLv2
+
+OPTIONS_DEFINE= DOCS
+
USE_ZIP= yes
-USE_GMAKE= yes
USE_OPENSSL= yes
+USES= gmake
-ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS= i386 amd64
PLIST_FILES= bin/chntpw
PORTDOCS= README.txt WinReg.txt regedit.txt
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-NO_STAGE= yes
+.include <bsd.port.pre.mk>
+
post-patch:
- @${REINPLACE_CMD} -e '10 s,/usr,$$\(OPENSSLBASE\),' \
- ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e '/^CC=/d; /^OSSLPATH=/ s|=.*|=${OPENSSLBASE}|' ${WRKSRC}/Makefile
+.if ${ARCH} == "amd64"
+ @${REINPLACE_CMD} -e '/^CFLAGS=/ s| -m32||' ${WRKSRC}/Makefile
+.endif
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${PREFIX}/bin
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${STAGEDIR}${PREFIX}/bin
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
More information about the svn-ports-all
mailing list