diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -2,12 +2,13 @@ | |||
2 | 2 | ||
3 | pkgname=ouch | 3 | pkgname=ouch |
4 | pkgver=0.3.1 | 4 | pkgver=0.3.1 |
5 | pkgrel=1 | 5 | pkgrel=2 |
6 | pkgdesc="Painless compression and decompression in the terminal" | 6 | pkgdesc="Painless compression and decompression in the terminal" |
7 | arch=('x86_64') | 7 | arch=('x86_64') |
8 | url="https://github.com/ouch-org/ouch" | 8 | url="https://github.com/ouch-org/ouch" |
9 | license=('MIT') | 9 | license=('MIT') |
10 | makedepends=('cargo') | 10 | makedepends=('cargo') |
11 | conflicts=(${pkgname}-git) | ||
11 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") | 12 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") |
12 | sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d') | 13 | sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d') |
13 | 14 | ||
@@ -20,10 +21,23 @@ build() { | |||
20 | cd "$pkgname-$pkgver" | 21 | cd "$pkgname-$pkgver" |
21 | export RUSTUP_TOOLCHAIN=stable | 22 | export RUSTUP_TOOLCHAIN=stable |
22 | export CARGO_TARGET_DIR=target | 23 | export CARGO_TARGET_DIR=target |
23 | cargo build --frozen --release --all-features | 24 | GEN_COMPLETIONS=1 cargo build --frozen --release --all-features |
25 | } | ||
26 | |||
27 | check() { | ||
28 | cd "$pkgname-$pkgver" | ||
29 | export RUSTUP_TOOLCHAIN=stable | ||
30 | cargo test --frozen --all-features | ||
24 | } | 31 | } |
25 | 32 | ||
26 | package() { | 33 | package() { |
27 | cd "$pkgname-$pkgver" | 34 | cd "$pkgname-$pkgver" |
28 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" | 35 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" |
36 | |||
37 | 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 | ||
39 | |||
40 | install -Dm0644 ${pkgname}.bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" | ||
41 | install -Dm0644 ${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" | ||
42 | install -Dm0644 _${pkgname} "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" | ||
29 | } | 43 | } |