dev-python/sepolgen: bump to 2.6-rc1

Package-Manager: portage-2.3.0
This commit is contained in:
Jason Zaman
2016-10-01 16:54:18 +08:00
parent d82cdfbb17
commit 9365322e83
3 changed files with 87 additions and 3 deletions

View File

@@ -1 +1,2 @@
DIST sepolgen-1.2.3.tar.gz 367644 SHA256 3ee1745257fa55301070219c77978c7c9eeb9aa595ce0b6b29c3baa4687d5cf0 SHA512 5fe023f983dc0fe1855da24835cb9bb466ac6c44d07fa939416740ca64968c039be2febff79b2a4c593e54c5ae81448dd06020e9160e4f84eea95d8c0d2b910f WHIRLPOOL 65c663a3398f1ae64e8bf233828701481ac2ee68fa75f2271596628c7dcc80c1193166cfb950f8faa86988c0b309cfbb59f15f38131a9f1f2680b754518bba11
DIST sepolgen-2.6-rc1.tar.gz 367934 SHA256 5d1ee9a86d75f08b3443e4f17a9098bf3bdc7d2a77a64dcdd5d6230f6d4621cb SHA512 80fe7a3a30d632d0736ca69527ecacded1a35cc2115fcaab526f8eed56f12d77b453dc0eb7230790d5774631ee2d7c3fdae54fb734da30de46faea6fd9c96711 WHIRLPOOL 35d3d32e29f967e691658f8a30ce274c34d2e656bff3a1df04ba3b054631afe8e717f76dbd8524e91a0c9c45e64471b398af85b1ab20a4beac87f70ca62b3ca8

View File

@@ -0,0 +1,83 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit python-r1
MY_P="${P//_/-}"
MY_RELEASEDATE="20160930"
DESCRIPTION="SELinux policy generation library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
S="${WORKDIR}/${MY_P}/${PN}"
else
SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~mips ~x86"
S="${WORKDIR}/${MY_P}"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE=""
DEPEND=">=sys-libs/libselinux-2.4[python]
>=app-admin/setools-4.0[${PYTHON_USEDEP}]
${PYTHON_DEPS}"
RDEPEND="${DEPEND}"
src_prepare() {
if [[ ${PV} != 9999 ]] ; then
# If needed for live ebuilds please use /etc/portage/patches
eapply "${FILESDIR}/0030-default-path-for-tests-also-needed-bug-467264.patch"
fi
eapply_user
python_copy_sources
}
src_compile() {
:
}
src_test() {
if has_version sec-policy/selinux-base-policy; then
invoke_sepolgen_test() {
emake test
}
python_foreach_impl invoke_sepolgen_test
else
ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
fi
}
src_install() {
installation() {
emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
python_optimize
}
python_foreach_impl installation
# Create sepolgen.conf with different devel location definition
if [[ -f /etc/selinux/config ]];
then
local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
else
local selinuxtype="${POLICY_TYPES%% *}";
if [[ -n "${selinuxtype}" ]];
then
echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
else
echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
fi
fi
}

View File

@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit python-r1
MY_P="${P//_/-}"
MY_RELEASEDATE="20160223"
MY_RELEASEDATE="20160930"
DESCRIPTION="SELinux policy generation library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -19,7 +19,7 @@ if [[ ${PV} == 9999 ]] ; then
S="${WORKDIR}/${MY_P}/${PN}"
else
SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
KEYWORDS="~amd64 ~arm64 ~mips ~x86"
S="${WORKDIR}/${MY_P}"
fi
@@ -28,7 +28,7 @@ SLOT="0"
IUSE=""
DEPEND=">=sys-libs/libselinux-2.4[python]
app-admin/setools[python(+)]
>=app-admin/setools-4.0[${PYTHON_USEDEP}]
${PYTHON_DEPS}"
RDEPEND="${DEPEND}"