diff options
author | Chloe Kudryavtsev <toast@toastin.space> | 2019-06-09 13:40:40 -0400 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-06-19 08:12:56 -0300 |
commit | 3de4fbcd6980bc5306a9eb94ab94b379fa416066 (patch) | |
tree | be2b25c70876cacb4803ea0ead6db0a25fb30c18 | |
parent | 97ed6987b416ecbf8c5025072d635f667df58157 (diff) | |
download | alpine_aports-3de4fbcd6980bc5306a9eb94ab94b379fa416066.tar.bz2 alpine_aports-3de4fbcd6980bc5306a9eb94ab94b379fa416066.tar.xz alpine_aports-3de4fbcd6980bc5306a9eb94ab94b379fa416066.zip |
testing/sd: new aport
Fast and intuitive sed-like.
Useful in most cases, when sed/awk are overkill.
-rw-r--r-- | testing/sd/APKBUILD | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/testing/sd/APKBUILD b/testing/sd/APKBUILD new file mode 100644 index 0000000000..5b29503125 --- /dev/null +++ b/testing/sd/APKBUILD | |||
@@ -0,0 +1,75 @@ | |||
1 | # Contributor: Chloe Kudryavtsev <toast@toastin.space> | ||
2 | # Maintainer: Chloe Kudryavtsev <toast@toastin.space> | ||
3 | pkgname=sd | ||
4 | pkgver=0.6.4 | ||
5 | pkgrel=0 | ||
6 | pkgdesc="An intuitive find & replace CLI" | ||
7 | url="https://github.com/chmln/sd" | ||
8 | arch="x86_64" # limited by rust/cargo | ||
9 | license="MIT" | ||
10 | options="net" | ||
11 | makedepends="cargo" | ||
12 | source="$pkgname-$pkgver.tar.gz::https://github.com/chmln/sd/archive/$pkgver.tar.gz" | ||
13 | subpackages="$pkgname-doc | ||
14 | $pkgname-bash-completion:bashcomp:noarch | ||
15 | $pkgname-zsh-completion:zshcomp:noarch | ||
16 | $pkgname-fish-completion:fishcomp:noarch" | ||
17 | |||
18 | export CARGO_HOME="$srcdir"/cargo | ||
19 | |||
20 | build() { | ||
21 | cargo build \ | ||
22 | --release \ | ||
23 | --verbose | ||
24 | } | ||
25 | |||
26 | check() { | ||
27 | cargo test --all \ | ||
28 | --release \ | ||
29 | --verbose | ||
30 | } | ||
31 | |||
32 | package() { | ||
33 | install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname" | ||
34 | |||
35 | # doc | ||
36 | find target/release -name "$pkgname.1" \ | ||
37 | -exec install -Dm644 {} "$pkgdir"/usr/share/man/man1/"$pkgname.1" \; | ||
38 | |||
39 | # comp | ||
40 | find target/release -name "$pkgname.bash" \ | ||
41 | -exec install -Dm644 {} "$pkgdir"/usr/share/bash-completion/completions/"$pkgname" \; | ||
42 | find target/release -name "$pkgname.fish" \ | ||
43 | -exec install -Dm644 {} "$pkgdir"/usr/share/fish/completions/"$pkgname.fish" \; | ||
44 | find target/release -name "_$pkgname" \ | ||
45 | -exec install -Dm644 {} "$pkgdir"/usr/share/zsh/site-functions/"_$pkgname" \; | ||
46 | } | ||
47 | |||
48 | bashcomp() { | ||
49 | depends="" | ||
50 | pkgdesk="Bash completions for $pkgname" | ||
51 | install_if="$pkgname=$pkgver-r$pkgrel bash-completion" | ||
52 | |||
53 | mkdir -p "$subpkgdir"/usr/share | ||
54 | mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/ | ||
55 | } | ||
56 | |||
57 | fishcomp() { | ||
58 | depends="" | ||
59 | pkgdesc="Fish completions for $pkgname" | ||
60 | install_if="$pkgname=$pkgver-r$pkgrel fish" | ||
61 | |||
62 | mkdir -p "$subpkgdir"/usr/share | ||
63 | mv "$pkgdir"/usr/share/fish "$subpkgdir"/usr/share/ | ||
64 | } | ||
65 | |||
66 | zshcomp() { | ||
67 | depends="" | ||
68 | pkgdesc="Zsh completions for $pkgname" | ||
69 | install_if="$pkgname=$pkgver-r$pkgrel zsh" | ||
70 | |||
71 | mkdir -p "$subpkgdir"/usr/share | ||
72 | mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share | ||
73 | } | ||
74 | |||
75 | sha512sums="cf0a2890013cc00c21fc29513931df14cf2523337a490d3cd4534c2d350f7331f332e4fb60559346f47820f5a6df25d31556628d49e8d52cd30fdd43a1d735a6 sd-0.6.4.tar.gz" | ||