initial import
This commit is contained in:
93
git-legacy/PKGBUILD
Normal file
93
git-legacy/PKGBUILD
Normal file
@@ -0,0 +1,93 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
_realpkgname=git
|
||||
pkgname=$_realpkgname-legacy
|
||||
pkgver=2.28.0
|
||||
pkgrel=1
|
||||
pkgdesc="Fast distributed version control system (legacy version)"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL-2')
|
||||
depends=('curl' 'expat' 'perl' 'perl-error' 'perl-mailtools' 'libressl' 'pcre2' 'grep' 'shadow')
|
||||
makedepends=('python' 'xmlto' 'asciidoc' 'gettext-tiny')
|
||||
optdepends=('tk: gitk and git gui'
|
||||
'perl-term-readkey: git interactive.singlekey setting'
|
||||
'perl-cgi: gitweb (web interface) support'
|
||||
'python: git p4')
|
||||
backup=('etc/conf.d/git-daemon'
|
||||
'etc/sv/git-daemon/conf')
|
||||
install=$pkgname.install
|
||||
source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz"
|
||||
"git-daemon.confd"
|
||||
"git-daemon.initd"
|
||||
"git-daemon.conf"
|
||||
"git-daemon.run"
|
||||
"git-daemon_log.run")
|
||||
sha512sums=('a6159c0a15e3c5f9603157d4010664a6d74e7d65b9fe97a03b36fac12607248ed57980d96565841e88eae343001c167222232737d3af812608c8db011941df1a'
|
||||
'a34720bd28f238a17e8697b3a8073d66f6b435163d8029c0a30d9c166eb07482eecb185c6661a3826b1dc18299d905e0fd4a664ca031bd4bd3507520787fa7d7'
|
||||
'6fcdefec671ca9b0191e32902663a3400b76cdec82500bdcf65dec1bdecb78a40678c80c7f77b0789a2877284db3400cdf52289c2221f8daa7e3fa7620ec1bfb'
|
||||
'00b4f6774fd6f864344bc087ff0fafdd485293527db2a4bef0ca2ba37639383f56977c794687c345b705462c2ad442062205938ec9e5e79647aeba2f9f530537'
|
||||
'1c1b54ffc6cf22d588023e61c421faadd916294803a837396e515753b56093233d1d6d93a564f227dc16bf52482914463eef53dab557abe9c7e4184d2078ced6'
|
||||
'4c36e11575fb48a4beb29dd2030e0b70a4fd55f98fdd4720353e8cc78e488cb9d7c5d25ffd338e20188ead9ebfb6d6064a44f706dc66c6abe47992fa6e72e888')
|
||||
|
||||
_make_paths=(
|
||||
prefix='/usr'
|
||||
perllibdir="$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}')"
|
||||
)
|
||||
|
||||
_make_options=(
|
||||
CFLAGS="$CFLAGS"
|
||||
LDFLAGS="$LDFLAGS"
|
||||
INSTALL_SYMLINKS=1
|
||||
MAN_BOLD_LITERAL=1
|
||||
NO_PERL_CPAN_FALLBACKS=1
|
||||
USE_LIBPCRE2=1
|
||||
)
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_realpkgname-$pkgver"
|
||||
|
||||
make \
|
||||
"${_make_paths[@]}" \
|
||||
"${_make_options[@]}" \
|
||||
all man
|
||||
|
||||
make -C contrib/subtree "${_make_paths[@]}" all man
|
||||
make -C contrib/diff-highlight "${_make_paths[@]}"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$_realpkgname-$pkgver"
|
||||
|
||||
make \
|
||||
"${_make_paths[@]}" \
|
||||
"${_make_options[@]}" \
|
||||
DESTDIR="$pkgdir" \
|
||||
install install-man
|
||||
|
||||
# bash completion
|
||||
mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
|
||||
install -m 0644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
|
||||
|
||||
# fancy git prompt
|
||||
mkdir -p "$pkgdir"/usr/share/git/
|
||||
install -m 0644 ./contrib/completion/git-prompt.sh "$pkgdir"/usr/share/git/git-prompt.sh
|
||||
|
||||
# subtree installation
|
||||
make -C contrib/subtree "${_make_paths[@]}" DESTDIR="$pkgdir" install install-man
|
||||
|
||||
# the rest of the contrib stuff
|
||||
find contrib/ -name '.gitignore' -delete
|
||||
cp -a ./contrib/* $pkgdir/usr/share/git/
|
||||
|
||||
# git-daemon via OpenRC
|
||||
install -D -m 0644 "$srcdir"/git-daemon.confd "$pkgdir"/etc/conf.d/git-daemon
|
||||
install -D -m 0755 "$srcdir"/git-daemon.initd "$pkgdir"/etc/init.d/git-daemon
|
||||
|
||||
# git-daemon via runit
|
||||
install -D -m 0644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/sv/git-daemon/conf
|
||||
install -D -m 0755 "$srcdir"/git-daemon.run "$pkgdir"/etc/sv/git-daemon/run
|
||||
install -D -m 0755 "$srcdir"/git-daemon_log.run "$pkgdir"/etc/sv/git-daemon/log/run
|
||||
|
||||
# license
|
||||
install -D -m 0644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
|
||||
}
|
||||
1
git-legacy/git-daemon.conf
Normal file
1
git-legacy/git-daemon.conf
Normal file
@@ -0,0 +1 @@
|
||||
OPTS=""
|
||||
19
git-legacy/git-daemon.confd
Normal file
19
git-legacy/git-daemon.confd
Normal file
@@ -0,0 +1,19 @@
|
||||
# conf.d file for git-daemon
|
||||
#
|
||||
# Please check man 1 git-daemon for more information about the options
|
||||
# git-daemon accepts. You MUST edit this to include your repositories you wish
|
||||
# to serve.
|
||||
#
|
||||
# Some of the meaningful options are:
|
||||
# --syslog --- Enables syslog logging
|
||||
# --verbose --- Enables verbose logging
|
||||
# --export-all --- Exports all repositories
|
||||
# --port=XXXX --- Starts in port XXXX instead of 9418
|
||||
#
|
||||
GITDAEMON_OPTS="--syslog --base-path=/srv/git"
|
||||
|
||||
# To run an anonymous git safely, the following user should be able to only
|
||||
# read your Git repositories. It should not be able to write to anywhere on
|
||||
# your system, esp. not the repositories.
|
||||
GIT_USER="nobody"
|
||||
GIT_GROUP="nobody"
|
||||
12
git-legacy/git-daemon.initd
Normal file
12
git-legacy/git-daemon.initd
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/var/run/git-daemon.pid"
|
||||
command="/usr/bin/git"
|
||||
command_args="daemon ${GITDAEMON_OPTS}"
|
||||
start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m -p ${pidfile} -u ${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"
|
||||
|
||||
depend() {
|
||||
use logger
|
||||
}
|
||||
8
git-legacy/git-daemon.run
Normal file
8
git-legacy/git-daemon.run
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# This file is based on Debian's runit script file
|
||||
# (C) 2005-2012 Gerrit Pape
|
||||
# Licensed under GPL-2
|
||||
exec 2>&1
|
||||
[ -r conf ] && . ./conf
|
||||
exec chpst -ugit "$(git --exec-path)"/git-daemon $OPTS \
|
||||
--base-path=/srv/git
|
||||
10
git-legacy/git-daemon_log.run
Normal file
10
git-legacy/git-daemon_log.run
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# This file is based on Debian's runit script file
|
||||
# (C) 2005-2012 Gerrit Pape
|
||||
# Licensed under GPL-2
|
||||
set -e
|
||||
|
||||
LOG=/var/log/git-daemon
|
||||
|
||||
test -d "$LOG" || mkdir -p -m2644 "$LOG" && chown git "$LOG"
|
||||
exec chpst -ugit svlogd -tt "$LOG"
|
||||
12
git-legacy/git-legacy.install
Normal file
12
git-legacy/git-legacy.install
Normal file
@@ -0,0 +1,12 @@
|
||||
post_install() {
|
||||
if ! getent group git >/dev/null; then
|
||||
groupadd --system git
|
||||
fi
|
||||
if ! getent passwd git >/dev/null; then
|
||||
useradd --system -c 'git daemon user' -g git -d / -s /bin/bash git
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
Reference in New Issue
Block a user