diff options
author | hexchain | 2023-10-25 23:31:04 +0800 |
---|---|---|
committer | hexchain | 2023-10-25 23:31:04 +0800 |
commit | d856085da8563d3486b5f42dcadc5785f57d96ce (patch) | |
tree | 84f866574371d2d0e1f86b0c480fe3cc57372534 | |
parent | bf3612b780d34b1d9391bd1674899f6d193e7cf8 (diff) | |
download | aur-d856085da8563d3486b5f42dcadc5785f57d96ce.tar.gz |
upgpkg
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 104 |
2 files changed, 59 insertions, 62 deletions
@@ -1,21 +1,18 @@ pkgbase = elvish-git - pkgdesc = An expressive programming language and versatile interactive shell. - pkgver = r5024.050863fb + pkgdesc = A friendly and expressive Unix shell + pkgver = v0.20.0.dev.r112.g1c0cffb pkgrel = 1 - url = https://github.com/elves/elvish + url = https://elv.sh install = elvish.install - arch = i686 arch = x86_64 - license = custom:2-clause BSD + license = BSD makedepends = git makedepends = go - makedepends = pandoc depends = glibc provides = elvish conflicts = elvish - options = !strip - source = git+https://github.com/elves/elvish.git - md5sums = SKIP + options = !lto + source = elvish::git+https://github.com/elves/elvish.git + b2sums = SKIP pkgname = elvish-git - @@ -1,76 +1,76 @@ -# Maintainer: Haochen Tong <i at hexchain dot org> +# Maintainer: hexchain <arch at hexchain dot org> +# Contributor: George Rawlinson <grawlinson@archlinux.org> +# Contributor: Caleb Maclennan <caleb@alerque.com> +# Contributor: Qi Xiao <xiaqqaix at gmail dot com> pkgname=elvish-git -pkgver=r5024.050863fb +_pkgname=elvish +pkgver=v0.20.0.dev.r112.g1c0cffb pkgrel=1 -pkgdesc='An expressive programming language and versatile interactive shell.' -arch=('i686' 'x86_64') -url="https://github.com/elves/elvish" -license=('custom:2-clause BSD') +pkgdesc="A friendly and expressive Unix shell" +arch=('x86_64') +url="https://elv.sh" +license=('BSD') +depends=('glibc') +makedepends=('git' 'go') +install="elvish.install" +options=('!lto') +source=("elvish::git+https://github.com/elves/elvish.git") +b2sums=('SKIP') provides=('elvish') conflicts=('elvish') -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 $_repo - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "$_pkgname" + + git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - export GOPATH=$srcdir/build + cd "$_pkgname" + + # create directory for build output + mkdir build - mkdir -p build - cd elvish - go mod vendor - cd website - go mod vendor + # download dependencies + go mod download } build() { - export GOPATH=$srcdir/build - export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw" - # Disable cgo for reproducible build - export CGO_ENABLED=0 + cd "$_pkgname" - cd $_repo + # set Go flags + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" - 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 -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 \ - -s -f gfm -t man -V section:7 \ - -V header:"Miscellaneous Information Manual" \ - -V footer:"Elvish $pkgver" -M date:"$(date -u --date=@${SOURCE_DATE_EPOCH} "+%b %d, %Y")" \ - -M title:"elvish-$file" \ - -o "$srcdir/doc/elvish-$file.7" - done + go build -v \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags ${LDFLAGS} \ + -X github.com/elves/elvish/pkg/buildinfo.Reproducible=true \ + -X github.com/elves/elvish/pkg/buildinfo.Version=$pkgver" \ + -o build \ + ./cmd/... } check() { - export GOPATH=$srcdir/build - export GOFLAGS="-trimpath -mod=vendor -modcacherw" - export CGO_ENABLED=0 - - cd $_repo - make test + cd "$_pkgname" + go test -v -race ./... } package() { - install -Dm755 "$srcdir/elvish/elvish" -t "$pkgdir/usr/bin/" - install -Dm644 "$srcdir/elvish/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/" + cd "$_pkgname" + + # binary + install -vDm755 -t "$pkgdir/usr/bin" build/elvish - install -dm755 "$pkgdir/usr/share/man/man7" - cp -rv --no-preserve=ownership "$srcdir/doc/"* "$pkgdir/usr/share/man/man7" + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$_pkgname" ./*.md + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$_pkgname" LICENSE } + |