1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- support stage

This commit is contained in:
Yen-Ming Lee 2014-07-12 06:03:22 +00:00
parent 493f5c9c0b
commit 10b270ef5f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361599

View File

@ -10,56 +10,53 @@ MASTER_SITES= ftp://ftp.dhis.org/pub/dhis/
MAINTAINER= ports@FreeBSD.org
COMMENT= DHIS server for dynamic updates on the server using specific engines
LICENSE= BSD2CLAUSE
LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp
CFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib
DOCFILES= CONTRIBUTORS COPYRIGHT INSTALL MODULES README
PORTDOCS= CONTRIBUTORS COPYRIGHT INSTALL MODULES README
OPTIONS_DEFINE= DOCS
NO_STAGE= yes
.include <bsd.port.options.mk>
post-patch:
${CP} ${FILESDIR}/dhisd.sh ${WRKSRC}/dhisd.sh
cd ${WRKSRC} && ${REINPLACE_CMD} -e "s^__PREFIX__^${PREFIX}^g" \
Makefile dhisd.h dhisd.sh ${DOCFILES}
Makefile dhisd.h dhisd.sh ${PORTDOCS}
do-install:
post-install:
@${ECHO_MSG} "===> Installing ${PREFIX}/sbin/dhisd."
@${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${PREFIX}/sbin
@${ECHO_MSG} "===> Installing ${STAGEDIR}${PREFIX}/sbin/dhisd."
@${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${STAGEDIR}${PREFIX}/sbin
@${ECHO_CMD} "sbin/dhisd" >> ${TMPPLIST}
@${ECHO_MSG} "===> Installing ${PREFIX}/sbin/sgenkeys."
@${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${PREFIX}/sbin
@${ECHO_MSG} "===> Installing ${STAGEDIR}${PREFIX}/sbin/sgenkeys."
@${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${STAGEDIR}${PREFIX}/sbin
@${ECHO_CMD} "sbin/genkeys" >> ${TMPPLIST}
@${ECHO_MSG} "===> Creating ${PREFIX}/etc/dhis and installing sample db files."
@${MKDIR} ${PREFIX}/etc/dhis
@${CHMOD} 700 ${PREFIX}/etc/dhis
@${INSTALL_DATA} ${WRKSRC}/dhis.db.sample ${PREFIX}/etc/dhis/dhis.db.sample
@${ECHO_MSG} "===> Creating ${STAGEDIR}${PREFIX}/etc/dhis and installing sample db."
@${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 ${PREFIX}/etc/dhis/services.db.sample
@${INSTALL_DATA} ${WRKSRC}/services.db.sample ${STAGEDIR}${PREFIX}/etc/dhis/services.db.sample
@${ECHO_CMD} "etc/dhis/services.db.sample" >> ${TMPPLIST}
@${CHMOD} 600 ${PREFIX}/etc/dhis/*
@${CHMOD} 600 ${STAGEDIR}${PREFIX}/etc/dhis/*
@${ECHO_CMD} "@dirrm etc/dhis" >> ${TMPPLIST}
.if !exists(${PREFIX}/etc/rc.d/dhisd.sh)
@${ECHO_MSG} "===> Installing ${PREFIX}/etc/rc.d/dhid.sh startup file."
@${INSTALL_SCRIPT} -m 751 ${WRKSRC}/dhisd.sh ${PREFIX}/etc/rc.d/dhisd.sh
.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 ${DOCSDIR}"
@${MKDIR} ${DOCSDIR}
@${CHMOD} 755 ${DOCSDIR}
.for DOCFILE in ${DOCFILES}
@${INSTALL_DATA} ${WRKSRC}/${DOCFILE} ${DOCSDIR}
@${ECHO_CMD} "share/doc/${PORTNAME}/${DOCFILE}" >> ${TMPPLIST}
.endfor
@${INSTALL_DATA} ${FILESDIR}/INSTALL.bsd ${DOCSDIR}
@${ECHO_MSG} "===> Installing documentation in ${STAGEDIR}${DOCSDIR}"
@${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}
@${ECHO_CMD} "@dirrm share/doc/${PORTNAME}" >> ${TMPPLIST}
.endif
@ -70,7 +67,7 @@ post-install:
@${ECHO} "http://www.dhis.org/dhis/r5/"
.if ${PORT_OPTIONS:MDOCS}
@${ECHO} ""
@${ECHO} "or the files in ${DOCSDIR}"
@${ECHO} "or the documents in ${STAGEDIR}${DOCSDIR}"
@${ECHO} "Read INSTALL and INSTALL.bsd at least for the setup information of dhisd."
.endif
@${ECHO} "--------------------------------------------------------------------------"