1 # Maintainer: Anatol Pomozov <anatol dot pomozov at gmail>
2 # Contributor: Sven-Hendrik Haase <svenstaro@gmail.com>
3 # Contributor: Pavol (Lopo) Hluchy <lopo AT losys DOT eu>
4 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
5 # Contributor: Jonas Heinrich <onny@project-insnaity.org>
6 # Contributor: Lee Watson <aur@revthefox.co.uk>
7 # Contributor: Tobias Hunger <tobias DOT hunger AT gmail DOT com>
8 # Contributor: Stefan Tatschner <stefan@sevenbyte.org>
11 # NOTE: Gitlab isn't always compatible with modern Ruby versions. In that case, check the
12 # commit log for an old fix on how to tell it to use older versions of Ruby. I'm afraid we'll
13 # need this again at some point in the future.
18 pkgdesc="Git management software"
20 url="https://gitlab.com/gitlab-org/gitlab-shell/"
22 depends=('ruby' 'redis' 'git')
24 options=('!strip' '!lto')
25 install=gitlab-shell.install
26 backup=("etc/webapps/${pkgname}/config.yml"
27 "etc/webapps/${pkgname}/secret"
28 "etc/webapps/${pkgname}/.gitconfig")
29 source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v${pkgver}/gitlab-shell-v${pkgver}.tar.gz"
31 "gitlab-shell.gitconfig"
32 "gitlab-shell.sysusers")
33 sha512sums=('bbd929d0e7378f0d8e0bd5ef77a856ad5a971797956a7188d7947ebf1238533f6a9b66484dd65cc03fc0b9c0018d2a353883a359f902ace1f96def2e697840c2'
34 '13c0fb88693e787f2960059985713d7ffb6d2fa51d9dbcba9c9562ae91e74bd3963efc63837cd19c5441fb5835d0c8eafd3285bea6676168f7b111a08fb086a7'
35 '5c4892baa8224fdd1ddb679bd6036e281b9c896a8ba5764fb83d95fc01a45235bdacb2d870f946b13f7ffb47f6e6085f49e7473579fc36b242d19d0ce6c83981'
36 '616188911fa7b7c569bc2d5e2024177e67366c48b4ffef1f7ad4dc8e4e9e2cdb421b687f45a1e9bdec8bf2736a157ca9f1e0ba24edae2f073b8c7b5ac42745e8')
38 _datadir="/usr/share/webapps/${pkgname}"
39 _etcdir="/etc/webapps/${pkgname}"
40 _homedir="/var/lib/gitlab"
41 _logdir="/var/log/gitlab"
42 _srcdir="gitlab-shell-v${pkgver}"
47 patch -p1 < ../configs.patch
48 # At this point config file should not contain any references to '/home/git'
54 export CGO_CPPFLAGS="${CPPFLAGS}"
55 export CGO_CFLAGS="${CFLAGS}"
56 export CGO_CXXFLAGS="${CXXFLAGS}"
57 export CGO_LDFLAGS="${LDFLAGS}"
58 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
65 install -dm755 -o root -g root "${pkgdir}${_datadir}"
66 install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}"
67 install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/satellites"
68 install -dm700 -o 105 -g 105 "${pkgdir}${_homedir}/.ssh"
69 install -dm750 -o 105 -g 105 "${pkgdir}${_etcdir}"
70 install -dm770 -o 105 -g root "${pkgdir}${_logdir}"
73 install -Dm644 "${srcdir}/gitlab-shell.sysusers" "${pkgdir}/usr/lib/sysusers.d/gitlab-shell.conf"
76 install -Dm644 -o 105 -g 105 "${srcdir}/gitlab-shell.gitconfig" "${pkgdir}${_etcdir}/.gitconfig"
77 ln -fs "${_etcdir}/.gitconfig" "${pkgdir}${_homedir}/.gitconfig"
79 # .gitlab_shell_secret
80 touch "${pkgdir}${_etcdir}/secret"
81 chmod 640 "${pkgdir}${_etcdir}/secret"
82 chown root:105 "${pkgdir}${_etcdir}/secret"
83 ln -fs "${_etcdir}/secret" "${pkgdir}${_datadir}/.gitlab_shell_secret"
86 install -Dm644 config.yml.example "${pkgdir}${_etcdir}/config.yml"
87 ln -fs "${_etcdir}/config.yml" "${pkgdir}${_datadir}/config.yml"
89 cp -r VERSION bin spec support "${pkgdir}${_datadir}"
90 ln -fs "${_datadir}" "${pkgdir}/${_homedir}/"
92 install -dm2770 -o 105 -g 105 "${pkgdir}${_homedir}/repositories"
94 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
95 install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
98 # vim:set ts=2 sw=2 et: