blob: 697e79e13aa278610d46c5ab4b1265499b2bec91 (
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
|
# Created by: David
# $FreeBSD$
PORTNAME= ncid
PORTVERSION= 0.84
CATEGORIES= comms
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:S/.1//g}
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= ports@FreeBSD.org
COMMENT= Network based Caller ID package
WRKSRC= ${WRKDIR}/${PORTNAME}
MAN1= ncid.1 ncid2ncid.1 ncidrotate.1 yac2ncid.1 ncidmodules.1 ncidtools.1 \
cidalias.1 cidcall.1 cidupdate.1 ncid-initmodem.1 ncid-kpopup.1 ncid-mythtv.1 \
ncid-page.1 ncid-samba.1 ncid-skel.1 ncid-speak.1 ncid-yac.1
MAN5= ncid.conf.5 ncidmodules.conf.5 ncidd.alias.5 ncidrotate.conf.5 ncidd.blacklist.5 \
ncidsip.conf.5 sip2ncid.conf.5 ncidd.conf.5 ncid2ncid.conf.5 yac2ncid.conf.5
MAN8= ncidd.8 ncidsip.8 sip2ncid.8
USES= gmake tk
ALL_TARGET= local
MAKE_ARGS= WISH=${WISH} TCLSH=${TCLSH}
INSTALL_TARGET= freebsd-install
SUB_FILES= pkg-message
NO_STAGE= yes
post-extract:
@cd ${WRKSRC}/FreeBSD;for i in *.rc; do \
x=`echo $$i | cut -f 1 -d .`; ${CP} $$i $$x; done
post-patch:
@${GREP} -lr 'etc/ncid' ${WRKSRC}/|${XARGS} ${REINPLACE_CMD} -Ee\
's,(/usr/local/etc/ncid|/etc/ncid),${ETCDIR},g'
@${FIND} ${WRKSRC}/ -name Makefile|${XARGS} ${REINPLACE_CMD} -Ee\
'/install:/s,install-(etc|logrotate),,'
@${REINPLACE_CMD} -Ee '/mkdir.*(INIT|ROTATE|BIN|LOG|ETC)/d;\
/CFLAGS.*=/s|=|+=|' ${WRKSRC}/Makefile
# Respect PREFIX/MANPREFIX/DATADIR
@${REINPLACE_CMD} -e's|prefix.*= /usr/local|prefix=$${PREFIX}|g' \
-e 's|$$(prefix)/bin|$${PREFIX}/bin|g' \
-e 's|$$(prefix)/sbin|$${PREFIX}/sbin|g' \
-e 's|$$(prefix)/share|$${PREFIX}/share|g' \
-e 's|$$(SHARE)/man|$${MANPREFIX}/man/|g' \
-e 's|$$(SHARE)/ncid|$${DATADIR}|g' ${WRKSRC}/Makefile
post-install:
@${INSTALL} -d ${ETCDIR}/
@cd ${WRKSRC};for i in server/*.alias scripts/*.conf;do\
ib=`basename $$i`;\
${INSTALL_DATA} $$i ${ETCDIR}/$$ib.dist;\
${CP} -n ${ETCDIR}/$$ib.dist ${ETCDIR}/$$ib || ${TRUE} ;\
${ECHO_CMD} "@unexec cd %D/${ETCDIR_REL}/;! cmp -s $$ib $$ib.dist||\
${RM} -f $$ib">>${TMPPLIST};\
${ECHO_CMD} "${ETCDIR_REL}/$$ib.dist">>${TMPPLIST};\
${ECHO_CMD} "@exec ${CP} -n %D/%F %D/${ETCDIR_REL}/$$ib">>${TMPPLIST};\
done
@${ECHO_CMD} "@unexec ${RMDIR} %D/${ETCDIR_REL} 2>/dev/null || true">>${TMPPLIST}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
|