commit:     109be7e6b9f524f6290b76e15f2b284c3ea43eb9
Author:     Mattéo Rossillol‑‑Laruelle <beatussum <AT> protonmail <DOT> com>
AuthorDate: Tue Jun  2 09:30:48 2020 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Mon Oct 26 17:09:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=109be7e6

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 <AT> protonmail.com>
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 sys-block/zram-init/Manifest              |  2 +-
 sys-block/zram-init/metadata.xml          |  7 ++-
 sys-block/zram-init/zram-init-10.5.ebuild | 73 +++++++++++++++++++++++++++++
 sys-block/zram-init/zram-init-9.1.ebuild  | 56 ----------------------
 sys-block/zram-init/zram-init-9999.ebuild | 77 +++++++++++++++++++------------
 5 files changed, 127 insertions(+), 88 deletions(-)

diff --git a/sys-block/zram-init/Manifest b/sys-block/zram-init/Manifest
index f0102627e4b..cc5be001e1a 100644
--- a/sys-block/zram-init/Manifest
+++ b/sys-block/zram-init/Manifest
@@ -1,2 +1,2 @@
+DIST zram-init-10.5.tar.gz 20496 BLAKE2B 
a28ba9e3813be7ca571ac033ca7b4bdf7c95624f9be72288d8478a2fffa950f7bb18fe865b9933fd209dabc705366af8f825fa7ee8a16be364e1d71c7062067c
 SHA512 
97591549aa9b678b0b12efcc27136826c19b42cc0cf027a3f251843ef5678425568c9eb573d24661ce795eede1d136243fcccbf4dcd62e9d61eb7d775f84f1c1
 DIST zram-init-8.1.tar.gz 9177 BLAKE2B 
229a469aeeb0b22b80f48d946d4ff746c7bd5d7b58ea9290db0da011df6d618c7c55ad95810b0be74ff81350182057d9067e834ecba688eb4ffa668521468a8b
 SHA512 
8f688accb7a4231f705f694c4b4e7344bbb338b2b1f09a6dacd900020a4e8583105b25fef5b40f39630db88db6fcc8ec79824945ceaee95ea1279d09d081a994
-DIST zram-init-9.1.tar.gz 11414 BLAKE2B 
d7f7d1fd49594882a043322b905c02ac9e1f6ea78a626fb35ab0939096a062ef384e759d62e2cc4a990946e124317d70a4325b145e38612ebad173752209fa55
 SHA512 
4e3c76a389d188df98479f3f70af28405144b065df60ba191777cbec88d9bfe94be472d94bbb16314c0eefd41d177105cba74b45d1f13e82a741ff21a4d69c6a

diff --git a/sys-block/zram-init/metadata.xml b/sys-block/zram-init/metadata.xml
index b8a5b3e6784..013ba527f06 100644
--- a/sys-block/zram-init/metadata.xml
+++ b/sys-block/zram-init/metadata.xml
@@ -9,8 +9,13 @@
                <email>[email protected]</email>
                <name>Jason Zaman</name>
        </maintainer>
-
        <upstream>
+               <maintainer status="active">
+                       <name>Martin Väth</name>
+                       <email>[email protected]</email>
+               </maintainer>
+               
<changelog>https://raw.githubusercontent.com/vaeth/zram-init/master/ChangeLog</changelog>
+               <bugs-to>https://github.com/vaeth/zram-init/issues/</bugs-to>
                <remote-id type="github">vaeth/zram-init</remote-id>
        </upstream>
 </pkgmetadata>

diff --git a/sys-block/zram-init/zram-init-10.5.ebuild 
b/sys-block/zram-init/zram-init-10.5.ebuild
new file mode 100644
index 00000000000..adc7997651c
--- /dev/null
+++ b/sys-block/zram-init/zram-init-10.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2020 Gentoo Authors
+# 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/";
+
+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
+
+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-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() {
+       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" install
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+}

diff --git a/sys-block/zram-init/zram-init-9.1.ebuild 
b/sys-block/zram-init/zram-init-9.1.ebuild
deleted file mode 100644
index 87a6d31eaf2..00000000000
--- a/sys-block/zram-init/zram-init-9.1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# 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/";
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-
-if [[ ${PV} == *9999 ]] ; then
-       EGIT_REPO_URI="https://github.com/vaeth/${PN}.git";
-       inherit git-r3
-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"
-
-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"
-
-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
-}
-
-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
-       readme.gentoo_create_doc
-       into /
-       dosbin sbin/*
-       doman man/${PN}.8
-}
-
-pkg_postinst() {
-       readme.gentoo_print_elog
-}

diff --git a/sys-block/zram-init/zram-init-9999.ebuild 
b/sys-block/zram-init/zram-init-9999.ebuild
index 87a6d31eaf2..adc7997651c 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() {

Reply via email to