blob: 3e6b7b86b58fe2d587d8b21f2fddec1779a1d0bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# $Id$
# Maintainer: Radu Potop <radu at wooptoo dot com>
pkgname=arrow-tools
pkgver=0.19.0
pkgrel=1
pkgdesc="A collection of handy CLI tools to convert CSV and JSON to Apache Arrow and Parquet"
arch=('x86_64')
url="https://github.com/domoritz/arrow-tools"
license=('Apache-2.0' 'MIT')
depends=('gcc-libs' 'glibc')
makedepends=('cargo')
source=("${url}/archive/refs/tags/v${pkgver}.tar.gz")
BINFILES=(
csv2arrow
csv2parquet
json2arrow
json2parquet
)
prepare() {
cd $srcdir/$pkgname-$pkgver
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd $srcdir/$pkgname-$pkgver
cargo build --frozen --release
}
package() {
cd $srcdir/$pkgname-$pkgver
# binary
for binfile in "${BINFILES[@]}"; do
install -vDm755 -t "$pkgdir/usr/bin" target/release/$binfile
done
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
# rename md files to reduce directory nesting
# csv2parquet/Readme.md -> csv2parquet.md
for binfile in "${BINFILES[@]}"; do
install -vm644 crates/$binfile/Readme.md "$pkgdir/usr/share/doc/$pkgname/$binfile.md"
done
# licenses
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" ./LICEN*
}
sha256sums=('77203b10f88ff4199278453c2899f2469f25c287f729b71207c74fc54748b3bc')
|