diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2004-04-14 11:31:10 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2004-04-14 11:31:10 +0000 |
commit | e7362f2eb5a373f7c0e94b1c94251fbbbc20dacc (patch) | |
tree | 63eb7e42e288c64dc40c4af6aa03e3ca2d3c5999 /emulators/suse_base | |
parent | 0e49f1e2b411eca90f824d9749ad67350af95d1a (diff) | |
download | pkgsrc-e7362f2eb5a373f7c0e94b1c94251fbbbc20dacc.tar.gz |
Add FreeBSD support for suse linux packages, from Michal Pasternak in
PR pkg/23900.
Diffstat (limited to 'emulators/suse_base')
-rw-r--r-- | emulators/suse_base/INSTALL | 56 | ||||
-rw-r--r-- | emulators/suse_base/Makefile | 8 |
2 files changed, 52 insertions, 12 deletions
diff --git a/emulators/suse_base/INSTALL b/emulators/suse_base/INSTALL index eedbd298ff0..5b55be3a78e 100644 --- a/emulators/suse_base/INSTALL +++ b/emulators/suse_base/INSTALL @@ -1,31 +1,65 @@ #!/bin/sh -# $NetBSD: INSTALL,v 1.3 2003/05/06 17:41:10 jmmv Exp $ +# $NetBSD: INSTALL,v 1.4 2004/04/14 11:31:10 xtraeme Exp $ -emul=linux if [ "$2" != "POST-INSTALL" ]; then exit 0; fi +emul=linux +OPSYS=`/usr/bin/uname -s` cat <<EOF ============================================================================== -Do not forget to include COMPAT_LINUX (and EXEC_ELF32 on NetBSD systems older -than 1.5) in your kernel configuration file. (Linux binaries require these -options in order to work.) EOF -if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \ - "`cd / && cd /emul/$emul 2>/dev/null && pwd -P`" ]; then - if [ -e /emul/$emul -o -L /emul/$emul ] || \ - [ \( -e /emul -o -L /emul \) -a ! -d /emul ]; then +if [ "$OPSYS" = "NetBSD" ]; then + cat <<-EOF + Do not forget to include COMPAT_LINUX (and EXEC_ELF32 on NetBSD systems older + than 1.5) in your kernel configuration file. (Linux binaries require these + options in order to work.) + EOF +fi + +if [ "$OPSYS" = "FreeBSD" ]; then + cat <<-EOF + Do not forget to include COMPAT_LINUX in your kernel configuration file. + You also need to load "linux.ko" kernel module (using kldload(8) or by + setting linux_enable="yes" in /etc/rc.conf. + EOF +fi + +if [ "$OPSYS" = "NetBSD" ]; then + if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \ + "`cd / && cd /emul/$emul 2>/dev/null && pwd -P`" ]; then + if [ -e /emul/$emul -o -L /emul/$emul ] || \ + [ \( -e /emul -o -L /emul \) -a ! -d /emul ]; then cat <<-EOF IMPORTANT: You must create a symbolic link from /emul/$emul to ${PKG_PREFIX}/emul/$emul in order for this package to work properly. (It seems there is something else located at /emul/$emul.) EOF - else + else mkdir -p /emul ln -sf ${PKG_PREFIX}/emul/$emul /emul/$emul - fi + fi + fi +fi + +if [ "$OPSYS" = "FreeBSD" ]; then + if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \ + "`cd / && cd /compat/$emul 2>/dev/null && pwd -P`" ]; then + if [ -e /compat/$emul -o -L /compat/$emul ] || \ + [ \( -e /compat -o -L /compat \) -a ! -d /compat ]; then + cat <<-EOF + + IMPORTANT: You must create a symbolic link from /compat/$emul to + ${PKG_PREFIX}/emul/$emul in order for this package to work properly. + (It seems there is something else located at /compat/$emul.) + EOF + else + mkdir -p /compat + ln -sf ${PKG_PREFIX}/emul/$emul /compat/$emul + fi + fi fi cat <<EOF diff --git a/emulators/suse_base/Makefile b/emulators/suse_base/Makefile index 8aeebe7ce72..ccdcde81cd0 100644 --- a/emulators/suse_base/Makefile +++ b/emulators/suse_base/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2004/02/19 11:37:11 cjs Exp $ +# $NetBSD: Makefile,v 1.47 2004/04/14 11:31:10 xtraeme Exp $ DISTNAME= suse_base-${SUSE_VERSION} PKGREVISION= 5 @@ -16,6 +16,7 @@ ONLY_FOR_PLATFORM= NetBSD-1.5Z[C-Z]-i386 NetBSD-1.6*-i386 ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-i386 ONLY_FOR_PLATFORM+= NetBSD-1.6[L-Z]-powerpc NetBSD-1.6Z[A-Z]-powerpc ONLY_FOR_PLATFORM+= NetBSD-1.[7-9]*-powerpc NetBSD-[2-9]*-powerpc +ONLY_FOR_PLATFORM+= FreeBSD-*-i386 USE_BUILDLINK2= # defined EXTRACT_ONLY= # empty @@ -38,6 +39,8 @@ RPMIGNOREPATH= tmp usr/tmp var LINUX_LDD= ${PREFIX}/${EMULSUBDIR}/usr/bin/ldd +.include "../../mk/bsd.prefs.mk" + do-build: @for FILE in ${PKGDIR}/PLIST ${FILESDIR}/*.sh; do \ ${SED} -e 's#@@EMULDIR@@#${EMULDIR}#g' \ @@ -61,6 +64,9 @@ do-install: ${ECHO} "@dirrm ${EMULSUBDIR}" >>${PLIST_SRC} ${INSTALL_DATA} ${WRKDIR}/SuSE-release ${EMULDIR}/etc ${INSTALL_DATA} ${FILESDIR}/ld.so.conf ${EMULDIR}/etc +.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} |