2015-07-30 10:16:50 +02:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2014-12-23 11:33:31 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI=4
|
|
|
|
|
|
|
|
inherit multilib
|
|
|
|
|
|
|
|
DESCRIPTION="Sablink system release virtual package"
|
|
|
|
HOMEPAGE="http://sablink.disconnected-by-peer.at"
|
|
|
|
SRC_URI=""
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
2015-07-30 10:25:18 +02:00
|
|
|
KEYWORDS="~amd64 arm ~x86"
|
2014-12-23 11:33:31 +01:00
|
|
|
|
|
|
|
IUSE=""
|
|
|
|
DEPEND=""
|
2015-07-30 10:25:18 +02:00
|
|
|
GCC_VER="4.9"
|
2014-12-23 11:33:31 +01:00
|
|
|
PYTHON_VER="2.7"
|
2014-12-23 11:38:38 +01:00
|
|
|
|
2014-12-23 11:33:31 +01:00
|
|
|
# Listing default packages for the current release
|
|
|
|
RDEPEND="!app-admin/eselect-init
|
|
|
|
!sys-apps/hal
|
|
|
|
!sys-auth/consolekit
|
2015-07-30 10:16:50 +02:00
|
|
|
app-eselect/eselect-python
|
2014-12-23 11:33:31 +01:00
|
|
|
dev-lang/python:${PYTHON_VER}
|
2015-07-30 10:25:18 +02:00
|
|
|
sys-apps/openrc
|
2014-12-23 11:33:31 +01:00
|
|
|
sys-devel/base-gcc:${GCC_VER}
|
|
|
|
sys-devel/gcc-config
|
|
|
|
app-admin/update-motd
|
2014-12-23 11:38:38 +01:00
|
|
|
virtual/cron
|
|
|
|
app-admin/equo
|
2014-12-23 11:33:31 +01:00
|
|
|
"
|
|
|
|
|
|
|
|
src_unpack () {
|
|
|
|
echo "Sablink Linux ${ARCH} ${PV}" > "${T}/sablink-release"
|
|
|
|
|
|
|
|
# Anaconda expects a "release" somewhere in the string
|
|
|
|
# and no trailing \n
|
|
|
|
echo -n "Sablink ${ARCH} release ${PV}" > "${T}/system-release"
|
|
|
|
mkdir -p "${S}" || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install () {
|
|
|
|
insinto /etc
|
|
|
|
doins "${T}"/sablink-release
|
|
|
|
doins "${T}"/system-release
|
|
|
|
|
|
|
|
# Bug 3459 - reduce the risk of fork bombs
|
|
|
|
insinto /etc/security/limits.d
|
|
|
|
doins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf"
|
|
|
|
|
|
|
|
# install equo update cron
|
|
|
|
exeinto /etc/cron.daily
|
|
|
|
doexe "${FILESDIR}/equo-update.cron"
|
|
|
|
|
|
|
|
# install sablink greeting
|
|
|
|
exeinto /etc/update-motd.d
|
|
|
|
newexe "${FILESDIR}/greeting.sh" 20-greeting
|
|
|
|
|
|
|
|
# install the check for updates script
|
|
|
|
newbin "${FILESDIR}/equo-update-check" equo-update-check
|
|
|
|
|
|
|
|
# install repository files
|
|
|
|
insinto /etc/entropy
|
|
|
|
newins "${FILESDIR}/repositories.conf.1" repositories.conf
|
|
|
|
insinto /etc/entropy/repositories.conf.d
|
|
|
|
doins "${FILESDIR}/entropy_sablink.nas-central.org"
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
# Setup Python ${PYTHON_VER}
|
|
|
|
eselect python set python${PYTHON_VER}
|
|
|
|
# No need to set the GCC profile here, since it's done in base-gcc
|
|
|
|
|
|
|
|
# Improve systemd support
|
|
|
|
if [[ ! -L /etc/mtab ]] && [[ -e /proc/self/mounts ]]; then
|
|
|
|
rm -f /etc/mtab
|
|
|
|
einfo "Migrating /etc/mtab to a /proc/self/mounts symlink"
|
|
|
|
ln -sf /proc/self/mounts /etc/mtab
|
|
|
|
fi
|
|
|
|
|
|
|
|
# force kdm back to the default runlevel if added to boot
|
|
|
|
# this is in preparation for the logind migration
|
|
|
|
local xdm_conf="${ROOT}/etc/conf.d/xdm"
|
|
|
|
local xdm_boot_runlevel="${ROOT}/etc/runlevels/boot/xdm"
|
|
|
|
local xdm_default_runlevel="${ROOT}/etc/runlevels/default/xdm"
|
|
|
|
if [ -e "${xdm_conf}" ] && [ -e "${xdm_boot_runlevel}" ]; then
|
|
|
|
DISPLAYMANAGER=""
|
|
|
|
. "${xdm_conf}"
|
|
|
|
if [ "${DISPLAYMANAGER}" = "kdm" ]; then
|
|
|
|
elog "Moving xdm (kdm) from boot runlevel to default"
|
|
|
|
elog "or logind will not work as expected"
|
|
|
|
mv -f "${xdm_boot_runlevel}" "${xdm_default_runlevel}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# remove old hal udev rules.d file, if found. sys-apps/hal is long gone.
|
|
|
|
rm -f "${ROOT}/lib/udev/rules.d/90-hal.rules"
|
|
|
|
|
|
|
|
# make sure that systemd is correctly linked to /sbin/init
|
|
|
|
# Drop this in 2015, keep in sync with systemd-sysv-utils
|
|
|
|
ln -sf ../usr/lib/systemd/systemd "${ROOT}/sbin/init" || true
|
|
|
|
}
|