1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00
freebsd-ports/dns/dhisd/Makefile
Alexander Leidinger 349dcec075 - Fix compilation on FreeBSD 5.2-BETA.
- Switch LIB_DEPENDS from math/libgmp-freebsd to math/libgmp4 on FreeBSD 5
  only (the base libgmp 2.0.1 on FreeBSD 4 is fine) so this port buils on
  architectures other than alpha and i386 (tested on FreeBSD/sparc64).
- Respect CC and CFLAGS.
- Remove broken URL forgotten in Makefile 1.16 and pkg-descr 1.5.
- Give maintainership to submitter.

Submitted by:	marius@alchemy.franken.de
Approved by:	portmgr
2003-11-25 18:54:38 +00:00

82 lines
2.9 KiB
Makefile

# New ports collection makefile for: dhisd
# Date created: Sun Feb 25 21:13:59 CET 2001
# Whom: Bas Kruit <baskruit@bsltwr.dhis.org>
#
# $FreeBSD$
#
PORTNAME= dhisd
PORTVERSION= 5.1
PORTREVISION= 2
CATEGORIES= dns
MASTER_SITES= ftp://ftp.dhis.org/pub/dhis/
MAINTAINER= marius@alchemy.franken.de
COMMENT= DHIS server for dynamic updates on the server using specific engines
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 500023
LIB_DEPENDS= gmp.6:${PORTSDIR}/math/libgmp4
CFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
.endif
DOCFILES= CONTRIBUTORS COPYRIGHT INSTALL MODULES README
USE_REINPLACE= yes
post-patch:
${CP} ${FILESDIR}/dhisd.sh ${WRKSRC}/dhisd.sh
cd ${WRKSRC} && ${REINPLACE_CMD} -e "s^__PREFIX__^${PREFIX}^g" \
Makefile dhisd.h dhisd.sh ${DOCFILES}
do-install:
post-install:
@${ECHO_MSG} "===> Installing ${PREFIX}/sbin/dhisd."
@${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${PREFIX}/sbin
@${ECHO_CMD} "sbin/dhisd" >> ${TMPPLIST}
@${ECHO_MSG} "===> Installing ${PREFIX}/sbin/sgenkeys."
@${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${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_CMD} "etc/dhis/dhis.db.sample" >> ${TMPPLIST}
@${INSTALL_DATA} ${WRKSRC}/services.db.sample ${PREFIX}/etc/dhis/services.db.sample
@${ECHO_CMD} "etc/dhis/services.db.sample" >> ${TMPPLIST}
@${CHMOD} 600 ${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
@${ECHO_CMD} "etc/rc.d/dhisd.sh" >> ${TMPPLIST}
.endif
.if !defined(NOPORTDOCS)
@${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_CMD} "share/doc/${PORTNAME}/INSTALL.bsd" >> ${TMPPLIST}
@${ECHO_CMD} "@dirrm share/doc/${PORTNAME}" >> ${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 !defined(NOPORTDOCS)
@${ECHO} ""
@${ECHO} "or the files in ${DOCSDIR}"
@${ECHO} "Read INSTALL and INSTALL.bsd at least for the setup information of dhisd."
.endif
@${ECHO} "--------------------------------------------------------------------------"
.include <bsd.port.post.mk>