Skip to content

Commit 05b3217

Browse files
authored
Merge pull request #11 from datsfilipe/feat-add-aur-package
core: add PKGBUILD for aur
2 parents 3cad8a2 + 703339c commit 05b3217

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

PKGBUILD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Maintainer: datsfilipe <contact@datsfilipe.xyz>
2+
3+
pkgname=trxsh
4+
pkgver=1.0.4
5+
pkgrel=1
6+
pkgdesc="Trxsh - A better trash-cli, built in Go."
7+
arch=('x86_64')
8+
url="https://github.com/datsfilipe/trxsh"
9+
license=('MIT')
10+
makedepends=('go')
11+
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
12+
sha256sums=('b7e572d1626559fbfa68227fe388c63af4f2b63dc9300d5e3cb93ab6457b1f3f')
13+
14+
build() {
15+
cd "$pkgname-$pkgver"
16+
export CGO_CPPFLAGS="${CPPFLAGS}"
17+
export CGO_CFLAGS="${CFLAGS}"
18+
export CGO_CXXFLAGS="${CXXFLAGS}"
19+
export CGO_LDFLAGS="${LDFLAGS}"
20+
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
21+
go build -o "$pkgname" ./cmd/main.go
22+
}
23+
24+
package() {
25+
cd "$pkgname-$pkgver"
26+
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
27+
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
28+
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
29+
}

0 commit comments

Comments
 (0)