mirror of
https://github.com/archlinux/aur.git
synced 2026-02-07 12:41:55 +01:00
Build from source
This commit is contained in:
parent
7002948acd
commit
61a22b2a79
2 changed files with 47 additions and 33 deletions
15
.SRCINFO
15
.SRCINFO
|
|
@ -1,17 +1,16 @@
|
|||
pkgbase = gsh
|
||||
pkgdesc = A modern, POSIX-compatible, generative shell
|
||||
pkgver = 0.15.2
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/atinylittleshell/gsh
|
||||
install = gsh.install
|
||||
arch = aarch64
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = GPL-3.0-or-later
|
||||
makedepends = go
|
||||
makedepends = git
|
||||
conflicts = gsh
|
||||
provides = gsh
|
||||
|
||||
source = https://github.com/atinylittleshell/gsh/releases/download/v0.15.2/gsh-0.15.2.tar.gz
|
||||
sha256sums = 8bfa36f97c8623b01a4b95830be2d3752207bc929e434b7f542ea5bf666e0191
|
||||
|
||||
depends = glibc
|
||||
source = gsh-0.15.2.tar.gz::https://github.com/atinylittleshell/gsh/archive/refs/tags/v0.15.2.tar.gz
|
||||
sha256sums = b3a76c78171ec24cc0f5afdf0e03de47f61a097fc26a030a71c70bc441cf97d4
|
||||
|
||||
pkgname = gsh
|
||||
|
|
|
|||
65
PKGBUILD
65
PKGBUILD
|
|
@ -1,30 +1,45 @@
|
|||
# This file was generated by GoReleaser. DO NOT EDIT.
|
||||
# Maintainer: atinylittleshell <shell@atinylittleshell.me>
|
||||
# Maintainer: Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>
|
||||
# Maintainer: atinylittleshell <shell@atinylittleshell.me>
|
||||
# Maintainer: Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>
|
||||
|
||||
pkgname='gsh'
|
||||
pkgname="gsh"
|
||||
pkgver=0.15.2
|
||||
pkgrel=1
|
||||
pkgdesc='A modern, POSIX-compatible, generative shell'
|
||||
url='https://github.com/atinylittleshell/gsh'
|
||||
arch=('aarch64' 'x86_64')
|
||||
pkgrel=2
|
||||
pkgdesc="A modern, POSIX-compatible, generative shell"
|
||||
arch=('aarch64' 'i686' 'x86_64')
|
||||
url="https://github.com/atinylittleshell/${pkgname}"
|
||||
license=('GPL-3.0-or-later')
|
||||
provides=('gsh')
|
||||
conflicts=('gsh')
|
||||
makedepends=('go' 'git')
|
||||
source=("${pkgname}_${pkgver}.tar.gz::https://github.com/atinylittleshell/gsh/releases/download/v0.15.2/gsh-0.15.2.tar.gz")
|
||||
sha256sums=('8bfa36f97c8623b01a4b95830be2d3752207bc929e434b7f542ea5bf666e0191')
|
||||
package() {
|
||||
cd "${pkgname}_${pkgver}"
|
||||
depends=('glibc')
|
||||
makedepends=('go')
|
||||
install="${pkgname}.install"
|
||||
_pkgsrc="${pkgname}-${pkgver}"
|
||||
source=("${_pkgsrc}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
|
||||
sha256sums=('b3a76c78171ec24cc0f5afdf0e03de47f61a097fc26a030a71c70bc441cf97d4')
|
||||
|
||||
# bin
|
||||
install -Dsm755 "./gsh" "${pkgdir}/usr/bin/gsh"
|
||||
|
||||
# license
|
||||
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/gsh/LICENSE"
|
||||
|
||||
# information
|
||||
install -Dm644 "./README.md" "${pkgdir}/usr/share/doc/gsh/README.md"
|
||||
install -Dm644 "./ROADMAP.md" "${pkgdir}/usr/share/doc/gsh/ROADMAP.md"
|
||||
install -Dm644 "./CHANGELOG.md" "${pkgdir}/usr/share/doc/gsh/CHANGELOG.md"
|
||||
prepare() {
|
||||
cd "${srcdir}/${_pkgsrc}"
|
||||
mkdir -p "build"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgsrc}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build -o "build/${pkgname}" ./"cmd/${pkgname}"
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/${_pkgsrc}"
|
||||
go test ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_pkgsrc}"
|
||||
install -vDm755 "build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
install -vDm644 "CHANGELOG.md" "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md"
|
||||
install -vDm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
install -vDm644 "ROADMAP.md" "${pkgdir}/usr/share/doc/${pkgname}/ROADMAP.md"
|
||||
install -vDm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue