diff options
author | Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com> | 2020-06-02 11:30:48 +0200 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2020-10-26 10:09:28 -0700 |
commit | 109be7e6b9f524f6290b76e15f2b284c3ea43eb9 (patch) | |
tree | 185eb34e0f19368df2e595bf9b56b319140ed79e /sys-block/zram-init/zram-init-9999.ebuild | |
parent | dev-vcs/git: Re-added "subversion" USE flag. (diff) | |
download | gentoo-109be7e6b9f524f6290b76e15f2b284c3ea43eb9.tar.gz gentoo-109be7e6b9f524f6290b76e15f2b284c3ea43eb9.tar.bz2 gentoo-109be7e6b9f524f6290b76e15f2b284c3ea43eb9.zip |
sys-block/zram-init: version bump
Closes: https://bugs.gentoo.org/732176
Closes: https://github.com/gentoo/gentoo/pull/16049
Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com>
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sys-block/zram-init/zram-init-9999.ebuild')
-rw-r--r-- | sys-block/zram-init/zram-init-9999.ebuild | 77 |
1 files changed, 47 insertions, 30 deletions
diff --git a/sys-block/zram-init/zram-init-9999.ebuild b/sys-block/zram-init/zram-init-9999.ebuild index 87a6d31eaf21..adc7997651c8 100644 --- a/sys-block/zram-init/zram-init-9999.ebuild +++ b/sys-block/zram-init/zram-init-9999.ebuild @@ -2,53 +2,70 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit readme.gentoo-r1 systemd -DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zram" -HOMEPAGE="https://github.com/vaeth/zram-init/" +inherit prefix readme.gentoo-r1 -LICENSE="GPL-2" -SLOT="0" -IUSE="" +DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zRAM" +HOMEPAGE="https://github.com/vaeth/zram-init/" -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/vaeth/${PN}.git" +if [[ ${PV} == *9999 ]]; then inherit git-r3 + EGIT_REPO_URI="https://github.com/vaeth/${PN}.git" else SRC_URI="https://github.com/vaeth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" fi -RDEPEND=">=app-shells/push-2.0 - !<sys-apps/openrc-0.13" +LICENSE="GPL-2" +SLOT="0" + +BDEPEND="sys-devel/gettext" + +RDEPEND=" + >=app-shells/push-2.0 + virtual/libintl + || ( sys-apps/openrc sys-apps/systemd ) +" -DISABLE_AUTOFORMATTING="true" -DOC_CONTENTS="To use zram, activate it in your kernel and add it to default runlevel: - rc-config add zram default -If you use systemd enable zram_swap, tmp, and/or var_tmp with systemctl. -You might need to modify /etc/modprobe.d/zram.conf" +DISABLE_AUTOFORMATTING=true +DOC_CONTENTS="\ +To use zram-init, activate it in your kernel and add it to the default +runlevel: + rc-update add zram-init default +If you use systemd enable zram_swap, zram_tmp, and/or zram_var_tmp with +systemctl. You might need to modify the following file depending on the +number of devices that you want to create: + ${EROOT}/etc/modprobe.d/zram.conf. +If you use the \$TMPDIR as zRAM device with OpenRC, you should add zram-init +to the boot runlevel: + rc-update add zram-init boot +Still for the same case, you should add in the OpenRC configuration file +for the services using \$TMPDIR the following line: + rc_need=\"zram-init\"" src_prepare() { - use prefix || sed -i \ - -e '1s"^#!/usr/bin/env sh$"#!'"${EPREFIX}/bin/sh"'"' \ - -e 's#PushA_=`push.sh 2>/dev/null`#PushA_=`cat '"${EPREFIX}"'/usr/share/push/push.sh`#' \ - -- sbin/zram-init || die default + + hprefixify "${S}/man/${PN}.8" + + hprefixify -e "s%(}|:)(/(usr/)?sbin)%\1${EPREFIX}\2%g" \ + "${S}/sbin/${PN}.in" + + hprefixify -e "s%( |=)(/tmp)%\1${EPREFIX}\2%g" \ + "${S}/systemd/system"/* \ + "${S}/openrc"/*/* +} + +src_compile() { + emake PREFIX="${EPREFIX}/usr" MODIFY_SHEBANG=FALSE } src_install() { - doinitd openrc/init.d/* - doconfd openrc/conf.d/* - systemd_dounit systemd/system/* - insinto /etc/modprobe.d - doins modprobe.d/* - insinto /usr/share/zsh/site-functions - doins zsh/* - dodoc AUTHORS ChangeLog README.md + einstalldocs readme.gentoo_create_doc - into / - dosbin sbin/* - doman man/${PN}.8 + + emake DESTDIR="${ED}" PREFIX="/usr" SYSCONFDIR="/etc" \ + BINDIR="${ED}/sbin" install } pkg_postinst() { |