From owner-svn-ports-all@freebsd.org Sat Mar 4 09:01:48 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0881CF847C; Sat, 4 Mar 2017 09:01:48 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 973931DAA; Sat, 4 Mar 2017 09:01:48 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2491lqE070960; Sat, 4 Mar 2017 09:01:47 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2491lm4070957; Sat, 4 Mar 2017 09:01:47 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201703040901.v2491lm4070957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Sat, 4 Mar 2017 09:01:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r435385 - in head/dns/dhisd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 09:01:49 -0000 Author: amdmi3 Date: Sat Mar 4 09:01:47 2017 New Revision: 435385 URL: https://svnweb.freebsd.org/changeset/ports/435385 Log: - Switch to USES=localbase - Switch to options helpers - Simplify installation - Switch to pkg-message Added: head/dns/dhisd/files/pkg-message.in (contents, props changed) Modified: head/dns/dhisd/Makefile head/dns/dhisd/pkg-plist Modified: head/dns/dhisd/Makefile ============================================================================== --- head/dns/dhisd/Makefile Sat Mar 4 06:25:26 2017 (r435384) +++ head/dns/dhisd/Makefile Sat Mar 4 09:01:47 2017 (r435385) @@ -15,60 +15,39 @@ LICENSE_FILE= ${WRKSRC}/COPYRIGHT LIB_DEPENDS= libgmp.so:math/gmp -CFLAGS+= -I${PREFIX}/include -LDFLAGS+= -L${PREFIX}/lib +USES= localbase:ldflags -PORTDOCS= CONTRIBUTORS COPYRIGHT INSTALL MODULES README +SUB_FILES= pkg-message -OPTIONS_DEFINE= DOCS +DOCS= CONTRIBUTORS INSTALL MODULES README +PORTDOCS= * -.include +OPTIONS_DEFINE= DOCS post-patch: - ${CP} ${FILESDIR}/dhisd.sh ${WRKSRC}/dhisd.sh - cd ${WRKSRC} && ${REINPLACE_CMD} -e "s^__PREFIX__^${PREFIX}^g" \ - Makefile dhisd.h dhisd.sh ${PORTDOCS} + @${CP} ${FILESDIR}/dhisd.sh ${WRKSRC}/dhisd.sh + @cd ${WRKSRC} && ${REINPLACE_CMD} -e "s^__PREFIX__^${PREFIX}^g" \ + Makefile dhisd.h dhisd.sh ${DOCS} do-install: - -post-install: - @${ECHO_MSG} "===> Installing ${STAGEDIR}${PREFIX}/sbin/dhisd." - @${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${STAGEDIR}${PREFIX}/sbin - @${ECHO_CMD} "sbin/dhisd" >> ${TMPPLIST} - @${ECHO_MSG} "===> Installing ${STAGEDIR}${PREFIX}/sbin/sgenkeys." - @${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${STAGEDIR}${PREFIX}/sbin - @${ECHO_CMD} "sbin/genkeys" >> ${TMPPLIST} - @${ECHO_MSG} "===> Creating ${STAGEDIR}${PREFIX}/etc/dhis and installing sample db." + ${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${STAGEDIR}${PREFIX}/sbin @${MKDIR} ${STAGEDIR}${PREFIX}/etc/dhis - @${CHMOD} 700 ${STAGEDIR}${PREFIX}/etc/dhis - @${INSTALL_DATA} ${WRKSRC}/dhis.db.sample ${STAGEDIR}${PREFIX}/etc/dhis/dhis.db.sample - @${ECHO_CMD} "etc/dhis/dhis.db.sample" >> ${TMPPLIST} - @${INSTALL_DATA} ${WRKSRC}/services.db.sample ${STAGEDIR}${PREFIX}/etc/dhis/services.db.sample - @${ECHO_CMD} "etc/dhis/services.db.sample" >> ${TMPPLIST} - @${CHMOD} 600 ${STAGEDIR}${PREFIX}/etc/dhis/* -.if !exists(${STAGEDIR}${PREFIX}/etc/rc.d/dhisd.sh) - @${ECHO_MSG} "===> Installing ${STAGEDIR}${PREFIX}/etc/rc.d/dhid.sh startup file." - @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/dhisd.sh ${STAGEDIR}${PREFIX}/etc/rc.d/dhisd.sh - @${ECHO_CMD} "etc/rc.d/dhisd.sh" >> ${TMPPLIST} -.endif -.if ${PORT_OPTIONS:MDOCS} - @${ECHO_MSG} "===> Installing documentation in ${STAGEDIR}${DOCSDIR}" + ${INSTALL_DATA} ${WRKSRC}/dhis.db.sample ${STAGEDIR}${PREFIX}/etc/dhis/dhis.db.sample + ${INSTALL_DATA} ${WRKSRC}/services.db.sample ${STAGEDIR}${PREFIX}/etc/dhis/services.db.sample + ${INSTALL_SCRIPT} ${WRKSRC}/dhisd.sh ${STAGEDIR}${PREFIX}/etc/rc.d/dhisd.sh + +do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - @${CHMOD} 755 ${STAGEDIR}${DOCSDIR} - @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} - @${INSTALL_DATA} ${FILESDIR}/INSTALL.bsd ${STAGEDIR}${DOCSDIR} - @${ECHO_CMD} "share/doc/${PORTNAME}/INSTALL.bsd" >> ${TMPPLIST} -.endif - @${ECHO} "--------------------------------------------------------------------------" - @${ECHO} "Before dhisd can run, you will need configure BIND." - @${ECHO} "" - @${ECHO} "For more information, see the following site:" - @${ECHO} "http://www.dhis.org/dhis/r5/" -.if ${PORT_OPTIONS:MDOCS} - @${ECHO} "" - @${ECHO} "or the documents in ${STAGEDIR}${DOCSDIR}" - @${ECHO} "Read INSTALL and INSTALL.bsd at least for the setup information of dhisd." -.endif - @${ECHO} "--------------------------------------------------------------------------" +.for f in ${DOCS} + cd ${WRKSRC} && ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor + ${INSTALL_DATA} ${FILESDIR}/INSTALL.bsd ${STAGEDIR}${DOCSDIR} + +post-install-DOCS-on: + @${REINPLACE_CMD} -e 's|^__DOCS__||' ${PKGMESSAGE} + +post-install-DOCS-off: + @${REINPLACE_CMD} -e '/^__DOCS__/ d' ${PKGMESSAGE} .include Added: head/dns/dhisd/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/dhisd/files/pkg-message.in Sat Mar 4 09:01:47 2017 (r435385) @@ -0,0 +1,9 @@ +-------------------------------------------------------------------------- +Before dhisd can run, you will need configure BIND. + +For more information, see the following site: +http://www.dhis.org/dhis/r5/ +__DOCS__ +__DOCS__or the documents in %%DOCSDIR%% +__DOCS__Read INSTALL and INSTALL.bsd at least for the setup information of dhisd. +-------------------------------------------------------------------------- Modified: head/dns/dhisd/pkg-plist ============================================================================== --- head/dns/dhisd/pkg-plist Sat Mar 4 06:25:26 2017 (r435384) +++ head/dns/dhisd/pkg-plist Sat Mar 4 09:01:47 2017 (r435385) @@ -1 +1,6 @@ -@comment Left empty, filled during post-install by Makefile +sbin/dhisd +sbin/genkeys +@(,,600) etc/dhis/dhis.db.sample +@(,,600) etc/dhis/services.db.sample +etc/rc.d/dhisd.sh +@dir(,,700) etc/dhis