aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2006-05-10 12:16:21 +0000
committerErwin Lansing <erwin@FreeBSD.org>2006-05-10 12:16:21 +0000
commit7203c5e214e66c912fbd479962279b31d45568ea (patch)
tree2f1edb0770749dc3c09732aea7ce94dbdb82dc11 /emulators
parent940c71f6d1c4e4297579af52552604ef9a45672d (diff)
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/linux_base-gentoo-stage1/Makefile7
-rw-r--r--emulators/linux_base-gentoo-stage1/pkg-deinstall36
-rw-r--r--emulators/linux_base-gentoo-stage1/pkg-install33
-rw-r--r--emulators/linux_dist-gentoo-stage1/Makefile7
-rw-r--r--emulators/linux_dist-gentoo-stage1/pkg-deinstall36
-rw-r--r--emulators/linux_dist-gentoo-stage1/pkg-install33
6 files changed, 122 insertions, 30 deletions
diff --git a/emulators/linux_base-gentoo-stage1/Makefile b/emulators/linux_base-gentoo-stage1/Makefile
index 0379f7c3ad17..91419bf8e1b5 100644
--- a/emulators/linux_base-gentoo-stage1/Makefile
+++ b/emulators/linux_base-gentoo-stage1/Makefile
@@ -7,6 +7,7 @@
PORTNAME= linux_base-gentoo-stage1
PORTVERSION= 2006.0
+PORTREVISION= 1
CATEGORIES= emulators linux
MASTER_SITES= ${MASTER_SITE_GENTOO}
EXTRACT_ONLY=
@@ -46,7 +47,7 @@ MD5_FILE= ${MASTERDIR}/distinfo.i386
do-extract:
@${MKDIR} ${WRKSRC}
- @${TAR} --exclude=./dev -xpy -C ${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} \
@@ -57,9 +58,9 @@ do-extract:
do-install:
- ${MKDIR} ${PREFIX}
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @${TAR} --exclude=./dev -xpy -C ${PREFIX} \
+ @${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
- @${FIND} ${PREFIX} -type d -exec ${CHMOD} 755 \{\} \;
+ @${FIND} ${PREFIX} -fstype ufs -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
diff --git a/emulators/linux_base-gentoo-stage1/pkg-deinstall b/emulators/linux_base-gentoo-stage1/pkg-deinstall
new file mode 100644
index 000000000000..02474ddf3347
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/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-stage1/pkg-install b/emulators/linux_base-gentoo-stage1/pkg-install
index 2d569a739289..4cd4941ac58b 100644
--- a/emulators/linux_base-gentoo-stage1/pkg-install
+++ b/emulators/linux_base-gentoo-stage1/pkg-install
@@ -12,22 +12,31 @@ PRE-INSTALL)
exit 1
fi
fi
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
- fi
;;
POST-INSTALL)
- if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
- echo 'Re-mounting linprocfs...'
- mount linprocfs
+ 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
- ;;
-DEINSTALL)
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
+ 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
diff --git a/emulators/linux_dist-gentoo-stage1/Makefile b/emulators/linux_dist-gentoo-stage1/Makefile
index 0379f7c3ad17..91419bf8e1b5 100644
--- a/emulators/linux_dist-gentoo-stage1/Makefile
+++ b/emulators/linux_dist-gentoo-stage1/Makefile
@@ -7,6 +7,7 @@
PORTNAME= linux_base-gentoo-stage1
PORTVERSION= 2006.0
+PORTREVISION= 1
CATEGORIES= emulators linux
MASTER_SITES= ${MASTER_SITE_GENTOO}
EXTRACT_ONLY=
@@ -46,7 +47,7 @@ MD5_FILE= ${MASTERDIR}/distinfo.i386
do-extract:
@${MKDIR} ${WRKSRC}
- @${TAR} --exclude=./dev -xpy -C ${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} \
@@ -57,9 +58,9 @@ do-extract:
do-install:
- ${MKDIR} ${PREFIX}
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @${TAR} --exclude=./dev -xpy -C ${PREFIX} \
+ @${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
- @${FIND} ${PREFIX} -type d -exec ${CHMOD} 755 \{\} \;
+ @${FIND} ${PREFIX} -fstype ufs -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
diff --git a/emulators/linux_dist-gentoo-stage1/pkg-deinstall b/emulators/linux_dist-gentoo-stage1/pkg-deinstall
new file mode 100644
index 000000000000..02474ddf3347
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/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-stage1/pkg-install b/emulators/linux_dist-gentoo-stage1/pkg-install
index 2d569a739289..4cd4941ac58b 100644
--- a/emulators/linux_dist-gentoo-stage1/pkg-install
+++ b/emulators/linux_dist-gentoo-stage1/pkg-install
@@ -12,22 +12,31 @@ PRE-INSTALL)
exit 1
fi
fi
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
- fi
;;
POST-INSTALL)
- if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
- echo 'Re-mounting linprocfs...'
- mount linprocfs
+ 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
- ;;
-DEINSTALL)
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
+ 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