summaryrefslogtreecommitdiff
path: root/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-20 14:45:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-20 14:45:01 +0100
commit34dea8e38f88007799629d0a56b12dec480b1d21 (patch)
tree6790873994b58030360328cf5897d934b3b03d16 /sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild
parent7932d472a02d4c016ff7dff4b7a5479ab9d1883d (diff)
gentoo resync : 20.06.2021
Diffstat (limited to 'sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild')
-rw-r--r--sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild
new file mode 100644
index 000000000000..e8e373515d05
--- /dev/null
+++ b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit epatch multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/53357/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEPEND="sys-libs/ncurses:="
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ !sys-apps/ccs-tools"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-warnings.patch
+
+ # Fix libdir
+ sed -i \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ Include.make || die
+
+ # tinfo
+ sed -i \
+ -e 's|-lncurses|$(shell ${PKG_CONFIG} --libs ncurses)|g' \
+ usr_sbin/Makefile || die
+
+ echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/tomoyo/conf\"" > "${T}/50${PN}"
+
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ dodir /usr/"$(get_libdir)"
+
+ emake INSTALLDIR="${D}" install
+
+ doenvd "${T}/50${PN}"
+
+ # Fix out-of-place readme and license
+ rm "${D}"/usr/$(get_libdir)/tomoyo/{COPYING.tomoyo,README.tomoyo} || die
+ dodoc README.tomoyo
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial policy configuration:"
+ elog
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog
+ elog "For more information, please visit the following."
+ elog
+ elog "http://tomoyo.sourceforge.jp/"
+}
+
+pkg_config() {
+ /usr/$(get_libdir)/tomoyo/init_policy
+}