Diff gitolite-2.3.1-r2 with a gitolite-3.6.11-r1

/usr/portage/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild 2023-10-09 14:52:31.020368389 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5 5

  
6
inherit perl-module
6
[[ ${PV} == *9999 ]] && SCM="git-2"
7
EGIT_REPO_URI="https://github.com/sitaramc/${PN}.git"
8
EGIT_MASTER=master
9

  
10
inherit perl-module ${SCM}
7 11

  
8 12
DESCRIPTION="Highly flexible server for git directory version tracker"
9 13
HOMEPAGE="https://github.com/sitaramc/gitolite"
10
SRC_URI="https://milki.github.com/${PN}/${P}.tar.gz"
14
if [[ ${PV} != *9999 ]]; then
15
	SRC_URI="https://github.com/sitaramc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16
	KEYWORDS="amd64 arm x86"
17
else
18
	SRC_URI=""
19
fi
11 20

  
12 21
LICENSE="GPL-2"
13 22
SLOT="0"
14
KEYWORDS="amd64 x86"
15
IUSE="contrib vim-syntax"
23
IUSE="selinux tools"
16 24

  
17 25
DEPEND="
18 26
	dev-lang/perl
......
24 32
	${DEPEND}
25 33
	acct-group/git
26 34
	acct-user/git[gitolite]
35
	!app-vim/gitolite-syntax
27 36
	!dev-vcs/gitolite-gentoo
28
	vim-syntax? ( app-vim/gitolite-syntax )"
37
	selinux? ( sec-policy/selinux-gitosis )
38
	dev-perl/JSON
39
"
29 40

  
30 41
src_prepare() {
31
	rm Makefile doc/COPYING || die
32
	rm -rf contrib/{gitweb,vim} || die
33

  
34
	echo "${PF}" > conf/VERSION
42
	default
43
	echo ${PF} > src/VERSION || die
35 44
}
36 45

  
37 46
src_install() {
38
	local gl_bin="${D}/usr/bin"
39
	gl_bin=${gl_bin/\/\//\/}
40

  
41
	dodir /usr/share/gitolite/{conf,hooks} /usr/bin
47
	local uexec=/usr/libexec/${PN}
42 48

  
43
	# install using upstream method
44
	export PATH="${gl_bin}:${PATH}"
45
	./src/gl-system-install ${gl_bin} \
46
		"${D}"/usr/share/gitolite/conf "${D}"/usr/share/gitolite/hooks || die
47
	sed -e "s:${D}::g" "${D}/usr/bin/gl-setup" \
48
		-i "${D}/usr/share/gitolite/conf/example.gitolite.rc" || die
49
	rm -rf src/lib/Gitolite/Test{,.pm}
50
	insinto $VENDOR_LIB
51
	doins -r src/lib/Gitolite
52

  
53
	dodoc README.markdown CHANGELOG
54
	# These are meant by upstream as examples, you are strongly recommended to
55
	# customize them for your needs.
56
	dodoc contrib/utils/ipa_groups.pl contrib/utils/ldap_groups.sh
57

  
58
	insinto /usr/share/vim/vimfiles
59
	doins -r contrib/vim/*
60

  
61
	insopts -m0755
62
	insinto $uexec
63
	doins -r src/{commands,syntactic-sugar,triggers,VREF}/
64
	doins -r contrib/{commands,triggers,hooks}
65

  
66
	insopts -m0644
67
	doins src/VERSION
68

  
69
	exeinto $uexec
70
	doexe src/gitolite{,-shell}
71

  
72
	dodir /usr/bin
73
	for bin in gitolite{,-shell}; do
74
		dosym ../libexec/${PN}/${bin} /usr/bin/${bin}
75
	done
76

  
77
	if use tools; then
78
		dobin check-g2-compat convert-gitosis-conf
79
		dobin contrib/utils/rc-format-v3.4
80
	fi
49 81

  
50
	rm "${D}"/usr/bin/*.pm
51
	insinto "${VENDOR_LIB}"
52
	doins src/*.pm
53

  
54
	dodoc README.mkd doc/*
55

  
56
	use contrib && dodoc -r contrib
82
	fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only
57 83
}
58 84

  
59 85
pkg_postinst() {
86
	local old_ver
87
	for old_ver in ${REPLACING_VERSIONS}; do
88
		if ver_test ${old_ver} -lt "3" ; then
89
			ewarn
90
			elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!"
91
			elog "Please read http://gitolite.com/gitolite/migr/index.html first!"
92
		fi
93
	done
94

  
60 95
	# bug 352291
61 96
	ewarn
62 97
	elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)."
Thank you!