diff --git a/sys-block/zram-init/Manifest b/sys-block/zram-init/Manifest index b1911c4..85b1770 100644 --- a/sys-block/zram-init/Manifest +++ b/sys-block/zram-init/Manifest @@ -1 +1,2 @@ DIST zram-init-12.2.2.tar.gz 21463 BLAKE2B da9f4d96ad7e9113462e33c2e8b19362b4f930709a4d3a563b33c6a2764b4d97f356803326933ebf7f7d18e0667129a5004663c2d1cb68505557ccd0b970c28b SHA512 cbb6cb921f8ba066a8d87b88da6e9d099faaf7d34139573c7d42225903d27670a733513f23eb7787307d50d975d7e5d397f69fafe9edb7ec9e84f14f4312a7a1 +DIST zram-init-13.0.tar.gz 21245 BLAKE2B bda06b3d7a06660dc39448026b1a5782f543eb46b177a8fd864f55f38cb770e13b22c3a85103d49bc4fcf2e093d65c7ca919f5998b94596391b653bd8379c577 SHA512 d5de30df66b6ad0cbfc8842c8dbb99606832b6569e6bc8acacc6b5982b2f5fd7155ad572356fc7579e6be82b4766d942efcd4f621ed211d4a4f4cd1d4a893d19 diff --git a/sys-block/zram-init/zram-init-13.0.ebuild b/sys-block/zram-init/zram-init-13.0.ebuild new file mode 100644 index 0000000..9540ac3 --- /dev/null +++ b/sys-block/zram-init/zram-init-13.0.ebuild @@ -0,0 +1,69 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix readme.gentoo-r1 + +DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zRAM" +HOMEPAGE="https://github.com/vaeth/zram-init/" + +SRC_URI="https://api.github.com/repos/vaeth/zram-init/tarball/v13.0 -> zram-init-13.0.tar.gz" +KEYWORDS="*" + +LICENSE="GPL-2" +SLOT="0" + +BDEPEND="sys-devel/gettext" + +RDEPEND=" + app-shells/push + virtual/libintl + || ( sys-apps/openrc 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_unpack() { + default + rm -rf ${S} + mv ${WORKDIR}/vaeth-zram-init-* ${S} || die +} + +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" SYSCONFDIR="/etc" \ + BINDIR="${ED}/sbin" SYSTEMDDIR="${ED}/lib/systemd/system" install +} + +pkg_postinst() { + readme.gentoo_print_elog +} \ No newline at end of file