aboutsummaryrefslogtreecommitdiff
path: root/lang/pnet/Makefile.pnet
blob: c6e09d14fb6dad27f49d47826b60e16a07e6b577 (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
PNET_VERSION=   0.7.0
PNET_REVISION=  0
PNET_PORTVER=   ${PNET_VERSION}.${PNET_REVISION}
PNET_PORTREV=   0
PNET_PORTEPOCH= 0

PNET_MASTER_SITES=	http://www.southern-storm.com.au/download/
#			${MASTER_SITE_GNU}
PNET_MASTER_SITE_SUBDIR=	dotgnu/pnet/

ILSTRIP_CMD=	${LOCALBASE}/bin/ilstrip
ILRUN_CMD=	${LOCALBASE}/bin/ilrun

.if defined(WITH_OPTIMIZED_CSFLAGS)
CSFLAGS+=-O2
.endif

.if defined(PNET_STRAP_BIN) || defined(PNET_STRAP_SBIN)

PNET_STRAP_SUFX?=	.exe
PNET_BIN_WRKDIR?=	${WRKDIR}/PNET_STRAP/bin
PNET_SBIN_WRKDIR?=	${WRKDIR}/PNET_STRAP/sbin

.for strap in ${PNET_STRAP_BIN}
PLIST_FILES+=	bin/${strap} bin/${strap}${PNET_STRAP_SUFX}
.endfor
.for strap in ${PNET_STRAP_SBIN}
PLIST_FILES+=	sbin/${strap} sbin/${strap}${PNET_STRAP_SUFX}
.endfor

pre-patch: pnet-strap
pnet-strap:
	@${MKDIR} ${PNET_BIN_WRKDIR}
	@${MKDIR} ${PNET_SBIN_WRKDIR}

.for strap in ${PNET_STRAP_BIN}
	@${ECHO_CMD} "#!${SH}" >> ${PNET_BIN_WRKDIR}/${strap}
	@${ECHO_CMD} "${ILRUN_CMD} ${ILRUN_FLAGS} ${PREFIX}/bin/${strap}${PNET_STRAP_SUFX}" >> ${PNET_BIN_WRKDIR}/${strap}
.endfor
.for strap in ${PNET_STRAP_SBIN}
	@${ECHO_CMD} -n "#!${SH}" >> ${PNET_SBIN_WRKDIR}/${strap}
	@${EHCO_CMD} -n "${ILRUN_CMD} ${ILRUN_FLAGS} ${PREFIX}/sbin/${strap}${PNET_STRAP_SUFX}" >> ${PNET_SBIN_WRKDIR}/${strap}
.endfor

post-install: pnet-strap-install
pnet-strap-install:
.for strap in ${PNET_STRAP_BIN}
	@${INSTALL_SCRIPT} ${PNET_BIN_WRKDIR}/${strap} ${PREFIX}/bin
.endfor
.for strap in ${PNET_STRAP_SBIN}
	@${INSTALL_SCRIPT} ${PNET_SBIN_WRKDIR}/${strap} ${PREFIX}/sbin
.endfor
.endif

pre-everything:: post-everything
.if !defined(WITH_OPTIMIZED_CSFLAGS)
	@${ECHO_MSG} "Define optimized CSLAGS with"
	@${ECHO_MSG} "WITH_OPTIMIZED_CSFLAGS=yes"
.endif

post-everything::