--- /dev/null
+From: Dominik Kriegner <dominik.kriegner@gmail.com>
+Date: Tue, 26 Jan 2016 12:12:26 +0000
+Subject: [PATCH] Fix systemd unit file
+
+Project-Bug-URL: https://github.com/ioerror/tlsdate/pull/162
+Gentoo-Bug-URL: https://bugs.gentoo.org/533380
+
+--- a/systemd/tlsdated.service
++++ b/systemd/tlsdated.service
+@@ -5,6 +5,9 @@ After=network.target
+ [Service]
+ Type=simple
+ EnvironmentFile=/etc/default/tlsdated
+-ExecStart=/usr/sbin/tlsdated ${DAEMON_OPTS}
+-ExecReload=/bin/kill -HUP ${MAINPID}
+-ExecStop=/bin/kill -INT ${MAINPID}
++ExecStart=/usr/sbin/tlsdated $DAEMON_OPTS
++ExecReload=/bin/kill -HUP $MAINPID
++ExecStop=/bin/kill -INT $MAINPID
++
++[Install]
++WantedBy=multi-user.target
--- /dev/null
+# defaults file for /etc/default/tlsdated
+
+# Additional options; see `man tlsdated` for reference.
+DEAMON_OPTS=""
--- /dev/null
+d /var/cache/tlsdated 0700 tlsdate tlsdate -
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="4"
-inherit autotools vcs-snapshot user
+inherit autotools eutils systemd vcs-snapshot user
DESCRIPTION="Update local time over HTTPS"
HOMEPAGE="https://github.com/ioerror/tlsdate"
sed -i \
-e 's:/tlsdate/ca-roots/tlsdate-ca-roots.conf:/ssl/certs/ca-certificates.crt:' \
Makefile.am || die
+ epatch "${FILESDIR}"/${P}-tlsdated-service.patch
eautoreconf
}
newinitd "${FILESDIR}"/tlsdate.rc tlsdate
newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ systemd_newunit "${S}"/systemd/tlsdated.service tlsdated.service
+ systemd_newtmpfilesd "${FILESDIR}"/tlsdated.tmpfiles.conf tlsdated.conf
+ insinto /etc/default
+ newins "${FILESDIR}"/tlsdated.default tlsdated
+
insinto /etc/dbus-1/system.d/
doins dbus/org.torproject.tlsdate.conf