Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libsemanage: libsemanage-2.2.ebuild ChangeLog
Date: Mon, 04 Nov 2013 21:54:55
Message-Id: 20131104215451.53D272004B@flycatcher.gentoo.org
1 swift 13/11/04 21:54:51
2
3 Modified: ChangeLog
4 Added: libsemanage-2.2.ebuild
5 Log:
6 New libsemanage release
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)
9
10 Revision Changes Path
11 1.58 sys-libs/libsemanage/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libsemanage/ChangeLog?rev=1.58&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libsemanage/ChangeLog?rev=1.58&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libsemanage/ChangeLog?r1=1.57&r2=1.58
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v
20 retrieving revision 1.57
21 retrieving revision 1.58
22 diff -u -r1.57 -r1.58
23 --- ChangeLog 7 Jul 2013 17:59:46 -0000 1.57
24 +++ ChangeLog 4 Nov 2013 21:54:51 -0000 1.58
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-libs/libsemanage
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.57 2013/07/07 17:59:46 swift Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.58 2013/11/04 21:54:51 swift Exp $
30 +
31 +*libsemanage-2.2 (04 Nov 2013)
32 +
33 + 04 Nov 2013; Sven Vermeulen <swift@g.o> +libsemanage-2.2.ebuild:
34 + New libsemanage release
35
36 07 Jul 2013; Sven Vermeulen <swift@g.o> -libsemanage-2.1.6.ebuild,
37 -libsemanage-2.1.6-r2.ebuild:
38
39
40
41 1.1 sys-libs/libsemanage/libsemanage-2.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libsemanage/libsemanage-2.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libsemanage/libsemanage-2.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libsemanage-2.2.ebuild
47 ===================================================================
48 # Copyright 1999-2013 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/libsemanage-2.2.ebuild,v 1.1 2013/11/04 21:54:51 swift Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python2_7 python3_2 )
54 USE_RUBY="ruby18 ruby19"
55 RUBY_OPTIONAL="yes"
56
57 inherit multilib python-r1 toolchain-funcs eutils ruby-ng
58
59 SEPOL_VER="2.2"
60 SELNX_VER="2.2"
61
62 DESCRIPTION="SELinux kernel and policy management library"
63 HOMEPAGE="http://userspace.selinuxproject.org"
64 SRC_URI="http://userspace.selinuxproject.org/releases/20131030/${P}.tar.gz"
65
66 LICENSE="GPL-2"
67 SLOT="0"
68 KEYWORDS="~amd64 ~x86"
69 IUSE="python ruby"
70
71 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
72 >=sys-libs/libselinux-${SELNX_VER}
73 dev-libs/ustr
74 ruby? (
75 $(ruby_implementations_depend)
76 )"
77 DEPEND="${RDEPEND}
78 sys-devel/bison
79 sys-devel/flex
80 ruby? ( >=dev-lang/swig-2.0.4-r1 )
81 python? (
82 >=dev-lang/swig-2.0.4-r1
83 ${PYTHON_DEPS}
84 )"
85
86 S="${WORKDIR}/${P}"
87
88 # tests are not meant to be run outside of the
89 # full SELinux userland repo
90 RESTRICT="test"
91
92 pkg_setup() {
93 # prevent ruby-ng to mess if ruby is not asked for
94 if use ruby; then
95 ruby-ng_pkg_setup
96 fi
97 }
98
99 src_unpack() {
100 default
101 }
102
103 src_prepare() {
104 echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf"
105 echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf"
106 echo "# or debugging of policy." >> "${S}/src/semanage.conf"
107 echo "save-linked=false" >> "${S}/src/semanage.conf"
108 echo >> "${S}/src/semanage.conf"
109 echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf"
110 echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf"
111 echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf"
112 echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf"
113 echo "# would catch." >> "${S}/src/semanage.conf"
114 echo "expand-check=1" >> "${S}/src/semanage.conf"
115 echo >> "${S}/src/semanage.conf"
116 echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf"
117 echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf"
118 echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf"
119 echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf"
120 echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf"
121 echo "bzip-blocksize=0" >> "${S}/src/semanage.conf"
122 echo >> "${S}/src/semanage.conf"
123 echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf"
124 echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf"
125 echo "bzip-small=true" >> "${S}/src/semanage.conf"
126
127 epatch_user
128
129 if use python; then
130 BUILD_DIR="${S}/src"
131 python_copy_sources
132 fi
133 }
134
135 each_ruby_compile() {
136 local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
137 cd "${WORKDIR}/${P}"
138 cp -r src src-ruby-${RUBYLIBVER}
139 cd src-ruby-${RUBYLIBVER}
140
141 emake -C src CC="$(tc-getCC)" RUBY="${RUBY}" rubywrap || die
142 }
143
144 src_compile() {
145 emake AR="$(tc-getAR)" CC="$(tc-getCC)" all || die
146
147 if use python; then
148 building() {
149 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
150 emake CC="$(tc-getCC)" PYINC="-I${PYTHON_INCLUDEDIR}" PYTHONLBIDIR="${PYTHON_LIBPATH}" PYPREFIX="${EPYTHON##*/}" "$@"
151 }
152 python_foreach_impl building swigify
153 python_foreach_impl building pywrap
154 fi
155
156 if use ruby; then
157 ruby-ng_src_compile
158 fi
159 }
160
161 each_ruby_install() {
162 local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
163
164 cd "${WORKDIR}/${P}/src-ruby-${RUBYLIBVER}"
165 emake -C src RUBY="${RUBY}" DESTDIR="${D}" install-rubywrap || die
166 }
167
168 src_install() {
169 emake \
170 DESTDIR="${D}" \
171 LIBDIR="${D}usr/$(get_libdir)" \
172 SHLIBDIR="${D}$(get_libdir)" \
173 install || die
174 dosym "../../$(get_libdir)/libsemanage.so.1" "/usr/$(get_libdir)/libsemanage.so" || die
175
176 if use python; then
177 installation() {
178 emake DESTDIR="${D}" install-pywrap
179 }
180 python_foreach_impl installation
181 fi
182
183 if use ruby; then
184 ruby-ng_src_install
185 fi
186 }