blob: 2a8182c4f91e2c8e409bddc13c0e2497b86407ec (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# $NetBSD: Makefile,v 1.8 2007/03/02 10:35:04 sketch Exp $
DISTNAME= suse_base-${SUSE_VERSION}
PKGREVISION= 3
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SUSE100}
DISTFILES= ${RPMFILES}
MAINTAINER= tonio@NetBSD.org
HOMEPAGE= http://www.suse.com/
COMMENT= Linux compatibility package
CONFLICTS= linux_SuSE-5.3 linux_lib-2.4 linuxppc_lib-[0-9]*
# these files are handled by manually during de-/installation/pkg_add
CHECK_FILES_SKIP+= ${PREFIX}/${EMULSUBDIR}/dev/.*
CHECK_FILES_SKIP+= ${PREFIX}/${EMULSUBDIR}/etc/ld.so.cache
EXTRACT_ONLY= # empty
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
PLIST_SUBST+= EMULSUBDIR=${EMULSUBDIR:Q} LINUX_LIB=${LINUX_LIB:Q}
.if exists(Makefile.${MACHINE_ARCH})
.include "Makefile.${MACHINE_ARCH}"
.endif
RPMIGNOREPATH= ./etc/bash.bashrc ./etc/bash_completion.d \
./etc/cron.daily ./etc/csh.cshrc ./etc/csh.login \
./etc/inittab ./etc/hushlogins ./etc/java \
./etc/mailcap ./etc/mime.types ./etc/nsswitch.conf \
./etc/pam.d ./etc/profile ./etc/profile.dos \
./etc/rc.d.README ./etc/rpc ./etc/shells ./etc/ttytype
LINUX_LDD= ${PREFIX}/${EMULSUBDIR}/usr/bin/ldd
LINUX_LIB?= lib
.include "../../mk/bsd.prefs.mk"
INSTALLATION_DIRS= sbin
do-build:
@for FILE in ${FILESDIR}/SuSE-release ${FILESDIR}/*.sh; do \
${SED} -e 's#@@EMULDIR@@#${EMULDIR}#g' \
-e 's#@@EMULSUBDIR@@#${EMULSUBDIR}#g' \
-e 's#@@LINUX_LIB@@#${LINUX_LIB}#g' \
-e 's#@@VERSION@@#${SUSE_VERSION}#g' \
-e 's#@@ARCH@@#${SUSE_ARCH}#g' \
$$FILE >${WRKDIR}/`basename $$FILE`; \
done
do-install:
for FILE in ${WRKDIR}/*.sh; do \
${INSTALL_SCRIPT} $$FILE ${PREFIX}/sbin/`basename $$FILE .sh`; \
done
${INSTALL_DATA_DIR} ${EMULDIR}/dev
${INSTALL_DATA} /dev/MAKEDEV ${EMULDIR}/dev
if [ -f /dev/MAKEDEV.subr ]; then \
${INSTALL_DATA} /dev/MAKEDEV.subr ${EMULDIR}/dev; \
fi
cd ${EMULDIR}/dev && ${SH} ./MAKEDEV std audio
cd ${EMULDIR}/dev && ${LN} -fs sound dsp
@${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
${RPM2PKG} ${RPM2PKGARGS}
${ECHO} "@dirrm ${EMULSUBDIR}" >>${PLIST_SRC}
${INSTALL_DATA} ${WRKDIR}/SuSE-release ${EMULDIR}/etc
${INSTALL_DATA_DIR} ${EMULDIR}/proc
${LN} -fs ${EMULDIR}/proc/mounts ${EMULDIR}/etc/mtab
.if ${OPSYS} == "FreeBSD"
${BRANDELF} -t Linux ${EMULDIR}/sbin/ldconfig
.endif
${EMULDIR}/sbin/ldconfig -r ${EMULDIR}
${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" \
>>${PLIST_SRC}
${ECHO} "@unexec ${RMDIR} %D/${EMULSUBDIR}/etc 2>/dev/null || ${TRUE}" \
>>${PLIST_SRC}
${SED} -e 's:#! :#! ${EMULDIR}:' \
-e 's:^RTLD=:RTLD=/${EMULSUBDIR}:' \
< ${LINUX_LDD} > ${LINUX_LDD}.new
${MV} ${LINUX_LDD}.new ${LINUX_LDD}
${CHMOD} +x ${LINUX_LDD}
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} - POST-INSTALL
.include "../../emulators/suse100_linux/Makefile.common"
.include "../../mk/bsd.pkg.mk"
|