commit:     846d4eae241320579e3ca95a947d40e283ea6eab
Author:     Andrew Udvare <audvare <AT> gmail <DOT> com>
AuthorDate: Tue Jun  2 05:58:43 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jun  4 20:52:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=846d4eae

sys-devel/prelink: add systemd timer

Signed-off-by: Andrew Udvare <audvare <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16047
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/prelink/files/prelink.service                 |  6 ++++++
 sys-devel/prelink/files/prelink.timer                   | 10 ++++++++++
 ...elink-99999999.ebuild => prelink-20151030-r1.ebuild} | 17 ++++++++---------
 sys-devel/prelink/prelink-99999999.ebuild               |  3 ++-
 4 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/sys-devel/prelink/files/prelink.service 
b/sys-devel/prelink/files/prelink.service
new file mode 100644
index 00000000000..dcdbf813a0e
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Perform system-wide prelinking
+
+[Service]
+Type=oneshot
+ExecStart=/etc/cron.daily/prelink

diff --git a/sys-devel/prelink/files/prelink.timer 
b/sys-devel/prelink/files/prelink.timer
new file mode 100644
index 00000000000..5d58d437158
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Daily system-wide prelinking
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=timers.target

diff --git a/sys-devel/prelink/prelink-99999999.ebuild 
b/sys-devel/prelink/prelink-20151030-r1.ebuild
similarity index 79%
copy from sys-devel/prelink/prelink-99999999.ebuild
copy to sys-devel/prelink/prelink-20151030-r1.ebuild
index 705ff619963..596f57b3912 100644
--- a/sys-devel/prelink/prelink-99999999.ebuild
+++ b/sys-devel/prelink/prelink-20151030-r1.ebuild
@@ -6,14 +6,16 @@ EAPI="7"
 MY_PN="${PN}-cross"
 MY_P="${MY_PN}-${PV}"
 
-inherit autotools flag-o-matic git-r3
+inherit autotools flag-o-matic systemd
 
 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in 
faster load times"
 HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ 
https://people.redhat.com/jakub/prelink";
-EGIT_REPO_URI="https://git.yoctoproject.org/git/prelink-cross";
+SRC_URI="https://git.yoctoproject.org/cgit/cgit.cgi/${MY_PN}/snapshot/${MY_P}.tar.bz2
+       doc? ( https://people.redhat.com/jakub/prelink/prelink.pdf )"
 
 LICENSE="GPL-2"
 SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
 IUSE="doc selinux"
 
 RDEPEND=">=dev-libs/elfutils-0.100
@@ -22,6 +24,8 @@ RDEPEND=">=dev-libs/elfutils-0.100
 DEPEND="${RDEPEND}
        sys-libs/binutils-libs"
 
+S=${WORKDIR}/${MY_P}
+
 PATCHES=(
        "${FILESDIR}"/${PN}-20130503-prelink-conf.patch
        "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
@@ -41,16 +45,10 @@ src_configure() {
        econf $(use_enable selinux)
 }
 
-src_test() {
-       # prelink tests check exact library lists.
-       # LD_PRELOADed libraries break the assumption.
-       SANDBOX_ON=0 LD_PRELOAD= emake check VERBOSE=1
-}
-
 src_install() {
        default
 
-       use doc && dodoc doc/prelink.pdf
+       use doc && dodoc "${DISTDIR}"/prelink.pdf
 
        insinto /etc
        doins doc/prelink.conf
@@ -58,6 +56,7 @@ src_install() {
        exeinto /etc/cron.daily
        newexe "${FILESDIR}"/prelink.cron prelink
        newconfd "${FILESDIR}"/prelink.confd prelink
+       systemd_dounit "${FILESDIR}"/prelink.{service,timer}
 }
 
 pkg_postinst() {

diff --git a/sys-devel/prelink/prelink-99999999.ebuild 
b/sys-devel/prelink/prelink-99999999.ebuild
index 705ff619963..dfe534db619 100644
--- a/sys-devel/prelink/prelink-99999999.ebuild
+++ b/sys-devel/prelink/prelink-99999999.ebuild
@@ -6,7 +6,7 @@ EAPI="7"
 MY_PN="${PN}-cross"
 MY_P="${MY_PN}-${PV}"
 
-inherit autotools flag-o-matic git-r3
+inherit autotools flag-o-matic git-r3 systemd
 
 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in 
faster load times"
 HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ 
https://people.redhat.com/jakub/prelink";
@@ -58,6 +58,7 @@ src_install() {
        exeinto /etc/cron.daily
        newexe "${FILESDIR}"/prelink.cron prelink
        newconfd "${FILESDIR}"/prelink.confd prelink
+       systemd_dounit "${FILESDIR}"/prelink.{service,timer}
 }
 
 pkg_postinst() {

Reply via email to