summaryrefslogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD14
1 files changed, 8 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 417d414..5d3f5fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,37 +2,39 @@
2 2
3pkgname=ouch 3pkgname=ouch
4pkgver=0.3.1 4pkgver=0.3.1
5pkgrel=2 5pkgrel=3
6pkgdesc="Painless compression and decompression in the terminal" 6pkgdesc="Painless compression and decompression in the terminal"
7arch=('x86_64') 7arch=('x86_64')
8url="https://github.com/ouch-org/ouch" 8url="https://github.com/ouch-org/ouch"
9license=('MIT') 9license=('MIT')
10makedepends=('cargo') 10makedepends=('cargo')
11conflicts=(${pkgname}-git) 11conflicts=(${pkgname}-git ${pkgname}-bin)
12source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") 12source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
13sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d') 13sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d')
14 14
15prepare() { 15prepare() {
16 cd "$pkgname-$pkgver" 16 cd "$srcdir/$pkgname-$pkgver"
17 cargo fetch --locked --target "$CARCH-unknown-linux-gnu" 17 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
18} 18}
19 19
20build() { 20build() {
21 cd "$pkgname-$pkgver" 21 cd "$srcdir/$pkgname-$pkgver"
22 export RUSTUP_TOOLCHAIN=stable 22 export RUSTUP_TOOLCHAIN=stable
23 export CARGO_TARGET_DIR=target 23 export CARGO_TARGET_DIR=target
24 GEN_COMPLETIONS=1 cargo build --frozen --release --all-features 24 GEN_COMPLETIONS=1 cargo build --frozen --release --all-features
25} 25}
26 26
27check() { 27check() {
28 cd "$pkgname-$pkgver" 28 cd "$srcdir/$pkgname-$pkgver"
29 export RUSTUP_TOOLCHAIN=stable 29 export RUSTUP_TOOLCHAIN=stable
30 cargo test --frozen --all-features 30 cargo test --frozen --all-features
31} 31}
32 32
33package() { 33package() {
34 cd "$pkgname-$pkgver" 34 cd "$srcdir/$pkgname-$pkgver"
35
35 install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" 36 install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
37 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
36 38
37 cd target/release/build/ouch-*/out/completions 39 cd target/release/build/ouch-*/out/completions
38 sed -i "s/':output -- The resulting file. It's extensions can be used to specify the compression formats:_files'/\":output -- The resulting file. It's extensions can be used to specify the compression formats:_files\"/" _ouch 40 sed -i "s/':output -- The resulting file. It's extensions can be used to specify the compression formats:_files'/\":output -- The resulting file. It's extensions can be used to specify the compression formats:_files\"/" _ouch