summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2018-01-13 12:36:10 +0900
committerBenda Xu <heroxbd@gentoo.org>2018-02-06 12:14:58 +0900
commit68549620265e97d963ebf5d969699b7ebd4eaead (patch)
tree6db2a53392cf50630dbedd6b0b62fd0c044012a6 /sys-apps/opentmpfiles
parentp/f/p/s/kernel-2.6.32+: mask net-libs/libnsl (diff)
downloadgentoo-68549620265e97d963ebf5d969699b7ebd4eaead.tar.gz
gentoo-68549620265e97d963ebf5d969699b7ebd4eaead.tar.bz2
gentoo-68549620265e97d963ebf5d969699b7ebd4eaead.zip
sys-apps/opentmpfiles: support Prefix.
Reported-By: Paul Preney, Horea Christian, Cyril de Vaucleroy Closes: https://bugs.gentoo.org/644484 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sys-apps/opentmpfiles')
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-0.1.3-r1.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/sys-apps/opentmpfiles/opentmpfiles-0.1.3-r1.ebuild b/sys-apps/opentmpfiles/opentmpfiles-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..cd2b8eff44b1
--- /dev/null
+++ b/sys-apps/opentmpfiles/opentmpfiles-0.1.3-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit prefix
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openrc/${PN}"
+else
+ SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
+ ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
+HOMEPAGE="https://github.com/openrc/opentmpfiles"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="selinux"
+
+RDEPEND="!<sys-apps/openrc-0.23
+ selinux? ( sec-policy/selinux-base-policy )"
+
+src_prepare() {
+ default
+ hprefixify tmpfiles
+}
+src_install() {
+ emake DESTDIR="${ED}" install
+ einstalldocs
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ if [[ -z $REPLACING_VERSIONS ]]; then
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+ fi
+}