spindown-0.4.0-r5.ebuild 1004 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="Spindown is a daemon that can spin down idle disks"
  5. HOMEPAGE="https://code.google.com/p/spindown"
  6. SRC_URI="https://spindown.googlecode.com/files/${P}.tar.gz"
  7. LICENSE="GPL-3"
  8. SLOT="0"
  9. KEYWORDS="~amd64 ~x86"
  10. IUSE=""
  11. DEPEND=""
  12. RDEPEND="${DEPEND}
  13. sys-apps/sg3_utils"
  14. src_prepare() {
  15. eapply "${FILESDIR}"/${P}-CFLAGS-LDFLAGS.patch
  16. eapply_user
  17. }
  18. src_compile() {
  19. emake
  20. }
  21. src_install() {
  22. insinto /etc
  23. newins spindown.conf.example spindown.conf
  24. newinitd "${FILESDIR}"/spindownd.initd-r1 spindownd
  25. newconfd "${FILESDIR}"/spindownd.confd-r1 spindownd
  26. dosbin spindownd
  27. dodoc CHANGELOG README TODO spindown.conf.example
  28. }
  29. pkg_postinst() {
  30. elog "Before starting spindownd the first time"
  31. elog "you should modify /etc/spindown.conf"
  32. elog
  33. elog "To start spindownd by default"
  34. elog "you should add it to the default runlevel:"
  35. elog " rc-update add spindownd default"
  36. }