Merge github#785: net-libs/nodejs: removal
[gentoo.git] / sys-libs / libsepol / libsepol-9999.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 inherit multilib toolchain-funcs eutils multilib-minimal
8
9 MY_P="${P//_/-}"
10 MY_RELEASEDATE="20150202"
11
12 DESCRIPTION="SELinux binary policy representation library"
13 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
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 LICENSE="GPL-2"
26 SLOT="0"
27 IUSE=""
28
29 DEPEND=""
30 RDEPEND=""
31
32 # tests are not meant to be run outside of the
33 # full SELinux userland repo
34 RESTRICT="test"
35
36 src_prepare() {
37         epatch_user
38         multilib_copy_sources
39 }
40
41 multilib_src_compile() {
42         tc-export RANLIB;
43         LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
44                 emake AR="$(tc-getAR)" CC="$(tc-getCC)"
45 }
46
47 multilib_src_install() {
48         LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
49                 emake DESTDIR="${D}" install
50 }