summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi Xiao2021-01-30 18:31:57 +0000
committerQi Xiao2021-01-30 18:39:44 +0000
commitbf3612b780d34b1d9391bd1674899f6d193e7cf8 (patch)
treef05cb3472384fd6154049695b83dd5f61d39c0ff
parent74fa89e3fe761f34ac45fdd3b3b01498054ffc8c (diff)
downloadaur-bf3612b780d34b1d9391bd1674899f6d193e7cf8.tar.gz
Update for dev version
- Follow https://src.elv.sh/PACKAGING.md to get reproducible build - Remove unnecessary environment variables - Remove unnecessary quotes
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD48
2 files changed, 30 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b766e7df5b85..c5e202c5ca01 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = elvish-git
- pkgdesc = A friendly and expressive Unix shell.
- pkgver = 0.14.0.r20.gd2e72011
+ pkgdesc = An expressive programming language and versatile interactive shell.
+ pkgver = r5024.050863fb
pkgrel = 1
url = https://github.com/elves/elvish
install = elvish.install
@@ -13,6 +13,7 @@ pkgbase = elvish-git
depends = glibc
provides = elvish
conflicts = elvish
+ options = !strip
source = git+https://github.com/elves/elvish.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 73e7a3c1c3b7..cf461437e962 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,9 @@
# Maintainer: Haochen Tong <i at hexchain dot org>
pkgname=elvish-git
-_pkgname=elvish
-pkgver=0.14.0.r20.gd2e72011
+pkgver=r5024.050863fb
pkgrel=1
-pkgdesc="A friendly and expressive Unix shell."
+pkgdesc='An expressive programming language and versatile interactive shell.'
arch=('i686' 'x86_64')
url="https://github.com/elves/elvish"
license=('custom:2-clause BSD')
@@ -14,34 +13,40 @@ depends=('glibc')
makedepends=('git' 'go' 'pandoc')
source=("git+https://github.com/elves/elvish.git")
md5sums=('SKIP')
+options=(!strip)
install=elvish.install
+_repo=elvish
+
pkgver() {
- cd "$_pkgname"
- ( set -o pipefail;
- git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+ cd $_repo
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- mkdir -p "$srcdir/build"
- export GOPATH="$srcdir/build"
- export CGO_LDFLAGS="$LDFLAGS"
- export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
- cd "$srcdir/elvish"
+ export GOPATH=$srcdir/build
+
+ mkdir -p build
+ cd elvish
+ go mod vendor
+ cd website
go mod vendor
}
build() {
- export GOPATH="$srcdir/build"
- export CGO_LDFLAGS="$LDFLAGS"
+ export GOPATH=$srcdir/build
export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
- cd "$srcdir/elvish"
- go build -v -ldflags="-X github.com/elves/elvish/pkg/buildinfo.Version=$pkgver" .
+ # Disable cgo for reproducible build
+ export CGO_ENABLED=0
+
+ cd $_repo
+
+ LDFLAGS="-X src.elv.sh/pkg/buildinfo.VersionSuffix=-dev.$(git rev-parse HEAD)\
+ -X src.elv.sh/pkg/buildinfo.Reproducible=true"
+ go build -v -ldflags="$LDFLAGS" ./cmd/elvish
cd website
- mkdir "$srcdir/doc"
+ mkdir -p "$srcdir/doc"
go build -v ./cmd/elvdoc/
for file in builtin edit epm language math platform readline-binding re store str unix; do
./elvdoc -filter < "ref/$file.md" | pandoc \
@@ -54,10 +59,11 @@ build() {
}
check() {
- export GOPATH="$srcdir/build"
- export CGO_LDFLAGS="$LDFLAGS"
+ export GOPATH=$srcdir/build
export GOFLAGS="-trimpath -mod=vendor -modcacherw"
- cd "$srcdir/elvish"
+ export CGO_ENABLED=0
+
+ cd $_repo
make test
}