opentmpfiles-0.1.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. if [[ ${PV} = 9999* ]]; then
  5. inherit git-r3
  6. EGIT_REPO_URI="git://github.com/openrc/${PN}"
  7. else
  8. SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
  9. ${P}.tar.gz"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
  11. fi
  12. DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
  13. HOMEPAGE="https://github.com/openrc/opentmpfiles"
  14. LICENSE="BSD-2"
  15. SLOT="0"
  16. IUSE=""
  17. RDEPEND="!<sys-apps/openrc-0.23"
  18. src_install() {
  19. default
  20. cd openrc
  21. for f in opentmpfiles-dev opentmpfiles-setup; do
  22. newconfd ${f}.confd ${f}
  23. newinitd ${f}.initd ${f}
  24. done
  25. }
  26. add_service() {
  27. local initd=$1
  28. local runlevel=$2
  29. elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
  30. ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
  31. }
  32. pkg_postinst() {
  33. add_service opentmpfiles-dev sysinit
  34. add_service opentmpfiles-setup boot
  35. }