diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild')
-rw-r--r-- | sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild new file mode 100644 index 000000000000..ac709afaae54 --- /dev/null +++ b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.14.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit eutils toolchain-funcs multilib prefix flag-o-matic user + +# last part in e.g. 1.12.14.1704 +PVER=1709 + +DESCRIPTION="Baselayout for Gentoo Prefix installs" +HOMEPAGE="http://prefix.gentoo.org/" +SRC_URI="http://dev.gentoo.org/~grobian/distfiles/${P}.${PVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="prefix-chaining" +DEPEND=">=sys-apps/portage-2.2.01" +RDEPEND=">=sys-libs/readline-5.0-r1 + >=app-shells/bash-3.1_p7 + >=sys-apps/coreutils-5.2.1 + kernel_Darwin? ( sys-process/pidof-bsd ) + kernel_FreeBSD? ( sys-process/pidof-bsd )" + +S=${WORKDIR}/${P}.${PVER} + +src_prepare() { + if use prefix-chaining; then + epatch "${S}"/baselayout-${PV}-prefix-chaining.patch + + # need to set the PKG_CONFIG_PATH globally for this prefix, when + # chaining is enabled, since pkg-config may not be installed locally, + # but still .pc files should be found for all RDEPENDable prefixes in + # the chain. + echo "PKG_CONFIG_PATH=\"${EPREFIX}/usr/lib/pkgconfig:${EPREFIX}/usr/share/pkgconfig\"" >> "${S}"/etc/env.d/00basic + fi + + # The consoletype application in this form will only work on Linux + [[ ${CHOST} == *-linux-* ]] || epatch "${FILESDIR}"/baselayout-1.12.5-prefix-no-consoletype.patch + + cd "${S}" + eprefixify \ + etc/env.d/00basic \ + etc/profile \ + sbin/functions.sh \ + sbin/runscript.sh \ + src/runscript.c \ + sbin/depscan.sh \ + sbin/rc-daemon.sh \ + sbin/rc-services.sh + # add the host OS MANPATH + echo 'MANPATH="/usr/share/man"' > etc/env.d/99basic || die "can't make file" + + # avoid a re-automake run + touch -r gnulib/configure.ac gnulib/Makefile.in gnulib/aclocal.m4 || die +} + +src_configure() { + cd gnulib || die + default +} + +src_compile() { + # build gnulib first + pushd gnulib > /dev/null || die + emake || die "Cannot build gnulib" + popd > /dev/null + + # use gnulib (buildsystem doesn't respect cppflags) + append-cflags -I../gnulib -I../gnulib/gllib + append-ldflags -L../gnulib/gllib + append-libs gnu + + local libdir="lib" + + [[ ${SYMLINK_LIB} == "yes" ]] && libdir=$(get_abi_LIBDIR "${DEFAULT_ABI}") + + # CFLAGS in LD for #370695 + make -C "${S}"/src \ + CC="$(tc-getCC)" \ + LD="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" \ + CFLAGS="${CFLAGS}" \ + LIBDIR="${libdir}" || die +} + +src_install() { + local dir libdirs libdirs_env rcscripts_dir + + dodir /etc + dodir /etc/env.d + dodir /etc/init.d # .keep file might mess up init.d stuff + + libdirs=$(get_all_libdirs) + : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... + + rcscripts_dir="/lib/rcscripts" + + for dir in ${libdirs}; do + libdirs_env=${libdirs_env:+$libdirs_env:}/${dir}:/usr/${dir}:/usr/local/${dir} + [[ ${dir} == "lib" && ${SYMLINK_LIB} == "yes" ]] && continue + dodir /"${dir}" + dodir /usr/"${dir}" + dodir /usr/local/"${dir}" + done + + # Ugly compatibility with stupid ebuilds and old profiles symlinks + if [[ ${SYMLINK_LIB} == "yes" ]] ; then + rm -r "${ED}"/{lib,usr/lib,usr/local/lib} &> /dev/null + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/lib + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/local/lib + fi + + # FHS compatibility symlinks stuff + dosym /var/tmp /usr/tmp + + # rc-scripts version for testing of features that *should* be present + echo "Gentoo Prefix Base System version ${PV}" > ${ED}/etc/gentoo-release + + # get the basic stuff in there + doenvd "${S}"/etc/env.d/* || die "doenvd" + + # copy the profile + cp "${S}"/etc/profile "${ED}"/etc/profile + + # Setup files in /sbin + # + cd "${S}"/sbin + into / + # These moved from /etc/init.d/ to /sbin to help newb systems + # from breaking + dosbin runscript.sh functions.sh + + # Compat symlinks between /etc/init.d and /sbin + # (some stuff have hardcoded paths) + dosym ../../sbin/depscan.sh /etc/init.d/depscan.sh + dosym ../../sbin/runscript.sh /etc/init.d/runscript.sh + dosym ../../sbin/functions.sh /etc/init.d/functions.sh + + cd "${S}"/sbin + into / + dosbin depscan.sh + insinto ${rcscripts_dir}/awk + doins "${S}"/src/awk/functions.awk + + # + # Install baselayout utilities + # + local libdir="lib" + [[ ${SYMLINK_LIB} == "yes" ]] && libdir=$(get_abi_LIBDIR "${DEFAULT_ABI}") + + cd "${S}"/src + make DESTDIR="${ED}" LIBDIR="${libdir}" install || die + + insinto ${rcscripts_dir}/sh + doins "${S}"/sbin/rc-* +} + +pkg_postinst() { + if [[ ${EUID} == 0 ]] ; then + # setup portage user, such that things that require root privs + # don't fail, bug #321623 + enewgroup portage 250 + enewuser portage 250 -1 "${EPREFIX}"/var/tmp/portage portage + fi + + # This is also written in src_install (so it's in CONTENTS), but + # write it here so that the new version is immediately in the file + # (without waiting for the user to do etc-update) + rm -f "${EROOT}"/etc/._cfg????_gentoo-release + echo "Gentoo Prefix Base System version ${PV}" > "${EROOT}"/etc/gentoo-release + + echo + einfo "Please be sure to update all pending '._cfg*' files in /etc," + einfo "else things might break! You can use 'etc-update'" + einfo "to accomplish this:" + einfo + einfo " # etc-update" + echo +} |