diff options
author | bapt <bapt@FreeBSD.org> | 2014-04-04 22:40:03 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-04-04 22:40:03 +0800 |
commit | 5c69df762fff178e2e1a44a9e8d07cac447a63f0 (patch) | |
tree | 3b876770b93f67efaea0df428a4af1d213c8e4d0 /misc/upclient/Makefile | |
parent | 3570c310adae760c996accdbb2287dc1f3c95e59 (diff) | |
download | freebsd-ports-graphics-5c69df762fff178e2e1a44a9e8d07cac447a63f0.tar.gz freebsd-ports-graphics-5c69df762fff178e2e1a44a9e8d07cac447a63f0.tar.zst freebsd-ports-graphics-5c69df762fff178e2e1a44a9e8d07cac447a63f0.zip |
Simplify
Support stage
Support packaging as a user
Diffstat (limited to 'misc/upclient/Makefile')
-rw-r--r-- | misc/upclient/Makefile | 68 |
1 files changed, 18 insertions, 50 deletions
diff --git a/misc/upclient/Makefile b/misc/upclient/Makefile index 9800d42077e..4998ccf5a34 100644 --- a/misc/upclient/Makefile +++ b/misc/upclient/Makefile @@ -12,6 +12,8 @@ DISTNAME= ${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E} MAINTAINER= ports@FreeBSD.org COMMENT= Uptimes project client +OPTIONS_DEFINE= DOCS + USES= gettext USE_RC_SUBR= upclient ALL_TARGET= bsd @@ -20,69 +22,35 @@ BUILD_WRKSRC= ${WRKSRC}/src SUB_FILES= pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message -MAN8= upclient.8 - REINPLACE_SUB= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO DOC_FILES+= doc/UptimesProtocol5 DOC_FILES+= HISTORY-BETA -NO_STAGE= yes -.include <bsd.port.pre.mk> - -post-extract: rename-doc - -rename-doc: +post-extract: @${MV} ${WRKSRC}/doc/"Uptimes Protocol 5" ${WRKSRC}/doc/UptimesProtocol5 post-patch: @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \ ${WRKSRC}/src/Makefile - ${REINPLACE_CMD} -e 's/CC=gcc/CC=${CC}/' ${WRKSRC}/src/Makefile - -do-install: install-program install-man install-sample install-script \ - install-locale - -install-program: - @${INSTALL_PROGRAM} -g kmem -m 2555 ${WRKSRC}/src/products/upclient \ - ${PREFIX}/sbin - -install-man: - @${INSTALL_MAN} ${WRKSRC}/src/products/upclient.8 \ - ${MAN8PREFIX}/man/man8 - -install-sample: - @${INSTALL_DATA} -g kmem -m 640 ${WRKSRC}/src/products/upclient.conf \ - ${PREFIX}/etc/upclient.conf.sample - -install-script: - @${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \ - ${PREFIX}/sbin - -install-locale: - @cd ${WRKSRC}/src; ${MAKE} install-locales - -post-install: install-conf install-doc display-message - -install-conf: -.if !exists(${PREFIX}/etc/upclient.conf) - @${CP} -p ${PREFIX}/etc/upclient.conf.sample \ - ${PREFIX}/etc/upclient.conf -.endif + @${REINPLACE_CMD} -e 's/CC=gcc/CC="${CC}"/g' \ + ${WRKSRC}/src/Makefile -install-doc: -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} +do-install: + ${INSTALL_PROGRAM} -m 2555 ${WRKSRC}/src/products/upclient \ + ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_MAN} ${WRKSRC}/src/products/upclient.8 \ + ${STAGEDIR}${MAN8PREFIX}/man/man8 + ${INSTALL_DATA} -m 640 ${WRKSRC}/src/products/upclient.conf \ + ${STAGEDIR}${PREFIX}/etc/upclient.conf.sample + ${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \ + ${STAGEDIR}${PREFIX}/sbin + @cd ${WRKSRC}/src; ${MAKE_CMD} destdir=${STAGEDIR} install-locales + @${MKDIR} ${STAGEDIR}${DOCSDIR} .for file in ${DOC_FILES} - @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} .endfor -.endif - -display-message: - @${ECHO_MSG} - @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} -.include <bsd.port.post.mk> +.include <bsd.port.mk> |