You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-block/zram-init/zram-init-7.1-r1.ebuild

49 lines
1.2 KiB

# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit readme.gentoo-r1 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 ~arm64 ~ppc ~ppc64 ~x86"
IUSE=""
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"'"' \
-- sbin/* || 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/*
}
pkg_postinst() {
readme.gentoo_print_elog
}