udevil-0.4.4-r2.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils autotools user
  5. DESCRIPTION="mount and unmount removable devices without a password"
  6. HOMEPAGE="https://ignorantguru.github.com/udevil/"
  7. SRC_URI="https://github.com/IgnorantGuru/udevil/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. RDEPEND=">=app-shells/bash-4.0:*
  13. dev-libs/glib:2
  14. sys-apps/util-linux
  15. virtual/acl
  16. >=virtual/udev-143"
  17. DEPEND="${RDEPEND}
  18. dev-util/intltool
  19. sys-devel/gettext
  20. virtual/pkgconfig"
  21. pkg_setup(){
  22. enewgroup plugdev
  23. }
  24. src_prepare() {
  25. # This works for 0.4.4 too, no sense copying the patch
  26. epatch "${FILESDIR}"/${PN}-0.4.3-flags.patch
  27. epatch "${FILESDIR}"/${P}-stat.patch
  28. epatch "${FILESDIR}"/${P}-include-sysmacros.patch
  29. eapply_user
  30. eautoreconf
  31. }
  32. src_configure() {
  33. econf \
  34. --with-setfacl-prog="$(type -P setfacl)" \
  35. --enable-systemd
  36. }
  37. src_install() {
  38. default
  39. fowners root:plugdev /usr/bin/udevil
  40. fperms 4754 /usr/bin/udevil
  41. }
  42. pkg_postinst() {
  43. einfo
  44. elog "Please add your user to the plugdev group"
  45. elog "to be able to use ${PN} as a user"
  46. elog
  47. elog "Optional dependencies:"
  48. elog " gnome-extra/zenity (devmon popups)"
  49. elog " net-fs/davfs2 (mount WebDAV resources)"
  50. elog " net-fs/cifs-utils (mounting samba shares)"
  51. elog " net-fs/curlftpfs (mounting ftp shares)"
  52. elog " net-fs/nfs-utils (mounting nfs shares)"
  53. elog " net-fs/sshfs (mounting sftp shares)"
  54. elog " virtual/eject (eject via devmon)"
  55. if ! has_version 'sys-fs/udisks' ; then
  56. elog
  57. elog "When using ${PN} without udisks, and without the udisks-daemon running,"
  58. elog "you may need to enable kernel polling for device media changes to be detected."
  59. elog "See https://ignorantguru.github.com/${PN}/#polling"
  60. has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
  61. kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
  62. einfo
  63. fi
  64. }