diff options
author | Patrick Haun | 2020-11-03 13:39:32 +0100 |
---|---|---|
committer | Patrick Haun | 2020-11-03 13:39:32 +0100 |
commit | 3a20365182c7702aac32820e69cc40ef0b2eabef (patch) | |
tree | bab0e54e91209b59776cf65aa26f3f8dcb4888ec /PKGBUILD.tmpl | |
parent | b3212735dd9964c9e50619ef93eaccee28b075ba (diff) | |
download | aur-goat.tar.gz |
build from source
Diffstat (limited to 'PKGBUILD.tmpl')
-rw-r--r-- | PKGBUILD.tmpl | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/PKGBUILD.tmpl b/PKGBUILD.tmpl index 9a3e31aea0b1..087dc61fbb36 100644 --- a/PKGBUILD.tmpl +++ b/PKGBUILD.tmpl @@ -6,13 +6,24 @@ pkgrel=__PKGREL__ pkgdesc="better sleep" arch=('x86_64') url="https://github.com/brocode/goat" -license=('WTFPL') -source=('__SOURCE__') +license=('custom:WTFPL') +makedepends=('cargo') +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('__SHA256__') -package() { - mkdir -p "${pkgdir}/usr/bin" - chmod +x goat - cp goat "${pkgdir}/usr/bin/goat" +build() { + cd "$pkgname-$pkgver" + cargo build --release --locked --all-features +} + +check() { + cd "$pkgname-$pkgver" + cargo test --release --locked } +package() { + cd "$pkgname-$pkgver" + install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin" + install -Dm 644 README.org -t "$pkgdir/usr/share/doc/$pkgname" + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" +} |