2
0
Fork 0
git-subrepo-git/PKGBUILD

49 lines
1.1 KiB
Bash
Raw Normal View History

2016-07-11 00:55:02 +03:00
# Maintainer: James An <james@jamesan.ca>
pkgname=git-subrepo-git
_pkgname=${pkgname%-git}
2021-02-18 12:42:56 +02:00
pkgver=0.4.3.r1.g2f68596
2016-07-11 00:55:02 +03:00
pkgrel=1
2021-02-18 12:42:56 +02:00
pkgdesc='Git Submodule Alternative'
2016-07-11 00:55:02 +03:00
arch=('any')
url="https://github.com/ingydotnet/$_pkgname"
license=('GPL')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
2021-02-18 12:42:56 +02:00
source=("$_pkgname"::"git+$url.git")
md5sums=('SKIP')
depends=(git)
2016-07-11 00:55:02 +03:00
pkgver() {
cd "$_pkgname"
(
set -o pipefail
git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
2021-02-18 12:42:56 +02:00
build() {
2016-07-11 00:55:02 +03:00
cd "$_pkgname"
2021-02-18 12:42:56 +02:00
make compgen
2016-07-11 00:55:02 +03:00
}
check() {
cd "$_pkgname"
make test
}
package() {
cd "$_pkgname"
make DESTDIR="$pkgdir" PREFIX=/usr install
2021-02-18 12:42:56 +02:00
install -d -m 0755 "$pkgdir"/usr/share/bash-completion/completions
install -C -m 0644 share/completion.bash "$pkgdir"/usr/share/bash-completion/completions/git-subrepo
install -d -m 0755 "$pkgdir"/usr/share/zsh/site-functions
install -C -m 0644 share/zsh-completion/_git-subrepo "$pkgdir"/usr/share/zsh/site-functions/_git-subrepo
2016-07-11 00:55:02 +03:00
}