commit: 2d1a910687e204249655184602d6ccb8b0a14c1b
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 3 03:41:33 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 3 03:42:12 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d1a9106
net-vpn/openconnect: cleanup ebuild
Move the OpenRC-related documentation to a static file.
Reorganize src_install.
Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-vpn/openconnect/files/README.OpenRC.txt | 25 +++++++++++++++
net-vpn/openconnect/openconnect-8.06.ebuild | 50 ++++++-----------------------
net-vpn/openconnect/openconnect-9999.ebuild | 50 ++++++-----------------------
3 files changed, 43 insertions(+), 82 deletions(-)
diff --git a/net-vpn/openconnect/files/README.OpenRC.txt
b/net-vpn/openconnect/files/README.OpenRC.txt
new file mode 100644
index 00000000000..6bd43e62dfb
--- /dev/null
+++ b/net-vpn/openconnect/files/README.OpenRC.txt
@@ -0,0 +1,25 @@
+The init script for openconnect supports multiple vpn tunnels.
+
+You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d
+instead of calling it directly:
+
+ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0
+
+You can then start the vpn tunnel like this:
+
+/etc/init.d/openconnect.vpn0 start
+
+If you would like to run preup, postup, predown, and/or postdown scripts,
+You need to create a directory in /etc/openconnect with the name of the vpn:
+
+mkdir /etc/openconnect/vpn0
+
+Then add executable shell files:
+
+mkdir /etc/openconnect/vpn0
+cd /etc/openconnect/vpn0
+echo '#!/bin/sh' > preup.sh
+cp preup.sh predown.sh
+cp preup.sh postup.sh
+cp preup.sh postdown.sh
+chmod 755 /etc/openconnect/vpn0/*
diff --git a/net-vpn/openconnect/openconnect-8.06.ebuild
b/net-vpn/openconnect/openconnect-8.06.ebuild
index a3c08e954af..45d091c8dc3 100644
--- a/net-vpn/openconnect/openconnect-8.06.ebuild
+++ b/net-vpn/openconnect/openconnect-8.06.ebuild
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python{3_6,3_7} )
PYTHON_REQ_USE="xml"
-inherit eutils linux-info python-any-r1 readme.gentoo-r1
+inherit linux-info python-any-r1
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://gitlab.com/openconnect/openconnect.git"
@@ -106,55 +106,23 @@ src_configure() {
econf "${myconf[@]}"
}
-DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels.
-
-You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d
-instead of calling it directly:
-
-ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0
-
-You can then start the vpn tunnel like this:
-
-/etc/init.d/openconnect.vpn0 start
-
-If you would like to run preup, postup, predown, and/or postdown scripts,
-You need to create a directory in /etc/openconnect with the name of the vpn:
-
-mkdir /etc/openconnect/vpn0
-
-Then add executable shell files:
-
-mkdir /etc/openconnect/vpn0
-cd /etc/openconnect/vpn0
-echo '#!/bin/sh' > preup.sh
-cp preup.sh predown.sh
-cp preup.sh postup.sh
-cp preup.sh postdown.sh
-chmod 755 /etc/openconnect/vpn0/*
-"
-
src_install() {
default
+ find "${ED}" -name '*.la' -delete || die
+
+ dodoc "${FILESDIR}"/README.OpenRC.txt
+
newinitd "${FILESDIR}"/openconnect.init.in-r4 openconnect
insinto /etc/openconnect
+
newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+
exeinto /etc/openconnect
newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+
insinto /etc/logrotate.d
newins "${FILESDIR}"/openconnect.logrotate openconnect
- keepdir /var/log/openconnect
- find "${ED}" -name '*.la' -delete || die
-
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- readme.gentoo_print_elog
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog
- elog "You may want to consider installing the following
optional packages."
- optfeature "resolvconf support" virtual/resolvconf
- fi
+ keepdir /var/log/openconnect
}
diff --git a/net-vpn/openconnect/openconnect-9999.ebuild
b/net-vpn/openconnect/openconnect-9999.ebuild
index a3c08e954af..45d091c8dc3 100644
--- a/net-vpn/openconnect/openconnect-9999.ebuild
+++ b/net-vpn/openconnect/openconnect-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python{3_6,3_7} )
PYTHON_REQ_USE="xml"
-inherit eutils linux-info python-any-r1 readme.gentoo-r1
+inherit linux-info python-any-r1
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://gitlab.com/openconnect/openconnect.git"
@@ -106,55 +106,23 @@ src_configure() {
econf "${myconf[@]}"
}
-DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels.
-
-You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d
-instead of calling it directly:
-
-ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0
-
-You can then start the vpn tunnel like this:
-
-/etc/init.d/openconnect.vpn0 start
-
-If you would like to run preup, postup, predown, and/or postdown scripts,
-You need to create a directory in /etc/openconnect with the name of the vpn:
-
-mkdir /etc/openconnect/vpn0
-
-Then add executable shell files:
-
-mkdir /etc/openconnect/vpn0
-cd /etc/openconnect/vpn0
-echo '#!/bin/sh' > preup.sh
-cp preup.sh predown.sh
-cp preup.sh postup.sh
-cp preup.sh postdown.sh
-chmod 755 /etc/openconnect/vpn0/*
-"
-
src_install() {
default
+ find "${ED}" -name '*.la' -delete || die
+
+ dodoc "${FILESDIR}"/README.OpenRC.txt
+
newinitd "${FILESDIR}"/openconnect.init.in-r4 openconnect
insinto /etc/openconnect
+
newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+
exeinto /etc/openconnect
newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+
insinto /etc/logrotate.d
newins "${FILESDIR}"/openconnect.logrotate openconnect
- keepdir /var/log/openconnect
- find "${ED}" -name '*.la' -delete || die
-
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- readme.gentoo_print_elog
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog
- elog "You may want to consider installing the following
optional packages."
- optfeature "resolvconf support" virtual/resolvconf
- fi
+ keepdir /var/log/openconnect
}