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

Contents of /sys-apps/ccs-tools/ccs-tools-1.6.8_p20090623-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jul 22 03:26:43 2009 UTC (5 years ago) by mr_bones_
Branch: MAIN
Changes since 1.1: +2 -2 lines
whitespace
(Portage version: 2.1.6.13/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20