Add gitlab 8.3.2
This commit is contained in:
1
dev-vcs/gitlab-shell/Manifest
Normal file
1
dev-vcs/gitlab-shell/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
EBUILD gitlab-shell-2.6.9.ebuild 2783 SHA256 bcb7ce5594785e8bbe4da4817e37fb9ea5c674cc704da48df228ff77d04fe182 SHA512 14c1089278f77482653540b1df9ec64d8b7aefcd900625592377834a3ad9cb9068a56dd98e8f6019e80fad233e920b4ffde743f9b09b1deacac323efe86acd1f WHIRLPOOL 56e63a5aa0b0f40f76c060c3785a263eb42bb427554cdd346ee07364b647d009b5e9c7d1a285a74ffcc70b7538ad6a8a5b2cb4ee99430b75d828fc1a284599b5
|
||||
101
dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild
Normal file
101
dev-vcs/gitlab-shell/gitlab-shell-2.6.9.ebuild
Normal file
@@ -0,0 +1,101 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
USE_RUBY="ruby20"
|
||||
|
||||
inherit eutils git-2 ruby-ng user
|
||||
|
||||
DESCRIPTION="GitLab Shell is a free SSH access and repository management application"
|
||||
HOMEPAGE="https://github.com/gitlabhq/gitlab-shell"
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="$(ruby_implementation_depend ruby20)
|
||||
dev-vcs/git
|
||||
virtual/ssh
|
||||
dev-db/redis"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
GIT_USER="git"
|
||||
GIT_GROUP="git"
|
||||
HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi)
|
||||
REPO_DIR="${HOME}/repositories"
|
||||
AUTH_FILE="${HOME}/.ssh/authorized_keys"
|
||||
KEY_DIR=$(dirname "${AUTH_FILE}")
|
||||
DEST_DIR="/var/lib/${PN}"
|
||||
|
||||
pkg_setup() {
|
||||
|
||||
enewgroup ${GIT_GROUP}
|
||||
enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP}
|
||||
}
|
||||
|
||||
all_ruby_unpack() {
|
||||
git-2_src_unpack
|
||||
cd ${P}
|
||||
sed -i \
|
||||
-e "s|\(user:\).*|\1 ${GIT_USER}|" \
|
||||
-e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \
|
||||
-e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \
|
||||
config.yml.example || die "failed to filter config.yml.example"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
|
||||
rm -Rf .git .gitignore
|
||||
|
||||
insinto ${DEST_DIR}
|
||||
touch gitlab-shell.log
|
||||
doins -r . || die
|
||||
|
||||
dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die
|
||||
dosym ${DEST_DIR}/bin/gitlab-projects /usr/bin/gitlab-projects || die
|
||||
dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die
|
||||
dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die
|
||||
|
||||
fperms 0755 ${DEST_DIR}/bin/gitlab-keys || die
|
||||
fperms 0755 ${DEST_DIR}/bin/gitlab-projects || die
|
||||
fperms 0755 ${DEST_DIR}/bin/gitlab-shell || die
|
||||
fperms 0755 ${DEST_DIR}/bin/check || die
|
||||
fperms 0755 ${DEST_DIR}/bin/create-hooks || die
|
||||
fperms 0755 ${DEST_DIR}/bin/install || die
|
||||
|
||||
fperms 0755 ${DEST_DIR}/hooks/post-receive || die
|
||||
fperms 0755 ${DEST_DIR}/hooks/pre-receive || die
|
||||
|
||||
fowners ${GIT_USER} ${DEST_DIR}/gitlab-shell.log
|
||||
fowners ${GIT_USER} ${DEST_DIR} || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
dodir "${REPO_DIR}" || die
|
||||
|
||||
if [[ ! -d "${KEY_DIR}" ]] ; then
|
||||
mkdir "${KEY_DIR}" || die
|
||||
chmod 0700 "${KEY_DIR}" || die
|
||||
chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die
|
||||
fi
|
||||
|
||||
if [[ ! -e "${AUTH_FILE}" ]] ; then
|
||||
touch "${AUTH_FILE}" || die
|
||||
chmod 0600 "${AUTH_FILE}" || die
|
||||
chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die
|
||||
fi
|
||||
|
||||
if [[ ! -d "${REPO_DIR}" ]] ; then
|
||||
mkdir "${REPO_DIR}"
|
||||
chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die
|
||||
chmod ug-s,o-rwx "${REPO_DIR}" -R || die
|
||||
chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die
|
||||
fi
|
||||
|
||||
elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml"
|
||||
elog "and edit this file in order to configure your GitLab-Shell settings."
|
||||
}
|
||||
Reference in New Issue
Block a user