DIST zram-init-2.7.tar.gz 4821 SHA256 205765243bd36bf62c471363c4fddf8173275d37f5f919716b5b71afea0fe94d SHA512 db8dc5580b8405752d58996e5927573b687795b598c94948ccc51d038f7c7dfc47b64651d9554c1807d8f6453498c3f1efe6f2d34b82eb6b1df2d8f7e84980a5 WHIRLPOOL 1c677453567836db416b933e675df9c30f61797f8c5d32570693372df85729798aa3aa056dbee78ca5a3cf2a44c80ce4f8f54481751f35e03e01dbb0679dfc79
DIST zram-init-3.0.tar.gz 5578 SHA256 a1b4bf7f90497a44388f349c3c766e13e575ff7b52168f74058e9b352244b71a SHA512 f962aaa9c5d7f8f7566e9e405de4709fcfd0b659c7dcf79008ca5b7b18ab44545f363e8a695bfff07068e0889ec79ce54af578493f82be3848ca306865d6555a WHIRLPOOL 6304d5192b81490e33962e3162f18729e5a8438bb3f10b90744045014c3ef91a18c2a65538b97f02811cc793d88fb7eddc7efa3129c3b150e70cddfb3694305f
+DIST zram-init-3.4.tar.gz 5825 SHA256 39e121d209a03a29f98bbb0be47ce666bf6c0ef7185af30f118976fbe68a8788 SHA512 985cbe5dd63c900ce88bf8f8989bc04f982b27104dbc40e9c4cf504310aca335efafba842d801e0b9250e8b6925d063bcd2c555122fc7c7295128687ccd4080f WHIRLPOOL 086426e0f334c500f9dc65273afad1acdbd7696882cd0a9f54f7b27fac347777f8dea0899a2719626648da9dee1c837f6f3ccebd8cf1e1c9dc550624c2eb9416
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info readme.gentoo systemd
+
+DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zram"
+HOMEPAGE="https://github.com/vaeth/zram-init/"
+SRC_URI="https://github.com/vaeth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!<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"'"' \
+ -- sbin/* || die
+ epatch_user
+}
+
+src_install() {
+ dosbin sbin/*
+ 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/*
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ if kernel_is -lt 3 15 ; then
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "sys-block/zram-init default config starting from version 3.0"
+ ewarn "requires a kernel >= 3.15.0."
+ ewarn "Make sure you have edited it, so it uses only functions"
+ ewarn "available for your kernel version (bug 525302)."
+ fi
+}