summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulators/suse_base/Makefile60
-rw-r--r--emulators/suse_base/files/ld.so.conf13
-rw-r--r--emulators/suse_base/files/md56
-rw-r--r--emulators/suse_base/pkg/COMMENT1
-rw-r--r--emulators/suse_base/pkg/DESCR5
-rw-r--r--emulators/suse_base/pkg/INSTALL31
-rw-r--r--emulators/suse_base/pkg/PLIST12
-rw-r--r--emulators/suse_base/scripts/linux-mkpwd.sh18
-rwxr-xr-xemulators/suse_base/scripts/rpm2pkg.sh40
-rw-r--r--emulators/suse_libc5/Makefile38
-rw-r--r--emulators/suse_libc5/files/md53
-rw-r--r--emulators/suse_libc5/pkg/COMMENT1
-rw-r--r--emulators/suse_libc5/pkg/DESCR4
-rw-r--r--emulators/suse_x11/Makefile38
-rw-r--r--emulators/suse_x11/files/md54
-rw-r--r--emulators/suse_x11/pkg/COMMENT1
-rw-r--r--emulators/suse_x11/pkg/DESCR5
17 files changed, 280 insertions, 0 deletions
diff --git a/emulators/suse_base/Makefile b/emulators/suse_base/Makefile
new file mode 100644
index 00000000000..11f9f93a3ac
--- /dev/null
+++ b/emulators/suse_base/Makefile
@@ -0,0 +1,60 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/05/17 00:14:49 tron Exp $
+
+DISTNAME= suse_base-6.1
+CATEGORIES= emulators
+MASTER_SITES= ftp://ftp.suse.com/pub/suse/i386/6.1/suse/a1/
+DISTFILES= aaa_dir.rpm shlibs.rpm ldso.rpm gppshare.rpm
+ONLY_FOR_ARCHS= i386
+
+MAINTAINER= tron@netbsd.org
+HOMEPAGE= http://www.suse.com/
+
+DEPENDS+= rpm-2.5.4:../../misc/rpm
+
+CONFLICTS= linux_SuSE-5.3 linux_lib-2.4
+
+DIST_SUBDIR= suse
+MIRROR_DISTFILE= no
+
+EXTRACT_ONLY= # empty
+NO_PATCH= yes
+NO_CONFIGURE= yes
+NO_WRKSUBDIR= yes
+MANCOMPRESSED= yes
+INSTALL_FILE= ${WRKDIR}/INSTALL
+PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+
+EMULSUBDIR= emul/linux
+EMULDIR= ${PREFIX}/${EMULSUBDIR}
+SBINDIR= ${PREFIX}/sbin
+
+do-build:
+ @for FILE in ${PKGDIR}/INSTALL ${PKGDIR}/PLIST \
+ ${SCRIPTDIR}/*.sh; do \
+ ${SED} -e 's#@@EMULDIR@@#${EMULDIR}#g' \
+ -e 's#@@EMULSUBDIR@@#${EMULSUBDIR}#g' \
+ -e 's#@@PREFIX@@#${PREFIX}#g' \
+ <$$FILE >${WRKDIR}/`basename $$FILE`; \
+ done
+
+do-install:
+ cd ${WRKDIR}; \
+ for FILE in *.sh; do \
+ ${INSTALL_SCRIPT} $$FILE ${SBINDIR}/`basename $$FILE .sh`; \
+ done
+ ${MKDIR} ${EMULDIR}/dev
+ ${LN} -fs /dev/sound ${EMULDIR}/dev/dsp
+ ${LN} -fs /dev/null ${EMULDIR}/dev/null
+ @${CP} ${WRKDIR}/PLIST ${PLIST_SRC}
+ cd ${_DISTDIR} && \
+ ${SBINDIR}/rpm2pkg ${DISTFILES} | \
+ ${EGREP} -v '${EMULSUBDIR}/(tmp|usr/tmp|var)' >>${PLIST_SRC}
+ @cd ${EMULDIR} && ${RM} -rf tmp usr/tmp var
+ ${INSTALL_DATA} ${FILESDIR}/ld.so.conf ${EMULDIR}/etc
+ @${ECHO} "@dirrm ${EMULSUBDIR}" >>${PLIST_SRC}
+ @${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+
+show-shlib-type:
+ @${ECHO} linux-${MACHINE_ARCH}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/suse_base/files/ld.so.conf b/emulators/suse_base/files/ld.so.conf
new file mode 100644
index 00000000000..d1b22a388fb
--- /dev/null
+++ b/emulators/suse_base/files/ld.so.conf
@@ -0,0 +1,13 @@
+/lib-aout
+/usr/X11R6/lib/Xaw95
+/usr/X11R6/lib/Xaw3d
+/usr/X11R6/lib
+/usr/X386/lib
+/usr/i486-linux/lib
+/usr/i486-linux-libc5/lib
+/usr/i486-linux-libc6/lib
+/usr/i486-linuxaout/lib
+/usr/local/lib
+/usr/openwin/lib
+/opt/kde/lib
+/opt/gnome/lib
diff --git a/emulators/suse_base/files/md5 b/emulators/suse_base/files/md5
new file mode 100644
index 00000000000..f37c07b386d
--- /dev/null
+++ b/emulators/suse_base/files/md5
@@ -0,0 +1,6 @@
+$NetBSD: md5,v 1.1.1.1 1999/05/17 00:14:49 tron Exp $
+
+MD5 (suse/aaa_dir.rpm) = 129e6fbea3b8d67e2c980ac8067c75eb
+MD5 (suse/shlibs.rpm) = a391bd3c2c895df9cd418e22aeb32417
+MD5 (suse/ldso.rpm) = 179519045d61126b8fa3a672c3c473d0
+MD5 (suse/gppshare.rpm) = ba47ef35a38ca2a7c9429cf97b166d27
diff --git a/emulators/suse_base/pkg/COMMENT b/emulators/suse_base/pkg/COMMENT
new file mode 100644
index 00000000000..54914db21b8
--- /dev/null
+++ b/emulators/suse_base/pkg/COMMENT
@@ -0,0 +1 @@
+Linux compatibility package
diff --git a/emulators/suse_base/pkg/DESCR b/emulators/suse_base/pkg/DESCR
new file mode 100644
index 00000000000..62e5a3f87e9
--- /dev/null
+++ b/emulators/suse_base/pkg/DESCR
@@ -0,0 +1,5 @@
+Linux compatibility package based on the SuSE Linux distribution, take a
+look at "http://www.suse.com/" for more information about it.
+
+This package supports running ELF binaries linked with glibc2 which don't
+require X11 shared libraries.
diff --git a/emulators/suse_base/pkg/INSTALL b/emulators/suse_base/pkg/INSTALL
new file mode 100644
index 00000000000..090c256c2b7
--- /dev/null
+++ b/emulators/suse_base/pkg/INSTALL
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+#
+
+PKGNAME=$1
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+ POST-INSTALL)
+ if [ ! -e /emul/linux ] || \
+ [ "`cd /emul/linux && ls -di .`" != \
+ "`cd @@EMULDIR@@ && ls -di`" ]
+ then
+ echo "===> Please note the following:"
+ echo ""
+ echo -n "You must create a link \"/emul/linux\" "
+ echo "pointing to \"@@EMULDIR@@\""
+ echo "to be able to use this package."
+ echo ""
+ fi
+ @@EMULDIR@@/sbin/ldconfig -r @@EMULDIR@@
+ ;;
+ *)
+ echo "Unexpected Argument ${2}."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/emulators/suse_base/pkg/PLIST b/emulators/suse_base/pkg/PLIST
new file mode 100644
index 00000000000..f3de604900c
--- /dev/null
+++ b/emulators/suse_base/pkg/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+sbin/linux-mkpwd
+sbin/rpm2pkg
+@unexec rm -f %D/@@EMULSUBDIR@@/etc/ld.so.cache
+@@EMULSUBDIR@@/etc/ld.so.conf
+@unexec cd %D/@@EMULSUBDIR@@/etc && rm -f group gshadow passwd shadow
+@exec mkdir -p %D/@@EMULSUBDIR@@/dev
+@exec ln -s /dev/sound %D/@@EMULSUBDIR@@/dev/dsp
+@unexec rm -f %D/@@EMULSUBDIR@@/dev/dsp
+@exec ln -s /dev/null %D/@@EMULSUBDIR@@/dev/null
+@unexec rm -f %D/@@EMULSUBDIR@@/dev/null
+@dirrm @@EMULSUBDIR@@/dev
diff --git a/emulators/suse_base/scripts/linux-mkpwd.sh b/emulators/suse_base/scripts/linux-mkpwd.sh
new file mode 100644
index 00000000000..09ca7ae717e
--- /dev/null
+++ b/emulators/suse_base/scripts/linux-mkpwd.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $NetBSD: linux-mkpwd.sh,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+
+SRCDIR=/etc
+DESTDIR=@@EMULDIR@@/etc
+
+umask 22
+cd $DESTDIR
+cp $SRCDIR/passwd .
+sed s/^wheel:/root:/ <$SRCDIR/group >group
+
+umask 77
+awk -F: '{print($1":"$2":0:0:10000::::")}' <$SRCDIR/master.passwd >shadow
+sed s/^wheel:/root:/ <$SRCDIR/group |
+awk -F: '{print($1":*:root:root")}' >gshadow
+
+exit 0
diff --git a/emulators/suse_base/scripts/rpm2pkg.sh b/emulators/suse_base/scripts/rpm2pkg.sh
new file mode 100755
index 00000000000..15657c7ffb8
--- /dev/null
+++ b/emulators/suse_base/scripts/rpm2pkg.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+export PATH=/bin:/usr/bin:@@PREFIX@@/bin
+
+TMPDIR=/tmp/.rpm.$$.`date +%s`
+PLIST=$TMPDIR/PLIST
+
+if ! rm -rf $PLIST $TMPDIR
+then
+ exit 1
+fi
+if ! mkdir -p $TMPDIR/@@EMULSUBDIR@@
+then
+ exit 1
+fi
+
+for RPM
+do
+ rpm2cpio $RPM | (cd $TMPDIR/@@EMULSUBDIR@@; cpio -i -d 2>/dev/null)
+done
+
+(cd $TMPDIR
+ find @@EMULSUBDIR@@/* -type f | sort
+ find @@EMULSUBDIR@@/* -type d | sort | awk '{print("@exec mkdir -p %D/"$1)}'
+ find @@EMULSUBDIR@@/* -type l | sort |
+ (while read LINK
+ do
+ set - X `file $LINK`; \
+ echo "@exec ln -s $6 %D/$LINK"
+ echo "@unexec rm -f %D/$LINK"
+ done)
+ find @@EMULSUBDIR@@/* -type d | sort -r |
+ awk '{print("@unexec rmdir %D/"$1" >/dev/null 2>&1 || true")}') >$PLIST
+
+cp -Rp $TMPDIR/@@EMULSUBDIR@@/* @@EMULDIR@@
+
+cat $PLIST
+
+rm -rf $TMPDIR
+exit 0
+
diff --git a/emulators/suse_libc5/Makefile b/emulators/suse_libc5/Makefile
new file mode 100644
index 00000000000..6eeffd9dd81
--- /dev/null
+++ b/emulators/suse_libc5/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+
+DISTNAME= suse_libc5-6.1
+CATEGORIES= emulators
+MASTER_SITES= ftp://ftp.suse.com/pub/suse/i386/6.1/suse/x1/
+DISTFILES= shlibs5.rpm
+ONLY_FOR_ARCHS= i386
+
+MAINTAINER= tron@netbsd.org
+HOMEPAGE= http://www.suse.com/
+
+DEPENDS+= suse_base-6.1:../suse_base
+
+DIST_SUBDIR= suse
+MIRROR_DISTFILE= no
+
+EXTRACT_ONLY= # empty
+NO_BUILD= yes
+NO_PATCH= yes
+NO_CONFIGURE= yes
+NO_WRKSUBDIR= yes
+MANCOMPRESSED= yes
+PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+
+EMULSUBDIR= emul/linux
+EMULDIR= ${PREFIX}/${EMULSUBDIR}
+SBINDIR= ${PREFIX}/sbin
+
+do-install:
+ cd ${_DISTDIR} && \
+ ${SBINDIR}/rpm2pkg ${DISTFILES} >${PLIST_SRC}
+ @${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_SRC}
+ ${EMULDIR}/sbin/ldconfig -r ${EMULDIR} || ${TRUE}
+
+show-shlib-type:
+ @${ECHO} linux-${MACHINE_ARCH}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/suse_libc5/files/md5 b/emulators/suse_libc5/files/md5
new file mode 100644
index 00000000000..4e941db0f33
--- /dev/null
+++ b/emulators/suse_libc5/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+
+MD5 (suse/shlibs5.rpm) = f5dbf3e8c18fb397df34f70016c44885
diff --git a/emulators/suse_libc5/pkg/COMMENT b/emulators/suse_libc5/pkg/COMMENT
new file mode 100644
index 00000000000..7f691823be7
--- /dev/null
+++ b/emulators/suse_libc5/pkg/COMMENT
@@ -0,0 +1 @@
+Linux compatibility package for libc5 binaries
diff --git a/emulators/suse_libc5/pkg/DESCR b/emulators/suse_libc5/pkg/DESCR
new file mode 100644
index 00000000000..65e048cff26
--- /dev/null
+++ b/emulators/suse_libc5/pkg/DESCR
@@ -0,0 +1,4 @@
+Linux compatibility package based on the SuSE Linux distribution, take a
+look at "http://www.suse.com/" for more information about it.
+
+This package supports running ELF binaries linked with libc5.
diff --git a/emulators/suse_x11/Makefile b/emulators/suse_x11/Makefile
new file mode 100644
index 00000000000..b2677c71bc6
--- /dev/null
+++ b/emulators/suse_x11/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+
+DISTNAME= suse_x11-6.1
+CATEGORIES= emulators
+MASTER_SITES= ftp://ftp.suse.com/pub/suse/i386/6.1/suse/x1/
+DISTFILES= xshared.rpm xpm.rpm
+ONLY_FOR_ARCHS= i386
+
+MAINTAINER= tron@netbsd.org
+HOMEPAGE= http://www.suse.com/
+
+DEPENDS+= suse_base-6.1:../suse_base
+
+DIST_SUBDIR= suse
+MIRROR_DISTFILE= no
+
+EXTRACT_ONLY= # empty
+NO_BUILD= yes
+NO_PATCH= yes
+NO_CONFIGURE= yes
+NO_WRKSUBDIR= yes
+MANCOMPRESSED= yes
+PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+
+EMULSUBDIR= emul/linux
+EMULDIR= ${PREFIX}/${EMULSUBDIR}
+SBINDIR= ${PREFIX}/sbin
+
+do-install:
+ cd ${_DISTDIR} && \
+ ${SBINDIR}/rpm2pkg ${DISTFILES} >${PLIST_SRC}
+ @${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_SRC}
+ ${EMULDIR}/sbin/ldconfig -r ${EMULDIR} || ${TRUE}
+
+show-shlib-type:
+ @${ECHO} linux-${MACHINE_ARCH}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/suse_x11/files/md5 b/emulators/suse_x11/files/md5
new file mode 100644
index 00000000000..6cd7210f94c
--- /dev/null
+++ b/emulators/suse_x11/files/md5
@@ -0,0 +1,4 @@
+$NetBSD: md5,v 1.1.1.1 1999/05/17 00:14:50 tron Exp $
+
+MD5 (suse/xshared.rpm) = e7a5f14189ff2bed28cfbbf43c36fff4
+MD5 (suse/xpm.rpm) = 8ae87d1c811b341fdb507bd82e3c0d40
diff --git a/emulators/suse_x11/pkg/COMMENT b/emulators/suse_x11/pkg/COMMENT
new file mode 100644
index 00000000000..992632f16ca
--- /dev/null
+++ b/emulators/suse_x11/pkg/COMMENT
@@ -0,0 +1 @@
+Linux compatibility package for X11 binaries
diff --git a/emulators/suse_x11/pkg/DESCR b/emulators/suse_x11/pkg/DESCR
new file mode 100644
index 00000000000..023c56f39b1
--- /dev/null
+++ b/emulators/suse_x11/pkg/DESCR
@@ -0,0 +1,5 @@
+Linux compatibility package based on the SuSE Linux distribution, take a
+look at "http://www.suse.com/" for more information about it.
+
+This package supports running ELF binaries linked with glibc2 which require
+X11 shared libraries.