diff options
author | Yigit Sever | 2021-11-16 15:56:06 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-16 15:56:06 +0300 |
commit | 5f672acc55ffe9d72c39d76f4bc1ae8ec6539067 (patch) | |
tree | e397ba75937e9fe569b57cc736cdd5fdda14a112 /ouch/PKGBUILD | |
parent | b12b893ba2ae85b42c9a370dcf8885fe2755734c (diff) | |
download | packages-5f672acc55ffe9d72c39d76f4bc1ae8ec6539067.tar.gz packages-5f672acc55ffe9d72c39d76f4bc1ae8ec6539067.tar.bz2 packages-5f672acc55ffe9d72c39d76f4bc1ae8ec6539067.zip |
Tracking adopted packages
- dvc
- flowy
- ouch{-bin, -git,}
Diffstat (limited to 'ouch/PKGBUILD')
-rw-r--r-- | ouch/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ouch/PKGBUILD b/ouch/PKGBUILD new file mode 100644 index 0000000..5d3f5fa --- /dev/null +++ b/ouch/PKGBUILD | |||
@@ -0,0 +1,45 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | ||
2 | |||
3 | pkgname=ouch | ||
4 | pkgver=0.3.1 | ||
5 | pkgrel=3 | ||
6 | pkgdesc="Painless compression and decompression in the terminal" | ||
7 | arch=('x86_64') | ||
8 | url="https://github.com/ouch-org/ouch" | ||
9 | license=('MIT') | ||
10 | makedepends=('cargo') | ||
11 | conflicts=(${pkgname}-git ${pkgname}-bin) | ||
12 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") | ||
13 | sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d') | ||
14 | |||
15 | prepare() { | ||
16 | cd "$srcdir/$pkgname-$pkgver" | ||
17 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | ||
18 | } | ||
19 | |||
20 | build() { | ||
21 | cd "$srcdir/$pkgname-$pkgver" | ||
22 | export RUSTUP_TOOLCHAIN=stable | ||
23 | export CARGO_TARGET_DIR=target | ||
24 | GEN_COMPLETIONS=1 cargo build --frozen --release --all-features | ||
25 | } | ||
26 | |||
27 | check() { | ||
28 | cd "$srcdir/$pkgname-$pkgver" | ||
29 | export RUSTUP_TOOLCHAIN=stable | ||
30 | cargo test --frozen --all-features | ||
31 | } | ||
32 | |||
33 | package() { | ||
34 | cd "$srcdir/$pkgname-$pkgver" | ||
35 | |||
36 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" | ||
37 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
38 | |||
39 | cd target/release/build/ouch-*/out/completions | ||
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 | ||
41 | |||
42 | install -Dm0644 ${pkgname}.bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" | ||
43 | install -Dm0644 ${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" | ||
44 | install -Dm0644 _${pkgname} "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" | ||
45 | } | ||