aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/linux_base-gentoo-stage2/Makefile71
-rw-r--r--emulators/linux_base-gentoo-stage2/distinfo9
-rw-r--r--emulators/linux_base-gentoo-stage2/pkg-deinstall36
-rw-r--r--emulators/linux_base-gentoo-stage2/pkg-descr3
-rw-r--r--emulators/linux_base-gentoo-stage2/pkg-install43
-rw-r--r--emulators/linux_base-gentoo-stage2/pkg-message16
-rw-r--r--emulators/linux_dist-gentoo-stage2/Makefile71
-rw-r--r--emulators/linux_dist-gentoo-stage2/distinfo9
-rw-r--r--emulators/linux_dist-gentoo-stage2/pkg-deinstall36
-rw-r--r--emulators/linux_dist-gentoo-stage2/pkg-descr3
-rw-r--r--emulators/linux_dist-gentoo-stage2/pkg-install43
-rw-r--r--emulators/linux_dist-gentoo-stage2/pkg-message16
13 files changed, 357 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 8e7a4591b69b..9039877e8021 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -70,6 +70,7 @@
SUBDIR += linux_base-fc3
SUBDIR += linux_base-fc4
SUBDIR += linux_base-gentoo-stage1
+ SUBDIR += linux_base-gentoo-stage2
SUBDIR += linux_base-rh-9
SUBDIR += linux_base-suse-9.1
SUBDIR += linux_base-suse-9.2
diff --git a/emulators/linux_base-gentoo-stage2/Makefile b/emulators/linux_base-gentoo-stage2/Makefile
new file mode 100644
index 000000000000..6e50ec14b6d7
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/Makefile
@@ -0,0 +1,71 @@
+# New ports collection makefile for: linux_base-gentoo-stage2
+# Date created: 11 May 2006
+# Whom: Gabor Kovesdan
+#
+# $FreeBSD$
+
+PORTNAME= linux_base-gentoo-stage2
+PORTVERSION= 2006.0
+CATEGORIES= emulators linux
+MASTER_SITES= ${MASTER_SITE_GENTOO}
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+
+MAINTAINER= gkovesdan@t-hosting.hu
+COMMENT= Files from Gentoo distribution, for Linux compatibility
+
+RESTRICTED= binaries licensed under GNU GPL without accompanying source
+
+CONFLICTS= linux_base-7* linux_base-8* linux_base-debian* \
+ linux_base-rh* linux_base-suse* linux_base-fc* \
+ linux_base-gentoo-stage[13]-*
+
+DIST_SUBDIR= gentoo-linux
+NO_BUILD= YES
+NO_FILTER_SHLIBS= YES
+NO_MTREE= YES
+ONLY_FOR_ARCHS= i386 amd64
+PLIST= ${WRKDIR}/pkg-plist
+PREFIX= ${LINUXBASE}
+USE_BZIP2= YES
+GENTOO_OPTIMIZED?= x86
+
+.include <bsd.port.pre.mk>
+
+.if (${GENTOO_OPTIMIZED} == "i586" || ${GENTOO_OPTIMIZED} == "i686")
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+DISTNAME= stage2-${GENTOO_OPTIMIZED}-${PORTVERSION}
+.else
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+DISTNAME= stage2-x86-${PORTVERSION}
+.endif
+
+pre-fetch:
+ @${ECHO_MSG} "You can select your processor class for installing optimized"
+ @${ECHO_MSG} "Gentoo binaries with setting this knob"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "GENTOO_OPTIMIZED=[x86|i586|i686]."
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "The default is x86 for 386/486 compatibility."
+
+do-extract:
+ @${MKDIR} ${WRKSRC}
+ @${TAR} --exclude=./dev --exclude=./proc -xpy -C ${WRKSRC} \
+ -f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ @${ECHO_CMD} etc/resolv.conf > ${PLIST}
+ @cd ${WRKSRC} && ${FIND} * -type f -o -type l >> ${PLIST} \
+ && ${FIND} * -type d | ${SORT} -r | ${SED} -e 's:^:@dirrm :' \
+ >> ${PLIST}
+ @${RM} -fr ${WRKSRC}
+
+do-install:
+ @${MKDIR} ${PREFIX}
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
+ -f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ @${FIND} ${PREFIX} \! -path "/compat/linux/proc*" -type d -exec ${CHMOD} 755 \{\} \;
+ @${CP} -p /etc/resolv.conf ${PREFIX}/etc/
+ @${BRANDELF} -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/emulators/linux_base-gentoo-stage2/distinfo b/emulators/linux_base-gentoo-stage2/distinfo
new file mode 100644
index 000000000000..f5cafba1c219
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/distinfo
@@ -0,0 +1,9 @@
+MD5 (gentoo-linux/stage2-x86-2006.0.tar.bz2) = c36cc65283aa5dc3314bda062390433a
+SHA256 (gentoo-linux/stage2-x86-2006.0.tar.bz2) = ae767f917406edd911d1dcf7dfc95dae988c667c284dd4da8fbc4fc241970c96
+SIZE (gentoo-linux/stage2-x86-2006.0.tar.bz2) = 44466972
+MD5 (gentoo-linux/stage2-i586-2006.0.tar.bz2) = 6c978bfc9cb1a7e8be7ad8405828fcd4
+SHA256 (gentoo-linux/stage2-i586-2006.0.tar.bz2) = af3cec719a3171827b32ebe56e52ef21123d80c947ccd55378b0e934034f6ff4
+SIZE (gentoo-linux/stage2-i586-2006.0.tar.bz2) = 45699633
+MD5 (gentoo-linux/stage2-i686-2006.0.tar.bz2) = eab1523bd266d756e8ac7fa3f32a369a
+SHA256 (gentoo-linux/stage2-i686-2006.0.tar.bz2) = f5206711b89f6f3025c56a0134fb74b8fa3ced7e49a6f93186168c961102d4df
+SIZE (gentoo-linux/stage2-i686-2006.0.tar.bz2) = 45863137
diff --git a/emulators/linux_base-gentoo-stage2/pkg-deinstall b/emulators/linux_base-gentoo-stage2/pkg-deinstall
new file mode 100644
index 000000000000..02474ddf3347
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/pkg-deinstall
@@ -0,0 +1,36 @@
+#!/bin/sh
+# a deinstallation script for linux_base
+
+case "$2" in
+DEINSTALL)
+ if [ -n "`mount | grep ^linproc`" ] || \
+ [ -d /compat/linux/proc ]; then
+ echo ""
+ echo "You may need to do by hands:"
+ echo " o unmount linprocfs;"
+ echo " o delete ${PKG_PREFIX}/proc;"
+ echo " o remove the description of linprocfs from /etc/fstab."
+ echo ""
+ fi
+ ;;
+esac
+
+exit 0
+#!/bin/sh
+# a deinstallation script for linux_base
+
+case "$2" in
+DEINSTALL)
+ if [ -n "`mount | grep ^linproc`" ] || \
+ [ -d /compat/linux/proc ]; then
+ echo ""
+ echo "You may need to do by hands:"
+ echo " o unmount linprocfs;"
+ echo " o delete ${PKG_PREFIX}/proc;"
+ echo " o remove the description of linprocfs from /etc/fstab."
+ echo ""
+ fi
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_base-gentoo-stage2/pkg-descr b/emulators/linux_base-gentoo-stage2/pkg-descr
new file mode 100644
index 000000000000..afb82b0f32b8
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/pkg-descr
@@ -0,0 +1,3 @@
+This port installs the stage2 distribution of Gentoo Linux.
+
+WWW: http://www.gentoo.org/
diff --git a/emulators/linux_base-gentoo-stage2/pkg-install b/emulators/linux_base-gentoo-stage2/pkg-install
new file mode 100644
index 000000000000..4cd4941ac58b
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/pkg-install
@@ -0,0 +1,43 @@
+#!/bin/sh
+# an installation script for linux_base
+
+case "$2" in
+PRE-INSTALL)
+ if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
+ echo 'Linux mode is not enabled.'
+ echo 'Loading linux kernel module now...'
+ if ! kldload linux; then
+ echo 'The linux kernel module could not be loaded.'
+ echo 'Please enable linux mode manually and retry.'
+ exit 1
+ fi
+ fi
+ ;;
+POST-INSTALL)
+ if [ -z "`grep ^linproc /etc/fstab`" ]; then
+ echo ''
+ echo '+++ Some programs may need the linprocfs, please add it to /etc/fstab! +++'
+ else
+ if [ -z "`mount | grep -w ^linprocfs`" ]; then
+ echo ''
+ echo '+++ Please mount linprocfs manually! +++'
+ fi
+ fi
+ if [ ! -f ${PKG_PREFIX}/etc/nsswitch.conf ]; then
+ cp ${PKG_PREFIX}/etc/nsswitch.conf.dist \
+ ${PKG_PREFIX}/etc/nsswitch.conf
+ fi
+ if [ ! -f ${PKG_PREFIX}/etc/yp.conf ]; then
+ cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
+ fi
+#
+# This is needed for updating to ensure that
+# already installed libraries get to ${PKG_PREFIX}/etc/ld.so.cache
+#
+ echo ''
+ echo 'Running linux ldconfig...'
+ ${PKG_PREFIX}/sbin/ldconfig -r ${PKG_PREFIX}
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_base-gentoo-stage2/pkg-message b/emulators/linux_base-gentoo-stage2/pkg-message
new file mode 100644
index 000000000000..d7f5863ae088
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage2/pkg-message
@@ -0,0 +1,16 @@
+* The port/package has attempted to enable Linux compatibility mode by loading
+* the linux.ko kernel module. You can load the module manually as root with the
+* command "kldload linux" or have it load automatically at boot time by adding
+* to /etc/rc.conf the line:
+*
+* linux_enable="YES"
+*
+* You may wish to enable emulation of the Linux proc filesystem. See the
+* linprocfs(5) man page.
+*
+* To download Portage, do "chroot /compat/linux emerge sync" as root. Then you
+* may want to do "chroot /compat/linux /usr/portage/scripts/bootstrap.sh" to
+* rebuild binutils, gcc, gettext, and glibc. See
+* <URL:http://www.gentoo.org/doc/en/gentoo-alpha-install.xml> or
+* <URL:http://www.gentoo.org/doc/en/gentoo-x86-install.xml> for more complete
+* instructions.
diff --git a/emulators/linux_dist-gentoo-stage2/Makefile b/emulators/linux_dist-gentoo-stage2/Makefile
new file mode 100644
index 000000000000..6e50ec14b6d7
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/Makefile
@@ -0,0 +1,71 @@
+# New ports collection makefile for: linux_base-gentoo-stage2
+# Date created: 11 May 2006
+# Whom: Gabor Kovesdan
+#
+# $FreeBSD$
+
+PORTNAME= linux_base-gentoo-stage2
+PORTVERSION= 2006.0
+CATEGORIES= emulators linux
+MASTER_SITES= ${MASTER_SITE_GENTOO}
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+
+MAINTAINER= gkovesdan@t-hosting.hu
+COMMENT= Files from Gentoo distribution, for Linux compatibility
+
+RESTRICTED= binaries licensed under GNU GPL without accompanying source
+
+CONFLICTS= linux_base-7* linux_base-8* linux_base-debian* \
+ linux_base-rh* linux_base-suse* linux_base-fc* \
+ linux_base-gentoo-stage[13]-*
+
+DIST_SUBDIR= gentoo-linux
+NO_BUILD= YES
+NO_FILTER_SHLIBS= YES
+NO_MTREE= YES
+ONLY_FOR_ARCHS= i386 amd64
+PLIST= ${WRKDIR}/pkg-plist
+PREFIX= ${LINUXBASE}
+USE_BZIP2= YES
+GENTOO_OPTIMIZED?= x86
+
+.include <bsd.port.pre.mk>
+
+.if (${GENTOO_OPTIMIZED} == "i586" || ${GENTOO_OPTIMIZED} == "i686")
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+DISTNAME= stage2-${GENTOO_OPTIMIZED}-${PORTVERSION}
+.else
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
+DISTNAME= stage2-x86-${PORTVERSION}
+.endif
+
+pre-fetch:
+ @${ECHO_MSG} "You can select your processor class for installing optimized"
+ @${ECHO_MSG} "Gentoo binaries with setting this knob"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "GENTOO_OPTIMIZED=[x86|i586|i686]."
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "The default is x86 for 386/486 compatibility."
+
+do-extract:
+ @${MKDIR} ${WRKSRC}
+ @${TAR} --exclude=./dev --exclude=./proc -xpy -C ${WRKSRC} \
+ -f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ @${ECHO_CMD} etc/resolv.conf > ${PLIST}
+ @cd ${WRKSRC} && ${FIND} * -type f -o -type l >> ${PLIST} \
+ && ${FIND} * -type d | ${SORT} -r | ${SED} -e 's:^:@dirrm :' \
+ >> ${PLIST}
+ @${RM} -fr ${WRKSRC}
+
+do-install:
+ @${MKDIR} ${PREFIX}
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
+ -f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ @${FIND} ${PREFIX} \! -path "/compat/linux/proc*" -type d -exec ${CHMOD} 755 \{\} \;
+ @${CP} -p /etc/resolv.conf ${PREFIX}/etc/
+ @${BRANDELF} -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/emulators/linux_dist-gentoo-stage2/distinfo b/emulators/linux_dist-gentoo-stage2/distinfo
new file mode 100644
index 000000000000..f5cafba1c219
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/distinfo
@@ -0,0 +1,9 @@
+MD5 (gentoo-linux/stage2-x86-2006.0.tar.bz2) = c36cc65283aa5dc3314bda062390433a
+SHA256 (gentoo-linux/stage2-x86-2006.0.tar.bz2) = ae767f917406edd911d1dcf7dfc95dae988c667c284dd4da8fbc4fc241970c96
+SIZE (gentoo-linux/stage2-x86-2006.0.tar.bz2) = 44466972
+MD5 (gentoo-linux/stage2-i586-2006.0.tar.bz2) = 6c978bfc9cb1a7e8be7ad8405828fcd4
+SHA256 (gentoo-linux/stage2-i586-2006.0.tar.bz2) = af3cec719a3171827b32ebe56e52ef21123d80c947ccd55378b0e934034f6ff4
+SIZE (gentoo-linux/stage2-i586-2006.0.tar.bz2) = 45699633
+MD5 (gentoo-linux/stage2-i686-2006.0.tar.bz2) = eab1523bd266d756e8ac7fa3f32a369a
+SHA256 (gentoo-linux/stage2-i686-2006.0.tar.bz2) = f5206711b89f6f3025c56a0134fb74b8fa3ced7e49a6f93186168c961102d4df
+SIZE (gentoo-linux/stage2-i686-2006.0.tar.bz2) = 45863137
diff --git a/emulators/linux_dist-gentoo-stage2/pkg-deinstall b/emulators/linux_dist-gentoo-stage2/pkg-deinstall
new file mode 100644
index 000000000000..02474ddf3347
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/pkg-deinstall
@@ -0,0 +1,36 @@
+#!/bin/sh
+# a deinstallation script for linux_base
+
+case "$2" in
+DEINSTALL)
+ if [ -n "`mount | grep ^linproc`" ] || \
+ [ -d /compat/linux/proc ]; then
+ echo ""
+ echo "You may need to do by hands:"
+ echo " o unmount linprocfs;"
+ echo " o delete ${PKG_PREFIX}/proc;"
+ echo " o remove the description of linprocfs from /etc/fstab."
+ echo ""
+ fi
+ ;;
+esac
+
+exit 0
+#!/bin/sh
+# a deinstallation script for linux_base
+
+case "$2" in
+DEINSTALL)
+ if [ -n "`mount | grep ^linproc`" ] || \
+ [ -d /compat/linux/proc ]; then
+ echo ""
+ echo "You may need to do by hands:"
+ echo " o unmount linprocfs;"
+ echo " o delete ${PKG_PREFIX}/proc;"
+ echo " o remove the description of linprocfs from /etc/fstab."
+ echo ""
+ fi
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_dist-gentoo-stage2/pkg-descr b/emulators/linux_dist-gentoo-stage2/pkg-descr
new file mode 100644
index 000000000000..afb82b0f32b8
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/pkg-descr
@@ -0,0 +1,3 @@
+This port installs the stage2 distribution of Gentoo Linux.
+
+WWW: http://www.gentoo.org/
diff --git a/emulators/linux_dist-gentoo-stage2/pkg-install b/emulators/linux_dist-gentoo-stage2/pkg-install
new file mode 100644
index 000000000000..4cd4941ac58b
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/pkg-install
@@ -0,0 +1,43 @@
+#!/bin/sh
+# an installation script for linux_base
+
+case "$2" in
+PRE-INSTALL)
+ if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
+ echo 'Linux mode is not enabled.'
+ echo 'Loading linux kernel module now...'
+ if ! kldload linux; then
+ echo 'The linux kernel module could not be loaded.'
+ echo 'Please enable linux mode manually and retry.'
+ exit 1
+ fi
+ fi
+ ;;
+POST-INSTALL)
+ if [ -z "`grep ^linproc /etc/fstab`" ]; then
+ echo ''
+ echo '+++ Some programs may need the linprocfs, please add it to /etc/fstab! +++'
+ else
+ if [ -z "`mount | grep -w ^linprocfs`" ]; then
+ echo ''
+ echo '+++ Please mount linprocfs manually! +++'
+ fi
+ fi
+ if [ ! -f ${PKG_PREFIX}/etc/nsswitch.conf ]; then
+ cp ${PKG_PREFIX}/etc/nsswitch.conf.dist \
+ ${PKG_PREFIX}/etc/nsswitch.conf
+ fi
+ if [ ! -f ${PKG_PREFIX}/etc/yp.conf ]; then
+ cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
+ fi
+#
+# This is needed for updating to ensure that
+# already installed libraries get to ${PKG_PREFIX}/etc/ld.so.cache
+#
+ echo ''
+ echo 'Running linux ldconfig...'
+ ${PKG_PREFIX}/sbin/ldconfig -r ${PKG_PREFIX}
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_dist-gentoo-stage2/pkg-message b/emulators/linux_dist-gentoo-stage2/pkg-message
new file mode 100644
index 000000000000..d7f5863ae088
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage2/pkg-message
@@ -0,0 +1,16 @@
+* The port/package has attempted to enable Linux compatibility mode by loading
+* the linux.ko kernel module. You can load the module manually as root with the
+* command "kldload linux" or have it load automatically at boot time by adding
+* to /etc/rc.conf the line:
+*
+* linux_enable="YES"
+*
+* You may wish to enable emulation of the Linux proc filesystem. See the
+* linprocfs(5) man page.
+*
+* To download Portage, do "chroot /compat/linux emerge sync" as root. Then you
+* may want to do "chroot /compat/linux /usr/portage/scripts/bootstrap.sh" to
+* rebuild binutils, gcc, gettext, and glibc. See
+* <URL:http://www.gentoo.org/doc/en/gentoo-alpha-install.xml> or
+* <URL:http://www.gentoo.org/doc/en/gentoo-x86-install.xml> for more complete
+* instructions.