summaryrefslogtreecommitdiff
path: root/pkgtools/xpkgwedge/Makefile
blob: a13164e7d06b2c691ecf8d4ba99068665391d94c (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
52
53
54
55
56
57
58
59
60
61
62
# $NetBSD: Makefile,v 1.18 2001/01/18 17:05:50 jlam Exp $
#

DISTNAME=	xpkgwedge-1.1
CATEGORIES=	pkgtools devel x11
MASTER_SITES=	# empty
DISTFILES=	# empty

MAINTAINER=	jlam@netbsd.org
HOMEPAGE=	http://www.netbsd.org/Documentation/netbsd/Packages.txt

EXTRACT_ONLY=	# empty
NO_CONFIGURE=	# defined
NO_WRKSUBDIR=	# defined
NO_CHECKSUM=	# defined

DEINSTALL_FILE=	${WRKDIR}/DEINSTALL
INSTALL_FILE=	${WRKDIR}/INSTALL
MESSAGE_FILE=	${WRKDIR}/MESSAGE

.include "../../mk/bsd.prefs.mk"

.if (${OPSYS} == SunOS)
DEPENDS+=	diffutils>=2.7:../../devel/diffutils
DIFF=		${LOCALBASE}/bin/gdiff
.else
DIFF=		/usr/bin/diff
.endif

pre-extract:
	@if [ ! -f ${X11BASE}/include/X11/X.h ]; then \
		${ECHO} 'xpkgwedge requires $$X11BASE to point to the real X distribution.'; \
		${ECHO} 'If you are setting this variable in mk.conf, fix or remove the setting'; \
		${ECHO} 'and then install xpkgwedge.'; \
		${FALSE}; \
	fi

do-build:
	${SED}  -e "s,@X11BASE@,${X11BASE},g" \
		-e "s,@PREFIX@,${PREFIX},g" \
		< ${FILESDIR}/pkgxmkmf.in > ${WRKDIR}/pkgxmkmf
	${SED}	-e "s,@X11BASE@,${X11BASE},g" \
		-e "s,@DIFF@,${DIFF},g" \
		< ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
	${SED}	-e "s,@X11BASE@,${X11BASE},g" \
		< ${PKGDIR}/INSTALL > ${INSTALL_FILE}
	${SED}	-e "s,@PREFIX@,${PREFIX},g" \
		< ${PKGDIR}/MESSAGE.pre > ${MESSAGE_FILE}

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/config
	${INSTALL_DATA} ${FILESDIR}/xpkgwedge.def ${PREFIX}/lib/X11/config
	${INSTALL_SCRIPT} ${WRKSRC}/pkgxmkmf ${PREFIX}/bin/pkgxmkmf

post-install:
	PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL

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

# Clear the build dependencies list so that xpkgwedge will not be recursively
# dependent on itself.
BUILD_DEPENDS=