summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Davies <jpds@protonmail.com>2020-09-01 20:10:58 +0000
committerJason Zaman <perfinion@gentoo.org>2020-09-14 20:40:19 -0700
commite20b1b55b07cfdb0d74a1960ca4a342e51e3b332 (patch)
tree99edc704453c3f7d371d03cdcafb7dfcd593f8e9 /sys-apps
parentapp-admin/setools: Version bump to 4.3.0. (diff)
downloadgentoo-e20b1b55b07cfdb0d74a1960ca4a342e51e3b332.tar.gz
gentoo-e20b1b55b07cfdb0d74a1960ca4a342e51e3b332.tar.bz2
gentoo-e20b1b55b07cfdb0d74a1960ca4a342e51e3b332.zip
sys-apps/checkpolicy: Version bump to 3.1.
Signed-off-by: Jonathan Davies <jpds@protonmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/checkpolicy/Manifest1
-rw-r--r--sys-apps/checkpolicy/checkpolicy-3.1.ebuild59
-rw-r--r--sys-apps/checkpolicy/checkpolicy-9999.ebuild10
3 files changed, 66 insertions, 4 deletions
diff --git a/sys-apps/checkpolicy/Manifest b/sys-apps/checkpolicy/Manifest
index c800d814560f..2a07ee9daf51 100644
--- a/sys-apps/checkpolicy/Manifest
+++ b/sys-apps/checkpolicy/Manifest
@@ -1,2 +1,3 @@
DIST checkpolicy-2.9.tar.gz 68735 BLAKE2B 092b7b67ea952be6a829529249f0b209c31245490f263b248cb0208d9f1f4ec922522791c6555c0b913b56b8a0037bfde54a3511940f0be287f13e3a193c8f26 SHA512 8dafdd871c5fd32023883149c74891279c386cc87d70cbfc6f0a8dcb0406f17f1158f9078c1b35892a0f0edcb6b5208a031594ab80898eec016ad765ad046e03
DIST checkpolicy-3.0.tar.gz 69037 BLAKE2B 30b8a5e19e02472d1cf256636c70f95739098514ef9d630ee5e782085bd09ff58b4ab6b8c97e9fa652e8260211a7803d80eb765e0fd2f1dde9c328682078d3c1 SHA512 196d24638ec7fc88d427637e2308c7a0c5a3d4cc88c372a5f5dc61d6c1e2f895e308b8e06ee9e47d340d65a1b2d4486dc4decfa6074594dda14e46f1308ded89
+DIST checkpolicy-3.1.tar.gz 69072 BLAKE2B 31cb5ef52533b0a62f954e770278fc5766a961d87fb86260b04abe562bcd90d0025b33931c6ad54096c64ab54150c7562c112eac80eb2f60dbcdda57f4cacfe2 SHA512 2276a5a0919286049d2ceba386ef5f6de523745b588bb81cb4fed5eced5fd0b8070249b7a3ae5a85e2abb9369a86318f727d4073aad14ab75c43750a46069168
diff --git a/sys-apps/checkpolicy/checkpolicy-3.1.ebuild b/sys-apps/checkpolicy/checkpolicy-3.1.ebuild
new file mode 100644
index 000000000000..fe88e2f1c073
--- /dev/null
+++ b/sys-apps/checkpolicy/checkpolicy-3.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20200710"
+
+SEPOL_VER="${PV}"
+SEMNG_VER="${PV}"
+
+DESCRIPTION="SELinux policy compiler"
+HOMEPAGE="http://userspace.selinuxproject.org"
+
+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://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}
+ >=sys-libs/libsemanage-${SEMNG_VER}
+ sys-devel/flex
+ sys-devel/bison"
+
+RDEPEND=">=sys-libs/libsemanage-${SEMNG_VER}"
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ YACC="bison -y" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ install
+
+ if use debug; then
+ dobin "${S}/test/dismod"
+ dobin "${S}/test/dispol"
+ fi
+}
+
+pkg_postinst() {
+ if ! tc-is-cross-compiler; then
+ einfo "This checkpolicy can compile version `checkpolicy -V | cut -f 1 -d ' '` policy."
+ fi
+}
diff --git a/sys-apps/checkpolicy/checkpolicy-9999.ebuild b/sys-apps/checkpolicy/checkpolicy-9999.ebuild
index 5be101d66c6b..fe88e2f1c073 100644
--- a/sys-apps/checkpolicy/checkpolicy-9999.ebuild
+++ b/sys-apps/checkpolicy/checkpolicy-9999.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
inherit toolchain-funcs
MY_P="${P//_/-}"
-MY_RELEASEDATE="20191204"
+MY_RELEASEDATE="20200710"
SEPOL_VER="${PV}"
SEMNG_VER="${PV}"
@@ -53,5 +53,7 @@ src_install() {
}
pkg_postinst() {
- einfo "This checkpolicy can compile version `checkpolicy -V | cut -f 1 -d ' '` policy."
+ if ! tc-is-cross-compiler; then
+ einfo "This checkpolicy can compile version `checkpolicy -V | cut -f 1 -d ' '` policy."
+ fi
}