Add PKGBUILD
This commit is contained in:
parent
ebead97801
commit
e06adbbeb9
99
archlinux/PKGBUILD
Normal file
99
archlinux/PKGBUILD
Normal file
@ -0,0 +1,99 @@
|
||||
# Maintainer: Lee Yingtong Li <runassudo@yingtongli.me>
|
||||
|
||||
# Adapted from PKGBUILD for cgit:
|
||||
# Maintainer: Christian Hesse <mail@eworm.de>
|
||||
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
|
||||
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Contributor: Patrick Palka <patrick@parcs.ath.cx>
|
||||
# Contributor: Loui Chang <louipc.ist at gmail com>
|
||||
# Contributor: Andreas Baumann <abaumann at yahoo dot com>
|
||||
|
||||
pkgname=cgit-yli-theme-git
|
||||
pkgver=1.2.3.r99.gebead97
|
||||
pkgrel=1
|
||||
pkgdesc='A web interface for git written in plain C'
|
||||
arch=('x86_64')
|
||||
url='https://yingtongli.me/git/cgit-yli-theme'
|
||||
license=('GPL-2.0-only')
|
||||
depends=('openssl' 'luajit' 'zlib-ng')
|
||||
makedepends=('git' 'curl' 'asciidoc' 'tailwindcss')
|
||||
optdepends=('groff: 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'
|
||||
'lua51-luaossl: for lua filters'
|
||||
'gzip: gzip compressed snapshots'
|
||||
'bzip2: bzip2 compressed snapshots'
|
||||
'lzip: lzip compressed snapshots'
|
||||
'xz: xz compressed snapshots'
|
||||
'zstd: zstd compressed snapshots'
|
||||
'mime-types: serve file with correct content-type header')
|
||||
provides=('cgit')
|
||||
conflicts=('cgit')
|
||||
install=cgit-yli-theme-git.install
|
||||
validpgpkeys=('AB9942E6D4A4CFC3412620A749FC7012A5DE03AE')
|
||||
source=("git+https://yingtongli.me/git/cgit-yli-theme.git"
|
||||
'git+https://yingtongli.me/git/htmlcc.git'
|
||||
'git+https://github.com/git/git.git'
|
||||
'tmpfiles.conf'
|
||||
'apache.example.conf')
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'4004b72d433e5810b046fc6019171a11a0dae3e9c6b29a44f16ed41705c46c3d'
|
||||
'89927d462c0504863c163eb8a210e5d65db30ee6e4300ff6a2f92460e4f20a62')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"
|
||||
printf '%s.r%s.g%s' \
|
||||
"$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
|
||||
"$(git rev-list --count ${GITTAG}..)" \
|
||||
"$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
git config --file=.gitmodules submodule.git.url ../git/
|
||||
git config --file=.gitmodules submodule.htmlcc.url ../htmlcc/
|
||||
git submodule init
|
||||
git -c protocol.file.allow=always submodule update
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
make \
|
||||
ZLIB_NG=1 \
|
||||
CGIT_SCRIPT_PATH="/usr/share/webapps/cgit" \
|
||||
DESTDIR="${pkgdir}" \
|
||||
prefix='/usr' \
|
||||
filterdir="/usr/lib/cgit/filters" \
|
||||
all doc-man
|
||||
}
|
||||
|
||||
#check() {
|
||||
# cd "$srcdir/${pkgname%-git}"
|
||||
#
|
||||
# make test
|
||||
#}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
make \
|
||||
ZLIB_NG=1 \
|
||||
CGIT_SCRIPT_PATH="/usr/share/webapps/cgit" \
|
||||
DESTDIR="${pkgdir}" \
|
||||
prefix='/usr' \
|
||||
filterdir="/usr/lib/cgit/filters" \
|
||||
install install-man
|
||||
|
||||
install -vDm0644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/cgit.conf"
|
||||
install -vDm0644 "${srcdir}/apache.example.conf" "${pkgdir}/etc/webapps/cgit/apache.example.conf"
|
||||
install -d "${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"
|
||||
}
|
23
archlinux/apache.example.conf
Normal file
23
archlinux/apache.example.conf
Normal file
@ -0,0 +1,23 @@
|
||||
ScriptAlias /cgit/ "/usr/lib/cgit/cgit.cgi/"
|
||||
|
||||
Alias /cgit-css "/usr/share/webapps/cgit/"
|
||||
|
||||
<Directory "/usr/share/webapps/cgit/">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
AuthType Basic
|
||||
AuthName cgit
|
||||
AuthUserFile /etc/httpd/conf/passwd
|
||||
Require user root
|
||||
</Directory>
|
||||
|
||||
<Directory "/usr/lib/cgit/">
|
||||
AllowOverride None
|
||||
Options ExecCGI FollowSymlinks
|
||||
Require all granted
|
||||
AuthType Basic
|
||||
AuthName cgit
|
||||
AuthUserFile /etc/httpd/conf/passwd
|
||||
Require user root
|
||||
</Directory>
|
6
archlinux/cgit-yli-theme-git.install
Normal file
6
archlinux/cgit-yli-theme-git.install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
post_install() {
|
||||
echo "==> cgit looks at /etc/cgitrc for configuration. There is"
|
||||
echo "==> an example configuration file in the cgitrc(5) man page."
|
||||
}
|
1
archlinux/tmpfiles.conf
Normal file
1
archlinux/tmpfiles.conf
Normal file
@ -0,0 +1 @@
|
||||
d /var/cache/cgit 0750 http http -
|
Loading…
x
Reference in New Issue
Block a user