summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorromkatv2020-05-23 10:33:39 +0200
committerromkatv2020-05-23 10:33:39 +0200
commit035d6722a17a630f6dc669ca80f1f56257d46929 (patch)
tree3e2a4f869ccae837d5c3fd05c98ed29ac8217061
parent63941c766d736b81dfedc89ef22c39405a5f86ea (diff)
downloadaur-035d6722a17a630f6dc669ca80f1f56257d46929.tar.gz
manually download libgit2 tarball
The previous version of gitstatus AUR package was invoking `./build -w`. Flag `-w` instructs the build script to download the appropriate libgit2 tarball automatically (a dependency of gitstatus) and verify its SHA hash. This commit removes `-w` in favor of doing the same download and SHA hash verification manually.
-rw-r--r--.SRCINFO3
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD32
3 files changed, 24 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 49e3eefc8fe2..78ab0ed50fa4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -13,10 +13,11 @@ pkgbase = gitstatus
makedepends = gawk
makedepends = gcc
makedepends = zsh
- makedepends = wget
depends = glibc
source = gitstatus-1.1.2.tar.gz::https://github.com/romkatv/gitstatus/archive/v1.1.2.tar.gz
+ source = libgit2-tag-005f77dca6dbe8788e55139fa1199fc94cc04f9a.tar.gz::https://github.com/romkatv/libgit2/archive/tag-005f77dca6dbe8788e55139fa1199fc94cc04f9a.tar.gz
sha512sums = d046090b6d2e8c56b58e907cbb9dad86609cfaefdea526813978c1c7846178c61cd91fa60b8ca036c4c5b6f55caaa17974c1a23f5055e2b4064ed072a3ba4f7d
+ sha512sums = 1f4ff3844c19cc9fc9857191075cfdda4cf01797b86cfa9fd29ac2a8baf47051211d533fd72f2d273f8ce7c625b59dd965557d8295af084208cc7fb26ba81a34
pkgname = gitstatus
diff --git a/.gitignore b/.gitignore
index 50d29237ec80..7824cbc8986c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/gitstatus-*.pkg.tar.xz
/gitstatus-*.tar.gz
+/libgit2-*.tar.gz
/pkg
/src
diff --git a/PKGBUILD b/PKGBUILD
index f182bdb9fed8..ffce0344e732 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
# Maintainer: Roman Perepelitsa <roman.perepelitsa@gmail.com>
pkgname=gitstatus
+# Whenever pkgver is updated, _libgit2ver below must also be updated.
pkgver=1.1.2
pkgrel=1
pkgdesc='10x faster implementation of `git status` command'
@@ -8,24 +9,33 @@ arch=('any')
url="https://github.com/romkatv/gitstatus"
license=('GPL3')
depends=('glibc')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/romkatv/gitstatus/archive/v${pkgver}.tar.gz")
-sha512sums=('d046090b6d2e8c56b58e907cbb9dad86609cfaefdea526813978c1c7846178c61cd91fa60b8ca036c4c5b6f55caaa17974c1a23f5055e2b4064ed072a3ba4f7d')
-makedepends=('git' 'cmake' 'file' 'make' 'gawk' 'gcc' 'zsh' 'wget')
+# _libgit2ver depends on pkgver. They must be updated together. See libgit2_version in:
+# https://raw.githubusercontent.com/romkatv/gitstatus/v${pkgver}/build.info
+_libgit2ver="tag-005f77dca6dbe8788e55139fa1199fc94cc04f9a"
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/romkatv/gitstatus/archive/v${pkgver}.tar.gz"
+ "libgit2-${_libgit2ver}.tar.gz::https://github.com/romkatv/libgit2/archive/${_libgit2ver}.tar.gz")
+sha512sums=(
+ 'd046090b6d2e8c56b58e907cbb9dad86609cfaefdea526813978c1c7846178c61cd91fa60b8ca036c4c5b6f55caaa17974c1a23f5055e2b4064ed072a3ba4f7d'
+ '1f4ff3844c19cc9fc9857191075cfdda4cf01797b86cfa9fd29ac2a8baf47051211d533fd72f2d273f8ce7c625b59dd965557d8295af084208cc7fb26ba81a34')
+makedepends=('git' 'cmake' 'file' 'make' 'gawk' 'gcc' 'zsh')
install='gitstatus.install'
build() {
- rm -rf "$srcdir/gitstatus"
- mv "$srcdir/gitstatus-${pkgver}" "$srcdir/gitstatus"
- cd "$srcdir/gitstatus"
- ./build -w
- rm ./deps/libgit2-*.tar.gz
+ # Upstream packaging instructions:
+ # https://github.com/romkatv/gitstatus/blob/master/README.md#compiling-for-distribution
+ #
+ # Put libgit2-${_libgit2ver}.tar.gz where build expects it.
+ ln -sf "$srcdir/libgit2-${_libgit2ver}.tar.gz" "$srcdir/gitstatus-${pkgver}/deps/"
+ cd "$srcdir/gitstatus-${pkgver}"
+ ./build
+ rm "./deps/libgit2-${_libgit2ver}.tar.gz"
for file in *.zsh install; do
zsh -fc "emulate zsh -o no_aliases && zcompile -R -- $file.zwc $file"
done
}
package() {
- cd "$srcdir"
- find gitstatus -path gitstatus/.git -prune \
- -o '(' -type f -exec install -D '{}' "$pkgdir/usr/share/{}" ';' ')'
+ cd "$srcdir/gitstatus-${pkgver}"
+ find . -type f -exec install -D '{}' "$pkgdir/usr/share/gitstatus/{}" ';'
}