/[gentoo-x86]/sys-apps/ccs-tools/ccs-tools-1.6.8_p20100115.ebuild
Gentoo

Contents of /sys-apps/ccs-tools/ccs-tools-1.6.8_p20100115.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Jan 23 06:49:05 2010 UTC (4 years, 11 months ago) by matsuu
Branch: MAIN
Version bumped. ccs-tools-1.7* was moved to sys-apps/tomoyo-tools.
(Portage version: 2.1.7.16/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/ccs-tools/ccs-tools-1.6.8_p20090623-r1.ebuild,v 1.2 2009/07/22 03:26:43 mr_bones_ Exp $
4
5 EAPI="2"
6 inherit eutils multilib toolchain-funcs
7
8 MY_P="${P/_p/-}"
9 DESCRIPTION="TOMOYO Linux tools"
10 HOMEPAGE="http://tomoyo.sourceforge.jp/"
11 SRC_URI="mirror://sourceforge.jp/tomoyo/30298/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RESTRICT="test"
19
20 DEPEND="sys-libs/ncurses
21 sys-libs/readline"
22 RDEPEND="${DEPEND}
23 sys-apps/which"
24
25 S="${WORKDIR}/ccstools"
26
27 src_prepare() {
28 epatch "${FILESDIR}/${PN}-1.6.8_p20090623-gentoo.patch"
29
30 sed -i \
31 -e "/^CC=/s:gcc:$(tc-getCC):" \
32 -e "/^CFLAGS=/s:-O2:${CFLAGS}:" \
33 -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \
34 Makefile || die
35
36 sed -i \
37 -e "s:/usr/lib/ccs:/usr/$(get_libdir)/ccs:g" \
38 init_policy.sh tomoyo_init_policy.sh || die
39
40 echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/ccs/conf\"" > "${T}/50${PN}" || die
41 }
42
43 src_test() {
44 cd "${S}/kernel_test"
45 emake || die
46 ./testall.sh || die
47 }
48
49 src_install() {
50 emake INSTALLDIR="${D}" install || die
51
52 rm "${D}"/usr/$(get_libdir)/ccs/{COPYING.ccs,README.ccs,ccstools.conf} || die
53 insinto /usr/$(get_libdir)/ccs/conf
54 doins ccstools.conf || die
55 dosym conf/ccstools.conf /usr/$(get_libdir)/ccs/ccstools.conf || die
56
57 doenvd "${T}/50${PN}" || die
58
59 dodoc README.ccs
60 }
61
62 pkg_postinst() {
63 elog "Execute the following command to setup the initial policy configuration:"
64 elog
65 elog "emerge --config =${CATEGORY}/${PF}"
66 elog
67 elog "For more information, please visit the following."
68 elog
69 elog "For >=kernel-2.6.30:"
70 elog "http://tomoyo.sourceforge.jp/en/2.2.x/"
71 elog
72 elog "For <kernel-2.6.30 + ccs-patch:"
73 elog "http://tomoyo.sourceforge.jp/en/1.6.x/"
74 }
75
76 pkg_config() {
77 /usr/$(get_libdir)/ccs/tomoyo_init_policy.sh
78 }

  ViewVC Help
Powered by ViewVC 1.1.20