Created
August 23, 2024 07:48
-
-
Save Omnikron13/17f2c1a103124740262f660c156a0860 to your computer and use it in GitHub Desktop.
Quick and dirty PKGBUILD alternative to install.sh for gopad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Maintainer: Joey Sabey <joey.sabey@gmx.com> | |
| pkgname=gopad-git | |
| procname=gopad | |
| provides=("${procname}") | |
| pkgver=c84fd37 | |
| pkgrel=1 | |
| pkgdesc="simple terminal-based text editor written in Go and inspired mostly by nano" | |
| arch=('any') | |
| url="https://github.com/gopad-dev/${pkgname%-git}" | |
| license=('Apache') | |
| buiddepends=( | |
| 'go' | |
| ) | |
| source=( | |
| "${pkgname}::git+https://github.com/gopad-dev/${pkgname%-git}.git" | |
| ) | |
| b2sums=( | |
| 'SKIP' | |
| ) | |
| pkgver() { | |
| cd "$srcdir/${pkgname}" | |
| git describe --always --tags --long | sed -e 's|^v||' -e 's|-|.|g' | |
| } | |
| build() { | |
| cd "${srcdir}/${pkgname}" | |
| CGO_ENABLED=1 go build -ldflags="-X 'main.Version=${pkgver}' -X 'main.Commit=${pkgver}'" -o dist/gopad go.gopad.dev/gopad | |
| } | |
| package() { | |
| install -Dm755 ${srcdir}/${pkgname}/dist/${procname} -t "${pkgdir}/usr/bin" | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment