initial import
This commit is contained in:
88
cgit/PKGBUILD
Normal file
88
cgit/PKGBUILD
Normal file
@@ -0,0 +1,88 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=cgit
|
||||
pkgver=1.2.3
|
||||
_debver=$pkgver
|
||||
_debrel=1
|
||||
_gitver=2.25.1
|
||||
pkgrel=3
|
||||
pkgdesc="A web interface for git written in plain C"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://git.zx2c4.com/cgit/'
|
||||
license=('GPL-2' 'LGPL-2.1' 'Expat' 'Simplified-BSD' 'ISC' 'Apache-2.0' 'Public-Domain' 'Boost-1.0')
|
||||
depends=('libressl' 'lua')
|
||||
makedepends=('zlib' 'curl' 'asciidoc' 'quilt')
|
||||
optdepends=('groff-headless: about page using man page syntax'
|
||||
'python-pygments: syntax highlighting support'
|
||||
'python-docutils: about page formatted with reStructuredText'
|
||||
'python-markdown: about page formatted with markdown'
|
||||
'gzip: gzip compressed snapshots'
|
||||
'bzip2: bzip2 compressed snapshots'
|
||||
'lzip: lzip compressed snapshots'
|
||||
'xz: xz compressed snapshots'
|
||||
'mime-types: serve file with correct content-type header')
|
||||
install=$pkgname.install
|
||||
source=("https://git.zx2c4.com/cgit/snapshot/cgit-${pkgver}.tar.xz"
|
||||
"https://www.kernel.org/pub/software/scm/git/git-${_gitver}.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/c/cgit/cgit_${_debver}+git${_gitver}-${_debrel}.debian.tar.xz")
|
||||
sha512sums=('58f9bb644b07be49dc51f3ef30a3d0e53699cede3c06b1d6920f3874fe846c83dd2589632aa84357b70ea2d60272448409aa1b892f405d14dd6745f5559b4504'
|
||||
'1c955f25da190c78750542a2fc81710aed3cd1fa4933b8734c81b00c07bfbf5b1379b555001340d55cdb2b996dd79b116bbfcfc0106940f06676f017907a599c'
|
||||
'730a860c23c10135e51cc21f71ef8b5b8755b0f5b203e2cadd000f4c285f276cb7a33cdf0dd23c868b0b99fe02a2ee0edd8c1f45097d82d9c573be0cf627eac9')
|
||||
|
||||
_makeopts="NO_ICONV=YesPlease
|
||||
NO_GETTEXT=YesPlease
|
||||
NO_TCLTK=YesPlease
|
||||
NO_SVN_TESTS=YesPlease
|
||||
NO_REGEX=NeedsStartEnd
|
||||
LUA_PKGCONFIG=lua5.3
|
||||
prefix=/usr"
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
# check that upstream git ver corresponds with our
|
||||
local _ver=$(awk -F'[ \t]*=[ \t]*' '/^GIT_VER/ { print $2 }' Makefile)
|
||||
if [ "$_ver" != "$_gitver" ]; then
|
||||
error "Please set _gitver in APKBUILD to $_ver"
|
||||
return 1
|
||||
fi
|
||||
|
||||
rm -rf git
|
||||
mv ../git-$_gitver git
|
||||
if [[ ${pkgver%.*} = ${_debver%.*+*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply
|
||||
rm -v debian/patches/add-hardening.patch || true
|
||||
rm -v debian/patches/debianize-makefile.patch || true
|
||||
rm -v debian/patches/use-debian-binary-name-rst2html.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
make $_makeopts all doc-man
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make $_makeopts CGIT_SCRIPT_PATH=/usr/share/webapps/cgit \
|
||||
DESTDIR="$pkgdir" install install-man
|
||||
|
||||
install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
|
||||
install -vd "$pkgdir/var/cache/$pkgname"
|
||||
mkdir -p "$pkgdir/usr/lib/cgit"
|
||||
mv "$pkgdir/usr/share/webapps/cgit/cgit.cgi" "$pkgdir/usr/lib/cgit"
|
||||
ln -sf ../../../lib/cgit/cgit.cgi "$pkgdir/usr/share/webapps/cgit/cgit.cgi"
|
||||
|
||||
# remove not needed data for remote services
|
||||
rm "$pkgdir/usr/lib/cgit/filters/"{email-gravatar.lua,email-libravatar.lua,gentoo-ldap-authentication.lua,email-gravatar.py}
|
||||
}
|
||||
5
cgit/cgit.install
Normal file
5
cgit/cgit.install
Normal file
@@ -0,0 +1,5 @@
|
||||
post_install() {
|
||||
chown -v http:http /var/cache/cgit
|
||||
echo "==> cgit looks at /etc/cgitrc for configuration. There is"
|
||||
echo "==> an example configuration file in the cgitrc(5) man page."
|
||||
}
|
||||
Reference in New Issue
Block a user