aboutsummaryrefslogtreecommitdiffstats
path: root/games/ldmud/Makefile
blob: 8c9107e02bd1419f11ae1154315a537cacc9939f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Created by: glewis@FreeBSD.org
# $FreeBSD$

PORTNAME=   ldmud
PORTVERSION=    3.3.720
PORTREVISION=   3
PORTEPOCH=  1
CATEGORIES= games net
MASTER_SITES=   http://www.bearnip.com/ftp/mud/ \
        ftp://mud.stack.nl/pub/ldmud/

MAINTAINER= johans@FreeBSD.org
COMMENT=    Modern version of the LPMud game driver

BUILD_DEPENDS=  help2man:misc/help2man
LIB_DEPENDS=    libpcre.so:devel/pcre

GNU_CONFIGURE=  yes
USE_OPENSSL=    yes
USES=       iconv pkgconfig
CONFIGURE_ARGS+=--libdir=${DATADIR} \
        --bindir=${PREFIX}/sbin \
        --enable-use-pcre \
        --enable-use-tls=ssl
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
ALL_TARGET= ldmud
USE_RC_SUBR=    ldmud
MAKE_JOBS_UNSAFE=   yes

USERS=      mud
GROUPS=     mud

OPTIONS_DEFINE= MYSQL PGSQL SQLITE IPV6 DOCS
OPTIONS_DEFAULT=MYSQL PGSQL SQLITE IPV6 LPMUD
OPTIONS_SINGLE= MUDLIB
OPTIONS_SINGLE_MUDLIB=  LPMUD DEMOLIB
OPTIONS_SUB=    yes
LPMUD_DESC= Install default mudlib (LP-245)
IPV6_CONFIGURE_ENABLE=  use-ipv6
MYSQL_USE=      MYSQL=yes
MYSQL_CONFIGURE_ENABLE= use-mysql
PGSQL_USES=     pgsql
PGSQL_CONFIGURE_ENABLE= use-pgsql
SQLITE_USE=     SQLITE=yes
SQLITE_CONFIGURE_ENABLE=use-sqlite

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
LDFLAGS+=   -L${LOCALBASE}/lib/mysql
.endif

post-install:
#   # Install mudlib and other directories
    @${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}/var/log/${PORTNAME} \
        ${STAGEDIR}/var/run/${PORTNAME}
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/ldmud
.if ${PORT_OPTIONS:MLPMUD}
    cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mud/lp-245 && ${FIND} . \
        | ${CPIO} -pdmu ${STAGEDIR}${DATADIR}
.else
    cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mudlib && ${FIND} . \
        | ${CPIO} -pdmu ${STAGEDIR}${DATADIR}
.endif
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc && ${FIND} . \
        | ${CPIO} -pdmu ${STAGEDIR}${DOCSDIR}
    @${RM} -f ${STAGEDIR}${DOCSDIR}/Makefile
.endif

.include <bsd.port.mk>