pmount-0.9.99_alpha-r3.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils user
  5. DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
  6. HOMEPAGE="http://pmount.alioth.debian.org/"
  7. SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
  8. #SRC_URI="http://alioth.debian.org/frs/download.php/3530/${P/_/-}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86"
  12. IUSE="crypt"
  13. RDEPEND=">=sys-apps/util-linux-2.17.2
  14. crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
  15. DEPEND="${RDEPEND}
  16. dev-util/intltool
  17. sys-devel/gettext"
  18. S=${WORKDIR}/${P/_/-}
  19. pkg_setup() {
  20. enewgroup plugdev
  21. }
  22. src_prepare() {
  23. # Restore default value from pmount <= 0.9.23 wrt #393633
  24. sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
  25. cat <<-EOF > po/POTFILES.skip
  26. src/conffile.c
  27. src/configuration.c
  28. src/loop.c
  29. EOF
  30. epatch \
  31. "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch \
  32. "${FILESDIR}"/${P}-locale-regex.patch
  33. }
  34. src_configure() {
  35. econf --disable-hal
  36. }
  37. src_test() {
  38. local testdir=${S}/tests/check_fstab
  39. ln -s $testdir/a $testdir/b && ln -s $testdir/d $testdir/c && \
  40. ln -s $testdir/c $testdir/e \
  41. || die "Unable to create fake symlinks required for testsuite"
  42. emake check
  43. }
  44. src_install () {
  45. # Must be run SETUID+SETGID, bug #250106
  46. exeinto /usr/bin
  47. exeopts -m 6710 -g plugdev
  48. doexe src/{p,pu}mount
  49. dodoc AUTHORS ChangeLog TODO
  50. doman man/{{p,pu}mount.1,pmount.conf.5}
  51. insinto /etc
  52. doins etc/pmount.{allow,conf}
  53. keepdir /media #501772
  54. }
  55. pkg_postinst() {
  56. elog
  57. elog "This package has been installed setuid and setgid."
  58. elog "The permissions are as such that only users that belong to the plugdev"
  59. elog "group are allowed to run this. But if a script run by root mounts a"
  60. elog "device, members of the plugdev group will have access to it."
  61. elog
  62. elog "Please add your user to the plugdev group to be able to mount USB drives"
  63. }