summaryrefslogtreecommitdiff
path: root/devel/nsis/Makefile
blob: 47957fe26d771462add10c3a09b08c0ef23c6c36 (plain)
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
# $NetBSD: Makefile,v 1.5 2006/01/24 07:32:04 wiz Exp $
#

DISTNAME=	nsis-${NSIS_VER}
PKGREVISION=	2
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=nsis/}
EXTRACT_SUFX=	.zip .tar.bz2
DISTFILES=	${DISTNAME}.zip		\
		${NSIS_SRC}.tar.bz2

MAINTAINER=	cube@NetBSD.org
HOMEPAGE=	http://nsis.sourceforge.net/Main_Page
COMMENT=	Scriptable system to build Windows installers

DEPENDS+=	scons>=0.96.91:../../devel/scons-devel

NSIS_SRC=	${DISTNAME:=-src}
NSIS_VER=	2.12
WRKSRC=		${WRKDIR}/${NSIS_SRC}
NO_CONFIGURE=	yes
EXTRACT_OPTS_ZIP=	-qo

EVAL_PREFIX+=	SCONS_PREFIX=scons
SCONS_BIN=	${SCONS_PREFIX}/bin/scons
MAKENSIS_BIN=	${PREFIX}/share/nsis/makensis

INSTALLATION_DIRS=	bin share/nsis

SUBST_CLASSES+=		makensis
SUBST_STAGE.makensis=	post-patch
SUBST_FILES.makensis=	makensis.sh
SUBST_SED.makensis=	-e s,@@SH@@,${SH}, \
			-e s,@@MAKENSIS@@,${MAKENSIS_BIN},

post-extract:
	${CP} ${FILESDIR}/makensis.sh ${WRKSRC}

do-build:
	cd ${WRKSRC} &&					\
	    ${SCONS_BIN} SKIPSTUBS=all SKIPPLUGINS=all	\
	        SKIPUTILS=all SKIPMISC=all VERSION=${NSIS_VER}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/build/release/makensis/makensis	\
	    ${MAKENSIS_BIN}
	${INSTALL_SCRIPT} ${WRKSRC}/makensis.sh ${PREFIX}/bin/makensis
	cd ${WRKDIR}/${DISTNAME} && ${FIND} . -type f | \
	    ${PAX} -rw ${PREFIX}/share/nsis

.include "../../mk/bsd.pkg.mk"