gitolite-gentoo-2.3.1-r1.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils perl-module user
  5. DESCRIPTION="Highly flexible server for git directory version tracker, Gentoo fork"
  6. HOMEPAGE="https://cgit.gentoo.org/proj/gitolite-gentoo.git"
  7. SRC_URI="mirror://gentoo/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="contrib vim-syntax"
  12. DEPEND="dev-lang/perl
  13. virtual/perl-File-Path
  14. virtual/perl-File-Temp
  15. >=dev-vcs/git-1.6.6"
  16. RDEPEND="${DEPEND}
  17. !dev-vcs/gitolite
  18. dev-perl/Net-SSH-AuthorizedKeysFile
  19. vim-syntax? ( app-vim/gitolite-syntax )"
  20. pkg_setup() {
  21. enewgroup git
  22. enewuser git -1 /bin/bash /var/lib/gitolite git
  23. }
  24. src_prepare() {
  25. rm Makefile doc/COPYING || die
  26. rm -rf contrib/{gitweb,vim} || die
  27. echo "${PF}-gentoo" > conf/VERSION
  28. }
  29. src_install() {
  30. local gl_bin="${D}/usr/bin"
  31. gl_bin=${gl_bin/\/\//\/}
  32. dodir /usr/share/gitolite/{conf,hooks} /usr/bin || die
  33. export PATH="${gl_bin}:${PATH}"
  34. ./src/gl-system-install ${gl_bin} \
  35. "${D}"/usr/share/gitolite/conf "${D}"/usr/share/gitolite/hooks || die
  36. sed -i -e "s:${D}::g" "${D}/usr/bin/gl-setup" \
  37. "${D}/usr/share/gitolite/conf/example.gitolite.rc" || die
  38. rm "${D}"/usr/bin/*.pm
  39. insinto "${VENDOR_LIB}"
  40. doins src/*.pm || die
  41. dodoc README.mkd doc/*
  42. if use contrib; then
  43. insinto /usr/share/doc/${PF}
  44. doins -r contrib/ || die
  45. fi
  46. keepdir /var/lib/gitolite
  47. fowners git:git /var/lib/gitolite
  48. fperms 750 /var/lib/gitolite
  49. }
  50. pkg_postinst() {
  51. # bug 352291
  52. ewarn
  53. elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)."
  54. elog "Especially if you're migrating from gitosis."
  55. ewarn
  56. ewarn
  57. elog "If you use the umask feature and upgrade from <=gitolite-gentoo-1.5.9.1"
  58. elog "then please check the permissions of all repositories using the umask feature"
  59. ewarn
  60. }