mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
sys-devel/prelink: add systemd timer
Signed-off-by: Andrew Udvare <audvare@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/16047 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
committed by
Sergei Trofimovich
parent
6437783817
commit
846d4eae24
6
sys-devel/prelink/files/prelink.service
Normal file
6
sys-devel/prelink/files/prelink.service
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Perform system-wide prelinking
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/etc/cron.daily/prelink
|
||||
10
sys-devel/prelink/files/prelink.timer
Normal file
10
sys-devel/prelink/files/prelink.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Daily system-wide prelinking
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
AccuracySec=12h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
69
sys-devel/prelink/prelink-20151030-r1.ebuild
Normal file
69
sys-devel/prelink/prelink-20151030-r1.ebuild
Normal file
@@ -0,0 +1,69 @@
|
||||
# Copyright 2002-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
MY_PN="${PN}-cross"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
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"
|
||||
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
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!dev-libs/libelf"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-libs/binutils-libs"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-20130503-prelink-conf.patch
|
||||
"${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147
|
||||
|
||||
has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable selinux)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
use doc && dodoc "${DISTDIR}"/prelink.pdf
|
||||
|
||||
insinto /etc
|
||||
doins doc/prelink.conf
|
||||
|
||||
exeinto /etc/cron.daily
|
||||
newexe "${FILESDIR}"/prelink.cron prelink
|
||||
newconfd "${FILESDIR}"/prelink.confd prelink
|
||||
systemd_dounit "${FILESDIR}"/prelink.{service,timer}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [ -z "${REPLACING_VERSIONS}" ] ; then
|
||||
elog "You may wish to read the Gentoo Linux Prelink Guide, which can be"
|
||||
elog "found online at:"
|
||||
elog " https://wiki.gentoo.org/wiki/Prelink"
|
||||
elog "Please edit /etc/conf.d/prelink to enable and configure prelink"
|
||||
fi
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user