1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00

Repocopy from linux_base-gentoo-stage2 to emulators/linux_dist-gentoo-stage2.

These ports are complete Linux distributions rather than linux_base ports and
don't really suit our Ports Collection infrastructure,  so
they should be renamed to emulators/linux_dist-gentoo-stage[123], but the
opportunity to install them as linux_base should be kept.
After the repocopy the patches mentioned below should be applied

- Add WITH_LINUXBASE for using as a linux_base, otherwise it installs
  under ${PREFIX}/${PORTNAME}
- Add an explanation in pre-fetch to explain WITH_LINUXBASE
- Move pkg- scripts into files/ to reinplace-edit them appropriately
- Change to static plists
- do-extract is unnecessary now since we have static plists
- Drop alpha support for linux_base-gentoo-stage1 since
  1, alpha support was dropped in CURRENT as well, and RELENG_[56]
     are badly maintained for alpha
  2, I don't have hardware to test these changes for alpha
- Bump PORTREVISION

PR:             99210
Submitted by:   Gabor Kovesdan <gkovesdan@t-hosting.hu>
Repocopy by:    marcus
This commit is contained in:
Erwin Lansing 2006-06-25 11:37:19 +00:00
parent 3578004deb
commit 8888b552d0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166279
8 changed files with 40099 additions and 81 deletions

View File

@ -4,8 +4,9 @@
#
# $FreeBSD$
PORTNAME= linux_base-gentoo-stage2
PORTNAME= gentoo-stage2
PORTVERSION= 2006.0
PORTREVISION= 1
CATEGORIES= emulators linux
MASTER_SITES= ${MASTER_SITE_GENTOO}
MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
@ -15,31 +16,62 @@ 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]-*
USE_BZIP2= YES
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
SUB_FILES+= pkg-message pkg-install pkg-deinstall
SUB_LIST+= PREFIX_SUBDIR="${PREFIX_SUBDIR}"
PLIST_SUB+= PREFIX_SUBDIR="${PREFIX_SUBDIR}"
PLIST= pkg-plist.${GENTOO_OPTIMIZED}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if defined(WITH_LINUXBASE)
PKGNAMEPREFIX= linux_base-
CONFLICTS= linux_base-7* linux_base-8* linux_base-debian* \
linux_base-rh* linux_base-suse* linux_base-fc* \
linux_base-gentoo-stage[13]-*
PREFIX?= ${LINUXBASE}
PREFIX_SUBDIR=
.else
PKGNAMEPREFIX= linux_dist-
PREFIX_SUBDIR= ${PORTNAME}/
.endif
.include <bsd.port.pre.mk>
.if (${GENTOO_OPTIMIZED} == "i586" || ${GENTOO_OPTIMIZED} == "i686")
MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
DISTNAME= stage2-${GENTOO_OPTIMIZED}-${PORTVERSION}
DISTNAME= stage2-${GENTOO_OPTIMIZED}-${PORTVERSION}
.else
MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages
DISTNAME= stage2-x86-${PORTVERSION}
DISTNAME= stage2-x86-${PORTVERSION}
.endif
pre-fetch:
.if defined(WITH_LINUXBASE)
@${ECHO_MSG} ""
@${ECHO_MSG} "Note that this port doesn't completely suit our ports"
@${ECHO_MSG} "infrastructure. It's very good as a standalone Linux"
@${ECHO_MSG} "distribution on a FreeBSD system you can use for"
@${ECHO_MSG} "cross-developing and cross-building, etc., but using it as a"
@${ECHO_MSG} "linux_base port is not quite adequate."
@${ECHO_MSG} "If you experience troubles with it, please use the"
@${ECHO_MSG} "default linux_base port."
@${ECHO_MSG} ""
.else
@${ECHO_MSG} ""
@${ECHO_MSG} "This port is a complete Linux distribution you can use"
@${ECHO_MSG} "on a FreeBSD system. The use of this port as a linux_base"
@${ECHO_MSG} "port is very discouraged but you can enforce it to install"
@${ECHO_MSG} "as a linux_base if you set WITH_LINUXBASE."
@${ECHO_MSG} ""
.endif
@${ECHO_MSG} "You can select your processor class for installing optimized"
@${ECHO_MSG} "Gentoo binaries with setting this knob"
@${ECHO_MSG} ""
@ -47,24 +79,16 @@ pre-fetch:
@${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}
@${MKDIR} ${PREFIX}/${PREFIX_SUBDIR}
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
@${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX}/${PREFIX_SUBDIR} \
-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
@${CP} -p /etc/resolv.conf ${PREFIX}/${PREFIX_SUBDIR}/etc/
@${FIND} ${PREFIX}/${PREFIX_SUBDIR}bin ${PREFIX}/${PREFIX_SUBDIR}sbin/ \
${PREFIX}/${PREFIX_SUBDIR}usr/bin ${PREFIX}/${PREFIX_SUBDIR}/usr/sbin \
-type f -print0 | ${XARGS} -0 ${FILE} | ${GREP} ELF \
| ${CUT} -d : -f 1 | ${XARGS} ${BRANDELF} -t Linux
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,18 @@
#!/bin/sh
# a deinstallation script for linux_base
case "$2" in
DEINSTALL)
if [ -n "`mount | grep ^linproc`" ] || \
[ -d %%PREFIX%%/%%PREFIX_SUBDIR%%proc ]; then
echo ""
echo "You may need to do by hands:"
echo " o unmount linprocfs;"
echo " o delete %%PREFIX%%/%%PREFIX_SUBDIR%%proc;"
echo " o remove the description of linprocfs from /etc/fstab."
echo ""
fi
;;
esac
exit 0

View File

@ -23,20 +23,9 @@ POST-INSTALL)
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}
%%PREFIX%%/%%PREFIX_SUBDIR%%sbin/ldconfig -r %%PREFIX%%/%%PREFIX_SUBDIR%%
;;
esac

View File

@ -8,14 +8,10 @@
* You may wish to enable emulation of the Linux proc filesystem. See the
* linprocfs(5) man page.
*
* Note that this port is not the default linux_base port. We do a big effort
* to make all linux_base ports work properly with the ports infrastructure,
* but we can't guarantee that all of them will work in every cases. If
* you experience problems, please use the default linux_base port.
*
* 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
* To download Portage, do "chroot %%PREFIX%%/%%PREFIX_SUBDIR%% emerge sync"
* as root. Then you may want to do "chroot %%PREFIX%%/%%PREFIX_SUBDIR%%
* /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.

View File

@ -1,36 +0,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
#!/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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff