net-vpn/openvpn: fix installation of systemd units and tmpfiles
authorAlexander Tsoy <alexander@tsoy.me>
Wed, 17 May 2017 08:13:29 +0000 (11:13 +0300)
committerManuel Rüger <mrueg@gentoo.org>
Sun, 28 May 2017 22:39:21 +0000 (00:39 +0200)
Bug: https://bugs.gentoo.org/618722

net-vpn/openvpn/openvpn-2.4.2-r1.ebuild [moved from net-vpn/openvpn/openvpn-2.4.2.ebuild with 94% similarity]
net-vpn/openvpn/openvpn-9999.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 09d3fffa7ae240105030f5e90f5d61b728473a7d..830141cf3bb65c6c33879682b3fd0954e7b1b929 100644 (file)
@@ -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/openvpn-client@.service openvpn-client@.service
-       use systemd && systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
 }
 
 pkg_postinst() {
index 125b8c14fee119654da76c117dffbec4e76d92fd..8a34713832c5ea8afe77598fb924b38a582d21aa 100644 (file)
@@ -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/openvpn-client@.service openvpn-client@.service
-       systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
 }
 
 pkg_postinst() {