summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2017-02-22 21:50:03 +0100
committerMarc Schiffbauer <mschiff@gentoo.org>2017-02-22 21:50:26 +0100
commit6ce4c1a22f884a46e8c8f5747f8b7f5bfcc3e141 (patch)
tree3be46f2afbc3d382005637f4f58b3a7697d048f4 /app-crypt/dehydrated
parentmedia-video/kaffeine: Version bump 2.0.6 (diff)
downloadgentoo-6ce4c1a22f884a46e8c8f5747f8b7f5bfcc3e141.tar.gz
gentoo-6ce4c1a22f884a46e8c8f5747f8b7f5bfcc3e141.tar.bz2
gentoo-6ce4c1a22f884a46e8c8f5747f8b7f5bfcc3e141.zip
app-crypt/dehydrated: revbump for better system integration
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-crypt/dehydrated')
-rw-r--r--app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild64
-rw-r--r--app-crypt/dehydrated/files/00_gentoo.sh2
-rw-r--r--app-crypt/dehydrated/files/cron2
3 files changed, 68 insertions, 0 deletions
diff --git a/app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild b/app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..22618ac0ec73
--- /dev/null
+++ b/app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit user
+
+DESCRIPTION="a client for signing certificates with an ACME-server"
+HOMEPAGE="https://github.com/lukas2511/dehydrated"
+SRC_URI="https://github.com/lukas2511/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/cron"
+RDEPEND="
+ ${DEPEND}
+ app-shells/bash
+"
+
+src_configure() {
+ default
+ sed -i 's,^#CONFIG_D=.*",CONFIG_D="/etc/dehydrated/config.d",' docs/examples/config || die "could not set config"
+}
+
+src_install() {
+ dobin "${PN}"
+ insinto "/etc/${PN}"
+ doins docs/examples/{config,domains.txt,hook.sh}
+ dodoc docs/*.md
+
+ insinto /etc/"${PN}"/config.d
+ doins "${FILESDIR}"/00_gentoo.sh
+
+ insinto "/etc/cron.d"
+ newins "${FILESDIR}"/cron "${PN}"
+
+ dodir /etc/"${PN}"/config.d
+ keepdir /etc/"${PN}"/config.d
+
+ default
+}
+
+pkg_preinst() {
+ enewgroup "${PN}"
+ enewuser "${PN}" -1 -1 /var/lib/"${PN}" "${PN}"
+}
+
+pkg_postinst() {
+ if [[ "${REPLACING_VERSIONS}" =~ (0\.3\.1|0\.4\.0) ]]; then
+ ewarn ""
+ ewarn "The new default BASEDIR is now '/var/lib/dehydrated'"
+ ewarn "Please consider migrating your data with a command like"
+ ewarn ""
+ ewarn " 'mv -v /etc/dehydrated/{accounts,archive,certs,lock} /var/lib/dehydrated'"
+ ewarn ""
+ ewarn "and make sure BASEDIR is set to '/var/lib/dehydrated'"
+ ewarn ""
+ fi
+ einfo "See /etc/dehydrated/config for configuration."
+ einfo "After finishing setup you should enable the cronjob in /etc/cron.d/dehydrated."
+}
diff --git a/app-crypt/dehydrated/files/00_gentoo.sh b/app-crypt/dehydrated/files/00_gentoo.sh
new file mode 100644
index 000000000000..99b6c0efee52
--- /dev/null
+++ b/app-crypt/dehydrated/files/00_gentoo.sh
@@ -0,0 +1,2 @@
+# base config required for gentoo defaults
+BASEDIR="/var/lib/dehydrated"
diff --git a/app-crypt/dehydrated/files/cron b/app-crypt/dehydrated/files/cron
new file mode 100644
index 000000000000..df03b5fcee13
--- /dev/null
+++ b/app-crypt/dehydrated/files/cron
@@ -0,0 +1,2 @@
+# dehydrated cron job
+#0 2 * * * dehydrated /usr/bin/dehydrated --cron