blob: 659c409ba6cd4f3113d519e9b421bc7a1c6f393e (
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# Created by: Hajimu UMEMOTO <ume@FreeBSD.org>
# $FreeBSD$
PORTNAME= mpd-l2tp-ipv6pd-client
PORTVERSION= 20081105
#PORTREVISION= 0
CATEGORIES= net ipv6
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= ume@FreeBSD.org
COMMENT= Sample implementation set of "L2TP-IPv6PD" client using mpd
IS_INTERACTIVE= yes
MANUAL_PACKAGE_BUILD=yes
NO_PACKAGE= yes
USE_RC_SUBR= yes
OPTIONS_SINGLE= MPD
OPTIONS_SINGLE_MPD= MPD4 MPD5
OPTIONS_DEFAULT= MPD5
MPD4_DESC= Use mpd4
MPD5_DESC= Use mpd5
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMPD4}
MPD_NAME= mpd4
MPD4= ""
.else
MPD_NAME= mpd5
MPD4= "@comment "
.endif
BUILD_DEPENDS= ${MPD_NAME}:${PORTSDIR}/net/${MPD_NAME}
RUN_DEPENDS= dhcp6ctl:${PORTSDIR}/net/dhcp6 \
${MPD_NAME}:${PORTSDIR}/net/${MPD_NAME}
CONF_DIR?= etc/${MPD_NAME}
MPD_CONF_FILES= dhcp6c.conf.in rtadvd.conf
SCRIPT_FILES= dhcp6c_pd.sh linkdown.sh linkup.sh
SECRET_FILES= mpd.secret
SCRIPTS_ENV= WRKDIR="${WRKDIR}" \
SCRIPTDIR="${SCRIPTDIR}" \
PREFIX="${PREFIX}" \
CONF_DIR="${CONF_DIR}" \
MPD_NAME="${MPD_NAME}" \
CAT="${CAT}" \
CP="${CP}" \
DIALOG="${DIALOG}" \
MD5="${MD5}" \
MKTEMP="${MKTEMP}" \
RM="${RM}" \
SED="${SED}" \
WHICH="${WHICH}"
PLIST_SUB= CONF_DIR=${CONF_DIR} \
MPD_NAME=${MPD_NAME} \
MPD4=${MPD4}
PKGMESSAGE= ${WRKDIR}/pkg-message
do-build:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/setting
@${DIALOG} --clear
do-install:
@if [ -f ${PREFIX}/${CONF_DIR}/mpd.conf -o \
-f ${PREFIX}/${CONF_DIR}/mpd.links -o \
-f ${PREFIX}/${CONF_DIR}/mpd.secret ]; then \
${ECHO_CMD} "There are ${MPD_NAME} configuration files already"; \
${ECHO_CMD} "Pleae remove at least following files before install:"; \
${ECHO_CMD} " ${PREFIX}/${CONF_DIR}/mpd.conf"; \
${ECHO_CMD} " ${PREFIX}/${CONF_DIR}/mpd.links"; \
${ECHO_CMD} " ${PREFIX}/${CONF_DIR}/mpd.secret"; \
exit 1; \
fi
@${MKDIR} ${PREFIX}/${CONF_DIR}
.if ${PORT_OPTIONS:MMPD4}
@${INSTALL_DATA} ${WRKDIR}/mpd.conf ${PREFIX}/${CONF_DIR}/mpd.conf
@${INSTALL_DATA} ${WRKDIR}/mpd.links ${PREFIX}/${CONF_DIR}/mpd.links
.else
@${INSTALL_DATA} ${WRKDIR}/mpd5.conf ${PREFIX}/${CONF_DIR}/mpd.conf
.endif
.for f in ${MPD_CONF_FILES}
@${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${CONF_DIR}/${f}
.endfor
@${INSTALL_DATA} ${WRKDIR}/mpd ${PREFIX}/${CONF_DIR}/${MPD_NAME}
.for f in ${SCRIPT_FILES}
@${INSTALL_SCRIPT} ${WRKDIR}/${f} ${PREFIX}/${CONF_DIR}/${f}
.endfor
.for f in ${SECRET_FILES}
@${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m 400 \
${WRKDIR}/${f} ${PREFIX}/${CONF_DIR}/${f}
.endfor
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
|