summaryrefslogtreecommitdiff
path: root/emulators/netbsd32_compat16/Makefile
blob: 0a283f6bcfd8fda6d87d14bd3daff2609b55c468 (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
63
64
65
66
# $NetBSD: Makefile,v 1.4 2003/07/17 21:35:39 grant Exp $
#

.if ${MACHINE_ARCH} == "sparc64"
MACHINE32_ARCH=	sparc
.else
MACHINE32_ARCH=	${MACHINE_ARCH}
.endif

DISTNAME=		compat16-${MACHINE32_ARCH}
PKGNAME=		netbsd32_compat16-1.0
CATEGORIES=		emulators
MASTER_SITES=		${MASTER_SITE_LOCAL}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		tech-pkg@NetBSD.org
HOMEPAGE=		http://www.NetBSD.org/Releases/formal-1.6/index.html
COMMENT=		32-bit shared libraries for NetBSD 1.6 (and earlier) compatibility

CONFLICTS=		netbsd32_compat15-[0-9]*

ONLY_FOR_PLATFORM=	NetBSD-*-sparc64

NO_MTREE=		# defined
SHLIB_HANDLING=		NO

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

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

EMULSUBDIR=		emul/netbsd32
COMPAT_LIBDIR=		${PREFIX}/${EMULSUBDIR}/usr/lib
COMPAT_LIBEXECDIR=	${PREFIX}/${EMULSUBDIR}/usr/libexec
COMPAT_XLIBDIR=		${PREFIX}/${EMULSUBDIR}/usr/X11R6/lib

PLIST_SUBST+=		COMPAT_EMULSUBDIR=${EMULSUBDIR}

do-build:
	${SED}	-e "s,@MACHINE_ARCH@,${MACHINE_ARCH},g" \
		-e "s,@COMPAT_EMULSUBDIR@,${COMPAT_EMULSUBDIR},g" \
		-e "s,@LDCONFIG@,${LDCONFIG},g" \
		< ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
	${SED}	-e "s,@MACHINE_ARCH@,${MACHINE_ARCH},g" \
		-e "s,@OBJECT_FMT@,${OBJECT_FMT},g" \
		-e "s,@LDCONFIG@,${LDCONFIG},g" \
		< ${PKGDIR}/INSTALL > ${INSTALL_FILE}

# XXX using pax to copy symlinks properly.
do-install:
	${INSTALL_DATA_DIR} ${COMPAT_LIBDIR}
	${INSTALL_DATA_DIR} ${COMPAT_XLIBDIR}
	${INSTALL_DATA_DIR} ${COMPAT_LIBEXECDIR}
	(cd ${WRKDIR}/usr/lib; pax -rwv lib*.so* i18n/lib*.so* ${COMPAT_LIBDIR})
	(cd ${WRKDIR}/usr/X11R6/lib; pax -rwv lib*.so* ${COMPAT_XLIBDIR})
	(cd ${WRKDIR}/usr/libexec; pax -rwv ld.*so ${COMPAT_LIBEXECDIR})
	chown ${ROOT_USER}:${ROOT_GROUP} \
		${COMPAT_LIBDIR}/lib*.so* ${COMPAT_LIBDIR}/i18n/lib*.so* \
		${COMPAT_XLIBDIR}/lib*.so* ${COMPAT_LIBEXECDIR}/ld.*so
	chmod 555 ${COMPAT_LIBDIR}/lib*.so* ${COMPAT_LIBDIR}/i18n/lib*.so* \
		  ${COMPAT_XLIBDIR}/lib*.so* ${COMPAT_LIBEXECDIR}/ld.*so

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

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