summaryrefslogtreecommitdiff
path: root/emulators/netbsd32_compat15/Makefile
blob: a9469017cd975fa7ab85948f1a3bbdc0525b1de7 (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
# $NetBSD: Makefile,v 1.10 2003/11/23 05:22:34 grant Exp $
#

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

DISTNAME=		compat15-${MACHINE32_ARCH}
PKGNAME=		netbsd32_compat15-1.0
CATEGORIES=		emulators
MASTER_SITES=		${MASTER_SITE_LOCAL}

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

CONFLICTS=              netbsd32_compat16-[0-9]*

ONLY_FOR_PLATFORM=	NetBSD-*-sparc64

NO_MTREE=		# defined
NO_BUILD=		# defined
SHLIB_HANDLING=		NO
USE_PKGINSTALL=		YES
DEINSTALL_EXTRA_TMPL+=	${.CURDIR}/DEINSTALL
INSTALL_EXTRA_TMPL+=	${.CURDIR}/INSTALL

FILES_SUBST+=		COMPAT_LIBEXECDIR=${COMPAT_LIBEXECDIR}
FILES_SUBST+=		COMPAT_LIBDIR=${COMPAT_LIBDIR}
FILES_SUBST+=		COMPAT_XLIBDIR=${COMPAT_XLIBDIR}
FILES_SUBST+=		MACHINE_ARCH=${MACHINE_ARCH}
FILES_SUBST+=		OBJECT_FMT=${OBJECT_FMT}
FILES_SUBST+=		LDCONFIG=${LDCONFIG}

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

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

PLIST_SUBST+=		COMPAT_LIBDIR=${COMPAT_LIBDIR} COMPAT_LIBEXECDIR=${COMPAT_LIBEXECDIR} COMPAT_XLIBDIR=${COMPAT_XLIBDIR}

# XXX using pax to copy symlinks properly.
do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/${COMPAT_LIBDIR}
	(cd ${WRKDIR}/lib; pax -rwv lib*.so* ${PREFIX}/${COMPAT_LIBDIR}; \
	 ${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${PREFIX}/${COMPAT_LIBDIR}/lib*.so*; \
	 ${CHMOD} 555 ${PREFIX}/${COMPAT_LIBDIR}/lib*.so* )
	if [ -d ${WRKDIR}/X11R6/lib ]; then \
		${INSTALL_DATA_DIR} ${PREFIX}/${COMPAT_XLIBDIR}; \
		(cd ${WRKDIR}/X11R6/lib; pax -rwv lib*.so* ${PREFIX}/${COMPAT_XLIBDIR}; \
		 ${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${PREFIX}/${COMPAT_XLIBDIR}/lib*.so*; \
		 ${CHMOD} 555 ${PREFIX}/${COMPAT_XLIBDIR}/lib*.so* ) \
	fi
	if [ -d ${WRKDIR}/libexec ]; then \
		${INSTALL_DATA_DIR} ${PREFIX}/${COMPAT_LIBEXECDIR}; \
		(cd ${WRKDIR}/libexec; pax -rwv ld.*so ${PREFIX}/${COMPAT_LIBEXECDIR}; \
		 ${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${PREFIX}/${COMPAT_LIBEXECDIR}/ld.*so; \
		 ${CHMOD} 555 ${PREFIX}/${COMPAT_LIBEXECDIR}/ld.*so ) \
	fi

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