sys-apps/usbutils: x86 stable (bug #685276)
[gentoo.git] / sys-apps / semodule-utils / semodule-utils-2.7.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 inherit toolchain-funcs
7
8 MY_RELEASEDATE="20170804"
9 SEPOL_VER="${PV}"
10 SELNX_VER="${PV}"
11
12 MY_P="${P//_/-}"
13 IUSE=""
14
15 if [[ ${PV} == *9999 ]] ; then
16         inherit git-r3
17         EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
18         S="${WORKDIR}/${MY_P}/${PN}"
19 else
20         SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
21         KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
22         S="${WORKDIR}/${MY_P}"
23 fi
24
25 DESCRIPTION="SELinux policy module utilities"
26 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
27
28 LICENSE="GPL-2"
29 SLOT="0"
30
31 DEPEND=">=sys-libs/libsepol-${SEPOL_VER}:="
32
33 RDEPEND="${DEPEND}
34         !<sys-apps/policycoreutils-2.7_pre"
35
36 src_prepare() {
37         default
38
39         sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
40 }
41
42 src_compile() {
43         emake \
44                 CC="$(tc-getCC)" \
45                 LIBDIR="\$(PREFIX)/$(get_libdir)"
46 }
47
48 src_install() {
49         emake DESTDIR="${D}" \
50                 LIBDIR="\$(PREFIX)/$(get_libdir)" \
51                 LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
52                 install
53 }