acpid-2.0.28.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit linux-info systemd
  5. DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
  6. HOMEPAGE="https://sourceforge.net/projects/acpid2"
  7. SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ia64 x86"
  11. IUSE="selinux"
  12. RDEPEND="selinux? ( sec-policy/selinux-apm )"
  13. DEPEND=">=sys-kernel/linux-headers-3"
  14. pkg_pretend() {
  15. local CONFIG_CHECK="~INPUT_EVDEV"
  16. local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support."
  17. [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
  18. }
  19. pkg_setup() { :; }
  20. PATCHES=(
  21. "${FILESDIR}"/${PN}-2.0.25-kde4.patch #515088
  22. "${FILESDIR}"/${PN}-2.0.25-add_mate-power-manager.patch #538590
  23. )
  24. src_install() {
  25. emake DESTDIR="${D}" install
  26. newdoc kacpimon/README README.kacpimon
  27. dodoc -r samples
  28. rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
  29. exeinto /etc/acpi
  30. newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
  31. exeinto /etc/acpi/actions
  32. newexe samples/powerbtn/powerbtn.sh powerbtn.sh
  33. insinto /etc/acpi/events
  34. newins "${FILESDIR}"/${PN}-1.0.4-default default
  35. newinitd "${FILESDIR}"/${PN}-2.0.26-init.d ${PN}
  36. newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
  37. systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
  38. }
  39. pkg_postinst() {
  40. if [[ -z ${REPLACING_VERSIONS} ]]; then
  41. elog
  42. elog "You may wish to read the Gentoo Linux Power Management Guide,"
  43. elog "which can be found online at:"
  44. elog "https://wiki.gentoo.org/wiki/Power_management/Guide"
  45. elog
  46. fi
  47. # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
  48. mkdir -p "${ROOT%/}"/run
  49. if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then
  50. echo
  51. ewarn "You should reboot the system now to get /run mounted with tmpfs!"
  52. fi
  53. }