mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
sys-block/zram-init: add 12.2.1
Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
This commit is contained in:
committed by
Jason Zaman
parent
5d23618f9d
commit
b47b23488a
@@ -1 +1,2 @@
|
||||
DIST zram-init-11.1.tar.gz 21117 BLAKE2B c6e99e9df97fe44b4081ce304dd2cd72fbdfa3c705f6cc02787df0376dd04a93cd8fbbf327c05f2f96ad8b6383f4c155e2859c0718c81a6bff50d0b91fb93322 SHA512 dcbfe9bb085e1bb1856f53fb5722fc008a8b7b8099423be174f02fcaa4093c19e24c33f08deeec9d1525b9512b7c5640c4ac396c60f7b6016b56edeb38a64285
|
||||
DIST zram-init-12.2.1.tar.gz 21457 BLAKE2B d4b7c4b8a094e3ce13ec44a497efe205388e756a8c7ddbacdb424a02dd4b04a559d67ca793347cfe1c945f89444fafd8587ddb04dfbd9751afbb02058b7b242d SHA512 f8318ef0fd570791dc2b38a558d3fd98559f1ef34280417629b563f9a93ae4d45833c70151eb123e08cc08881a5bd32318f89a5331e8c8eb593c4ae8bf96b518
|
||||
|
||||
74
sys-block/zram-init/zram-init-12.2.1.ebuild
Normal file
74
sys-block/zram-init/zram-init-12.2.1.ebuild
Normal file
@@ -0,0 +1,74 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit prefix readme.gentoo-r1
|
||||
|
||||
DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zRAM"
|
||||
HOMEPAGE="https://github.com/vaeth/zram-init/"
|
||||
|
||||
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 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT="binchecks strip test"
|
||||
|
||||
BDEPEND="sys-devel/gettext"
|
||||
|
||||
RDEPEND="
|
||||
>=app-shells/push-2.0
|
||||
virtual/libintl
|
||||
|| ( sys-apps/openrc sys-apps/openrc-navi sys-apps/systemd )
|
||||
"
|
||||
|
||||
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:
|
||||
/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() {
|
||||
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() {
|
||||
einstalldocs
|
||||
readme.gentoo_create_doc
|
||||
|
||||
emake DESTDIR="${ED}" PREFIX="/usr" BINDIR="${ED}/sbin" SYSCONFDIR="/etc" \
|
||||
SYSTEMDDIR="${ED}/lib/systemd/system" install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_print_elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
Reference in New Issue
Block a user