aboutsummaryrefslogtreecommitdiffstats
path: root/net/dictd/Makefile
blob: 61c6fec313e5d17e61fe6b05b8e4b988a832b1bd (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
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$

PORTNAME=   dictd
PORTVERSION=    1.12.1
CATEGORIES+=    net textproc
MASTER_SITES=   SF/dict/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER?=    clsung@FreeBSD.org
COMMENT=    Dict protocol (RFC 2229) server

LIB_DEPENDS=    libmaa.so:${PORTSDIR}/devel/libmaa

USE_RC_SUBR=    ${PORTNAME}
USES=       bison libtool gmake
USE_AUTOTOOLS=  libtoolize
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
        --without-local-zlib
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

SUB_FILES+= dictd.conf pkg-message
SUB_LIST+=  PORTSDIR=${PORTSDIR}

ALL_TARGET= dictd dictzip
INSTALL_TARGET= install.dictd install.dictzip

post-patch:
.for i in Makefile.in dict.1.in dictd.8.in
    @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/$i
.endfor
    @${REINPLACE_CMD} -e "s|\([\ \t(]\)T_USER|\1T_USERNAME|g" ${WRKSRC}/*.[chly]

post-install:
    @${CP} ${WRKDIR}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample

.include <bsd.port.mk>