zram-init-2.7-r1.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils readme.gentoo systemd
  5. DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zram"
  6. HOMEPAGE="https://github.com/vaeth/zram-init/"
  7. SRC_URI="https://github.com/vaeth/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm64 ~x86"
  11. DISABLE_AUTOFORMATTING="true"
  12. DOC_CONTENTS="To use zram, activate it in your kernel and add it to default runlevel:
  13. rc-config add zram default
  14. If you use systemd enable zram_swap, tmp, and/or var_tmp with systemctl.
  15. You might need to modify /etc/modprobe.d/zram.conf"
  16. src_prepare() {
  17. use prefix || sed -i \
  18. -e '1s"^#!/usr/bin/env sh$"#!'"${EPREFIX}/bin/sh"'"' \
  19. -- sbin/* || die
  20. epatch_user
  21. }
  22. src_install() {
  23. dosbin sbin/*
  24. doinitd openrc/init.d/*
  25. doconfd openrc/conf.d/*
  26. systemd_dounit systemd/system/*
  27. insinto /etc/modprobe.d
  28. doins modprobe.d/*
  29. insinto /usr/share/zsh/site-functions
  30. doins zsh/*
  31. readme.gentoo_create_doc
  32. }