preload-0.6.4-r3.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils autotools
  5. DESCRIPTION="Adaptive readahead daemon"
  6. HOMEPAGE="https://sourceforge.net/projects/preload/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="vanilla"
  12. WANT_AUTOCONF="2.56"
  13. RDEPEND=">=dev-libs/glib-2.6:2"
  14. DEPEND="${RDEPEND}
  15. virtual/pkgconfig
  16. sys-apps/help2man"
  17. src_prepare() {
  18. epatch "${FILESDIR}"/00-patch-configure.diff
  19. epatch "${FILESDIR}"/02-patch-preload_conf.diff
  20. epatch "${FILESDIR}"/02-patch-preload_sysconfig.diff
  21. epatch "${FILESDIR}"/${PN}-0.6.4-use-help2man-as-usual.patch
  22. epatch "${FILESDIR}"/${PN}-0.6.4-use-make-dependencies.patch
  23. use vanilla || epatch "${FILESDIR}"/000{1,2,3}-*.patch
  24. cat "${FILESDIR}"/preload-0.6.4.init.in-r2 > preload.init.in || die
  25. eautoreconf
  26. }
  27. src_configure() {
  28. econf --localstatedir=/var
  29. }
  30. src_install() {
  31. default
  32. # Remove log and state file from image or they will be
  33. # truncated during merge
  34. rm "${ED}"/var/lib/preload/preload.state || die "cleanup failed"
  35. rm "${ED}"/var/log/preload.log || die "cleanup failed"
  36. keepdir /var/lib/preload
  37. keepdir /var/log
  38. }
  39. pkg_postinst() {
  40. if [ "$(rc-config list default | grep preload)" = "" ] ; then
  41. elog "You probably want to add preload to the default runlevel like so:"
  42. elog "# rc-update add preload default"
  43. fi
  44. if has_version sys-fs/e4rat; then
  45. elog "It appears you have sys-fs/e4rat installed. This may"
  46. elog "has negative effects on it. You may want to disable preload"
  47. elog "when using sys-fs/e4rat."
  48. elog "http://e4rat.sourceforge.net/wiki/index.php/Main_Page#Debian.2FUbuntu"
  49. fi
  50. }