overlay/app-misc/sablink-version/sablink-version-0.ebuild
Mario Fetka 19629c7f20 Add Cron script and proper dependencies
(Portage version: 2.2.0_alpha123/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
2012-11-04 21:00:56 +01:00

66 lines
1.6 KiB
Bash

# Copyright 2004-2011 Sabayon Linux
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
DESCRIPTION="SabLink System Release virtual package"
HOMEPAGE="http://sablink.disconnected-by-peer.at/"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
DEPEND=""
# Listing default packages for the current release
RDEPEND="app-admin/eselect-python
dev-lang/python:2.7
sys-devel/base-gcc:4.6
sys-devel/gcc-config
app-admin/update-motd
virtual/cron
app-admin/equo"
SABLINK_VER="${PV}"
SABLINK_HEADER="SabLink Linux"
SABLINK_RELEASE="sablink-release"
src_unpack() {
if use x86; then
echo "${SABLINK_HEADER} x86 ${SABLINK_VER}" > "${SABLINK_RELEASE}"
elif use arm; then
echo "${SABLINK_HEADER} ${CHOST/-*/} ${SABLINK_VER}" > "${SABLINK_RELEASE}"
else
echo "${SABLINK_HEADER} amd64 ${SABLINK_VER}" > "${SABLINK_RELEASE}"
fi
}
src_install() {
# install relesae file
insinto /etc
doins "${SABLINK_RELEASE}"
dosym /etc/"${SABLINK_RELEASE}" /etc/system-release
# install equo update cron
exeinto /etc/cron.daily
doexe "${FILESDIR}/equo-update.cron"
# Bug 3459 - reduce the risk of fork bombs
insinto /etc/security/limits.d
newins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf" 00-sablink-anti-fork-bomb.conf
# install sablink greeting
exeinto /etc/update-motd.d
newexe "${FILESDIR}/greeting.sh" 20-greeting
# install the check for updates script
newbin "${FILESDIR}/check.py" sablink-equo-check
}
pkg_postinst() {
# Setup Python 2.7
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 --ignore 3.3 --ignore 3.4
}