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