summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-11-03 12:20:14 +0300
committerYigit Sever2021-11-03 12:20:14 +0300
commit22b31065aef12ec6b836857f563d7b6a4d33aeeb (patch)
treecadb606de46dffdbc31752e74e2dce5a4d64ba21
parente472f310ce22e6726391142d4b9a53705853452a (diff)
downloadpackages-22b31065aef12ec6b836857f563d7b6a4d33aeeb.tar.gz
packages-22b31065aef12ec6b836857f563d7b6a4d33aeeb.tar.bz2
packages-22b31065aef12ec6b836857f563d7b6a4d33aeeb.zip
Run tests and install completions
Upstream builds completions during compilation
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD18
2 files changed, 18 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4aea0eb..47f9d8a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
1pkgbase = ouch 1pkgbase = ouch
2 pkgdesc = Painless compression and decompression in the terminal 2 pkgdesc = Painless compression and decompression in the terminal
3 pkgver = 0.3.1 3 pkgver = 0.3.1
4 pkgrel = 1 4 pkgrel = 2
5 url = https://github.com/ouch-org/ouch 5 url = https://github.com/ouch-org/ouch
6 arch = x86_64 6 arch = x86_64
7 license = MIT 7 license = MIT
8 makedepends = cargo 8 makedepends = cargo
9 conflicts = ouch-git
9 source = ouch-0.3.1.tar.gz::https://github.com/ouch-org/ouch/archive/0.3.1.tar.gz 10 source = ouch-0.3.1.tar.gz::https://github.com/ouch-org/ouch/archive/0.3.1.tar.gz
10 sha256sums = 269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d 11 sha256sums = 269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d
11 12
diff --git a/PKGBUILD b/PKGBUILD
index 6d00377..417d414 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,13 @@
2 2
3pkgname=ouch 3pkgname=ouch
4pkgver=0.3.1 4pkgver=0.3.1
5pkgrel=1 5pkgrel=2
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)
11source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") 12source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
12sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d') 13sha256sums=('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
27check() {
28 cd "$pkgname-$pkgver"
29 export RUSTUP_TOOLCHAIN=stable
30 cargo test --frozen --all-features
24} 31}
25 32
26package() { 33package() {
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}