systemd-readahead-216.ebuild 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit systemd toolchain-funcs udev
  5. DESCRIPTION="Split of readahead systemd implementation"
  6. HOMEPAGE="https://dev.gentoo.org/~pacho/systemd-readahead.html"
  7. SRC_URI="https://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
  8. LICENSE="LGPL-2.1 MIT"
  9. SLOT="0"
  10. KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
  11. IUSE=""
  12. S=${WORKDIR}/systemd-${PV}
  13. RDEPEND=">=sys-apps/systemd-217:="
  14. DEPEND="${RDEPEND}
  15. app-arch/xz-utils:0
  16. dev-util/gperf
  17. >=dev-util/intltool-0.50
  18. >=sys-apps/coreutils-8.16
  19. >=sys-devel/binutils-2.23.1
  20. >=sys-kernel/linux-headers-3.8
  21. virtual/pkgconfig
  22. "
  23. src_prepare() {
  24. # systemd-notify no longer supports readahead playing
  25. sed -i -e 's:ExecStart=@SYSTEMD_NOTIFY@ --readahead=done:ExecStart=/bin/touch /run/systemd/readahead/done:' \
  26. units/systemd-readahead-done.service.in || die
  27. }
  28. src_configure() {
  29. # Keep using the one where the rules were installed.
  30. MY_UDEVDIR=$(get_udevdir)
  31. # Fix systems broken by bug #509454.
  32. [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
  33. local myeconfargs=(
  34. # disable -flto since it is an optimization flag
  35. # and makes distcc less effective
  36. cc_cv_CFLAGS__flto=no
  37. --enable-readahead
  38. --disable-maintainer-mode
  39. --localstatedir=/var
  40. # make sure we get /bin:/sbin in $PATH
  41. --enable-split-usr
  42. # For testing.
  43. --with-rootprefix="${ROOTPREFIX-/usr}"
  44. --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
  45. # disable sysv compatibility
  46. --with-sysvinit-path=
  47. --with-sysvrcnd-path=
  48. # Disable most of the stuff
  49. --disable-efi
  50. --disable-ima
  51. --disable-acl
  52. --disable-apparmor
  53. --disable-audit
  54. --disable-libcryptsetup
  55. --disable-libcurl
  56. --disable-gtk-doc
  57. --disable-elfutils
  58. --disable-gcrypt
  59. --disable-gudev
  60. --disable-microhttpd
  61. --disable-gnutls
  62. --disable-libidn
  63. --disable-introspection
  64. --disable-kdbus
  65. --disable-kmod
  66. --disable-lz4
  67. --disable-xz
  68. --disable-pam
  69. --disable-polkit
  70. --without-python
  71. --disable-python-devel
  72. --disable-qrencode
  73. --disable-seccomp
  74. --disable-selinux
  75. --disable-tests
  76. --disable-dbus
  77. --disable-smack
  78. --disable-blkid
  79. --disable-multi-seat-x
  80. --disable-myhostname
  81. # Disable optional binaries
  82. --disable-backlight
  83. --disable-binfmt
  84. --disable-bootchart
  85. --disable-coredump
  86. --disable-firstboot
  87. --disable-hostnamed
  88. --disable-localed
  89. --disable-logind
  90. --disable-machined
  91. --disable-networkd
  92. --disable-quotacheck
  93. --disable-randomseed
  94. --disable-resolved
  95. --disable-rfkill
  96. --disable-sysusers
  97. --disable-timedated
  98. --disable-timesyncd
  99. --disable-tmpfiles
  100. --disable-vconsole
  101. # not supported (avoid automagic deps in the future)
  102. --disable-chkconfig
  103. # dbus paths
  104. --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
  105. --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
  106. --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
  107. --with-dbusinterfacedir="${EPREFIX}/usr/share/dbus-1/interfaces"
  108. )
  109. # Work around bug 463846.
  110. tc-export CC
  111. econf "${myeconfargs[@]}"
  112. }
  113. src_compile() {
  114. echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
  115. emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
  116. emake systemd-readahead
  117. emake units/systemd-readahead-{drop,collect,replay,done}.service units/systemd-readahead-done.timer
  118. emake man/{sd-readahead.3,sd_readahead.3,systemd-readahead-replay.service.8}
  119. }
  120. src_test() {
  121. einfo "No specific tests for this"
  122. }
  123. src_install() {
  124. # Install main app
  125. exeinto /usr/lib/systemd/
  126. doexe systemd-readahead
  127. # Install unit files
  128. systemd_dounit units/systemd-readahead-{drop,collect,replay,done}.service units/systemd-readahead-done.timer
  129. # Install manpages and aliases
  130. doman man/{sd-readahead.3,sd_readahead.3,systemd-readahead-replay.service.8}
  131. newman man/systemd-readahead-replay.service.8 systemd-readahead-collect.service.8
  132. newman man/systemd-readahead-replay.service.8 systemd-readahead-done.service.8
  133. newman man/systemd-readahead-replay.service.8 systemd-readahead-done.timer.8
  134. newman man/systemd-readahead-replay.service.8 systemd-readahead.8
  135. # Install docs
  136. dodoc TODO README
  137. }