aboutsummaryrefslogtreecommitdiffstats
path: root/net/dgd-kernel/Makefile
blob: e61b86f1055a4535513c9c5f2b2be1fb7f7d1bb8 (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
# Created by: glewis
# $FreeBSD$

PORTNAME=   dgd-kernel
PORTVERSION=    1.3.4
PORTREVISION=   2
CATEGORIES= net games
MASTER_SITES=   http://ftp.dworkin.nl/kernellib/ \
        http://ftp.dworkin.nl/kernellib/patches/
DISTNAME=   kernellib-${PORTVERSION}

MAINTAINER= glewis@FreeBSD.org
COMMENT=    Kernel mudlib, for use with DGD

RUN_DEPENDS=    ${LOCALBASE}/sbin/dgd:${PORTSDIR}/net/dgd

DIST_SUBDIR=    dgd
WRKSRC=     ${WRKDIR}
NO_BUILD=   yes
.if !defined(NOPORTDOCS)
PORTDOCS=   *
.endif

post-patch:
    cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete

do-configure:
    ${REINPLACE_CMD} -e "s:%%DATADIR%%:${DATADIR}:" \
        ${WRKSRC}/kernellib/doc/kernel/kernel.dgd

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
    @${INSTALL_DATA} ${WRKSRC}/kernellib/doc/kernel/kernel.dgd \
        ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/
    @${MKDIR} ${STAGEDIR}${DATADIR}/kernel
.for DIR in include kernel usr
    @cd ${WRKSRC}/kernellib && ${COPYTREE_SHARE} ${DIR} ${STAGEDIR}${DATADIR}/kernel
.endfor
    @# Install an RC script for dgd-kernel
    @${CAT} ${FILESDIR}/dgd-kernel.sh | ${SED} -e "s:%%PREFIX%%:${PREFIX}:" \
        -e "s:%%DATADIR%%:${DATADIR}:" > \
        ${STAGEDIR}${PREFIX}/etc/rc.d/dgd-kernel.sh.sample
    @${CHMOD} a+x ${STAGEDIR}${PREFIX}/etc/rc.d/dgd-kernel.sh.sample
.if !defined(NOPORTDOCS)
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    @cd ${WRKSRC}/kernellib && ${COPYTREE_SHARE} doc ${STAGEDIR}${DOCSDIR}
.endif

post-install:
    @# Need a temporary directory for certain files
    @${MKDIR} ${STAGEDIR}${DATADIR}/tmp

.include <bsd.port.mk>