diff options
Diffstat (limited to 'ouch')
-rw-r--r-- | ouch/.SRCINFO | 14 | ||||
-rw-r--r-- | ouch/.gitignore | 3 | ||||
-rw-r--r-- | ouch/PKGBUILD | 53 |
3 files changed, 70 insertions, 0 deletions
diff --git a/ouch/.SRCINFO b/ouch/.SRCINFO new file mode 100644 index 0000000..27bd7fc --- /dev/null +++ b/ouch/.SRCINFO | |||
@@ -0,0 +1,14 @@ | |||
1 | pkgbase = ouch | ||
2 | pkgdesc = Painless compression and decompression in the terminal | ||
3 | pkgver = 0.4.0 | ||
4 | pkgrel = 2 | ||
5 | url = https://github.com/ouch-org/ouch | ||
6 | arch = x86_64 | ||
7 | license = MIT | ||
8 | makedepends = cargo | ||
9 | conflicts = ouch-git | ||
10 | conflicts = ouch-bin | ||
11 | source = ouch-0.4.0.tar.gz::https://github.com/ouch-org/ouch/archive/refs/tags/0.4.0.tar.gz | ||
12 | sha256sums = 3e126f00e1ad82ef4abfd28f86dac53b366a29de6a70359e734ecc8748f580fc | ||
13 | |||
14 | pkgname = ouch | ||
diff --git a/ouch/.gitignore b/ouch/.gitignore new file mode 100644 index 0000000..1d65adf --- /dev/null +++ b/ouch/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | * | ||
2 | !PKGBUILD | ||
3 | !.SRCINFO | ||
diff --git a/ouch/PKGBUILD b/ouch/PKGBUILD new file mode 100644 index 0000000..0d3cfee --- /dev/null +++ b/ouch/PKGBUILD | |||
@@ -0,0 +1,53 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | ||
2 | |||
3 | pkgname=ouch | ||
4 | pkgver=0.4.0 | ||
5 | pkgrel=2 | ||
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/refs/tags/${pkgver}.tar.gz") | ||
13 | sha256sums=('3e126f00e1ad82ef4abfd28f86dac53b366a29de6a70359e734ecc8748f580fc') | ||
14 | |||
15 | prepare() { | ||
16 | cd "$srcdir/$pkgname-$pkgver" | ||
17 | # TODO: Remove on next release <27-11-22, yigit> # | ||
18 | rm -f rust-toolchain | ||
19 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | ||
20 | } | ||
21 | |||
22 | build() { | ||
23 | cd "$srcdir/$pkgname-$pkgver" | ||
24 | export RUSTUP_TOOLCHAIN=stable | ||
25 | export CARGO_TARGET_DIR=target | ||
26 | OUCH_ARTIFACTS_FOLDER=artifacts cargo build --frozen --release --all-features | ||
27 | } | ||
28 | |||
29 | check() { | ||
30 | cd "$srcdir/$pkgname-$pkgver" | ||
31 | export RUSTUP_TOOLCHAIN=stable | ||
32 | cargo test --frozen --all-features | ||
33 | } | ||
34 | |||
35 | package() { | ||
36 | cd "$srcdir/$pkgname-$pkgver" | ||
37 | |||
38 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" | ||
39 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
40 | |||
41 | cd "$srcdir/$pkgname-$pkgver/artifacts" | ||
42 | |||
43 | # install manpages | ||
44 | install -Dm0644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1" | ||
45 | install -Dm0644 "${pkgname}-compress.1" -t "${pkgdir}/usr/share/man/man1" | ||
46 | install -Dm0644 "${pkgname}-decompress.1" -t "${pkgdir}/usr/share/man/man1" | ||
47 | install -Dm0644 "${pkgname}-list.1" -t "${pkgdir}/usr/share/man/man1" | ||
48 | |||
49 | # install shell completions | ||
50 | install -Dm0644 "${pkgname}.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" | ||
51 | install -Dm0644 "${pkgname}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" | ||
52 | install -Dm0644 "_${pkgname}" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" | ||
53 | } | ||