diff options
author | Johan van Selst <johans@FreeBSD.org> | 2011-06-11 10:29:42 +0000 |
---|---|---|
committer | Johan van Selst <johans@FreeBSD.org> | 2011-06-11 10:29:42 +0000 |
commit | a29e5cec1886b4f6f538a9073ed7f77b2eee8368 (patch) | |
tree | 92c3c23e516e76fa92f749e99791660a9e05429a /games/ldmud/Makefile | |
parent | ba7ac7a2492ab040c25a2d623f6e32d28c69fac4 (diff) |
Notes
Diffstat (limited to 'games/ldmud/Makefile')
-rw-r--r-- | games/ldmud/Makefile | 104 |
1 files changed, 71 insertions, 33 deletions
diff --git a/games/ldmud/Makefile b/games/ldmud/Makefile index 3622512ce23a..e1a085c6d36d 100644 --- a/games/ldmud/Makefile +++ b/games/ldmud/Makefile @@ -6,58 +6,96 @@ # PORTNAME= ldmud -PORTVERSION= 3.4.2 -PORTREVISION= 1 +PORTVERSION= 3.3.720 +PORTEPOCH= 1 CATEGORIES= games net -MASTER_SITES= http://www.bearnip.com/ftp/mud/ +MASTER_SITES= http://www.bearnip.com/ftp/mud/ \ + ftp://mud.stack.nl/pub/ldmud/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= johans@FreeBSD.org COMMENT= A modern version of the LPMud game driver +LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre + GNU_CONFIGURE= yes -CONFIGURE_ARGS+=--libdir=${DATADIR} --bindir=${PREFIX}/sbin +USE_OPENSSL= yes +USE_ICONV= yes +CONFIGURE_ARGS+=--libdir=${DATADIR} \ + --bindir=${PREFIX}/sbin \ + --enable-use-pcre \ + --enable-use-tls=ssl WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src ALL_TARGET= ldmud MAN1= ldmud.1 +USE_RC_SUBR= ldmud.sh +SUB_LIST+= LDUSER=${USERS} MAKE_JOBS_UNSAFE= yes -USERS= mud -GROUPS= mud +USERS= mud +GROUPS= mud + +OPTIONS= MYSQL "Enable MySQL database support" On \ + PGSQL "Enable PostgreSQL database support" On \ + SQLITE "Enable SQLite database support" On \ + IPV6 "Enable IPv6 support" On \ + LPMUD "Install default mudlib (LP-245)" On + +PORTSCOUT= skipv:3.4 -LOGDIR= ${DATADIR} -.if defined(MUDLIB) && ${MUDLIB} == lpmud -PLIST_SUB+= LPMUD="" MUDLIB="@comment " -LOGDIR= ${DATADIR}/log -.elif !defined(MUDLIB) || ${MUDLIB} != none -PLIST_SUB+= LPMUD="@comment " MUDLIB="" +.include <bsd.port.options.mk> + +.ifdef WITH_IPV6 +CONFIGURE_ARGS+=--enable-use-ipv6 .else -PLIST_SUB+= LPMUD="@comment " MUDLIB="@comment " +CONFIGURE_ARGS+=--disable-use-ipv6 +.endif + +.ifdef WITH_MYSQL +USE_MYSQL= yes +LDFLAGS+= -L${LOCALBASE}/lib/mysql +CONFIGURE_ARGS+=--enable-use-mysql +.else +CONFIGURE_ARGS+=--disable-use-mysql +.endif + +.ifdef WITH_PGSQL +USE_PGSQL= yes +CONFIGURE_ARGS+=--enable-use-pgsql +.else +CONFIGURE_ARGS+=--disable-use-pgsql +.endif + +.ifdef WITH_SQLITE +USE_SQLITE= yes +CONFIGURE_ARGS+=--enable-use-sqlite +.else +CONFIGURE_ARGS+=--disable-use-sqlite +.endif + +.ifdef WITH_LPMUD +PLIST_SUB+= LPMUD="" DEMOLIB="@comment " +.else +PLIST_SUB+= LPMUD="@comment " DEMOLIB="" .endif .include <bsd.port.pre.mk> post-install: - # Install an RC script for ldmud - ${CAT} ${FILESDIR}/ldmud.sh | ${SED} -e "s:%%PREFIX%%:${PREFIX}:" \ - -e "s:%%LOGDIR%%:${LOGDIR}:" > \ - ${PREFIX}/etc/rc.d/ldmud.sh.sample - ${CHMOD} a+x ${PREFIX}/etc/rc.d/ldmud.sh.sample - # Create mudlib directory - ${MKDIR} ${DATADIR} -.if defined(MUDLIB) && ${MUDLIB} == lpmud - cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mud/lp-245 && ${FIND} . \ - | ${CPIO} -pdmu ${DATADIR} -.elif !defined(MUDLIB) || ${MUDLIB} != none - cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mudlib && ${FIND} . \ - | ${CPIO} -pdmu ${DATADIR} +# # Install mudlib and other directories + @${MKDIR} ${DATADIR} /var/log/${PORTNAME} /var/run/${PORTNAME} + @${CHOWN} ${USERS}:${GROUPS} /var/log/${PORTNAME} /var/run/${PORTNAME} +.ifdef WITH_LPMUD + @cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mud/lp-245 && ${FIND} . \ + | ${CPIO} -pdmu -R ${USERS}:${GROUPS} ${DATADIR} +.else + @cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mudlib && ${FIND} . \ + | ${CPIO} -pdmu -R ${USERS}:${GROUPS} ${DATADIR} .endif - # Set mudlib ownership - -@${CHOWN} -h -R mud:mud ${DATADIR} -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc && ${FIND} . \ +.ifndef NOPORTDOCS + @${MKDIR} ${DOCSDIR} + @cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc && ${FIND} . \ | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} - ${RM} -f ${DOCSDIR}/Makefile + @${RM} -f ${DOCSDIR}/Makefile .endif .include <bsd.port.post.mk> |