summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 699da999257d157be0a9c36b145fce06abeefafd (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
# Maintainer: Bogdan Burlacu <bogdan.burlacu@pm.me>

pkgname="tsv-utils-bin"
_pkgname=tsv-utils
pkgver=2.0.0
pkgrel=1
pkgdesc="Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more. Self-contained official binary release package."
arch=('x86_64')
groups=('dlang')
url="https://github.com/eBay/tsv-utils"
license=('Boost')
provides=('tsv-utils')
conflicts=('tsv-utils')

source=("${url}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}_linux-x86_64_ldc2.tar.gz")
sha256sums=('f2365778e5db6872d775456c99ec8565388c5d9aa75ebafff2c9c11d1d9a0ba2')
_bin_files=(
    'csv2tsv'  'keep-header'  'number-lines'  'tsv-append'  'tsv-filter'  'tsv-join'  'tsv-pretty'  'tsv-sample'  'tsv-select'  'tsv-summarize'  'tsv-uniq'
)

package() {
    cd "${_pkgname}-v${pkgver}_linux-x86_64_ldc2"

    mkdir -p $pkgdir/usr/bin
    for file in "${_bin_files[@]}"; do
        install -m755 bin/$file $pkgdir/usr/bin/$file
    done

    mkdir -p $pkgdir/usr/share/licenses/$pkgname
    install -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"

    mkdir -p $pkgdir/usr/share/bash-completion/completions
    install -m755 bash_completion/tsv-utils $pkgdir/usr/share/bash-completion/completions/tsv-utils
}