commit:     a85313eceb8e3e8d4031051c0d35336e41f42d7d
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Wed May 17 08:13:29 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sun May 28 22:39:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a85313ec

net-vpn/openvpn: fix installation of systemd units and tmpfiles

Bug: https://bugs.gentoo.org/618722

 net-vpn/openvpn/{openvpn-2.4.2.ebuild => openvpn-2.4.2-r1.ebuild} | 6 ++----
 net-vpn/openvpn/openvpn-9999.ebuild                               | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/net-vpn/openvpn/openvpn-2.4.2.ebuild 
b/net-vpn/openvpn/openvpn-2.4.2-r1.ebuild
similarity index 94%
rename from net-vpn/openvpn/openvpn-2.4.2.ebuild
rename to net-vpn/openvpn/openvpn-2.4.2-r1.ebuild
index 09d3fffa7ae..830141cf3bb 100644
--- a/net-vpn/openvpn/openvpn-2.4.2.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.2-r1.ebuild
@@ -66,6 +66,8 @@ src_prepare() {
 
 src_configure() {
        use static && append-ldflags -Xcompiler -static
+       SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
+       TMPFILES_DIR="/usr/lib/tmpfiles.d" \
        econf \
                $(usex mbedtls '--with-crypto-library=mbedtls' '') \
                $(use_enable inotify async-push) \
@@ -110,10 +112,6 @@ src_install() {
                insinto /usr/share/doc/${PF}/examples
                doins -r sample contrib
        fi
-
-       systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-       use systemd && systemd_newunit distro/systemd/[email protected] 
[email protected]
-       use systemd && systemd_newunit distro/systemd/[email protected] 
[email protected]
 }
 
 pkg_postinst() {

diff --git a/net-vpn/openvpn/openvpn-9999.ebuild 
b/net-vpn/openvpn/openvpn-9999.ebuild
index 125b8c14fee..8a34713832c 100644
--- a/net-vpn/openvpn/openvpn-9999.ebuild
+++ b/net-vpn/openvpn/openvpn-9999.ebuild
@@ -64,6 +64,8 @@ src_prepare() {
 
 src_configure() {
        use static && append-ldflags -Xcompiler -static
+       SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
+       TMPFILES_DIR="/usr/lib/tmpfiles.d" \
        econf \
                --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
                $(usex mbedtls 'with-crypto-library' 'mbedtls' '' '') \
@@ -109,10 +111,6 @@ src_install() {
                insinto /usr/share/doc/${PF}/examples
                doins -r sample contrib
        fi
-
-       systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-       systemd_newunit distro/systemd/[email protected] 
[email protected]
-       systemd_newunit distro/systemd/[email protected] 
[email protected]
 }
 
 pkg_postinst() {

Reply via email to