summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7efb2db15aff51e666ee5225273a6f8bfda1042d (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
# Contributer: Sebastian Wilzbach <seb [at] wilzbach [dot] me>
# Maintainer: Bug <bug2000@gmail.com>
pkgname=tsv-utils
_pkgname=tsv-utils-dlang
pkgver=1.4.2
pkgrel=1
pkgdesc="Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more."
arch=('i686' 'x86_64')
groups=('dlang')
url="https://github.com/eBay/tsv-utils-dlang"
license=('Boost')
depends=('clang' 'liblphobos')
makedepends=('git' 'dub' 'ldc' 'liblphobos' 'make')
source=(
    "git+https://github.com/eBay/tsv-utils-dlang.git#tag=v$pkgver"
)
sha1sums=('SKIP')

_bin_files=(
    'csv2tsv' 'number-lines' 'tsv-filter' 'tsv-pretty' 'tsv-select' 'tsv-uniq'
    'keep-header' 'tsv-append' 'tsv-join' 'tsv-sample' 'tsv-summarize'
)

build ()
{
    cd $srcdir/$_pkgname
    make DCOMPILER=ldc2
}

package ()
{
    cd $srcdir/$_pkgname
    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
    mkdir -p $pkgdir/usr/share/bash-completion/completions
    install -m755 bash_completion/tsv-utils $pkgdir/usr/share/bash-completion/completions/tsv-utils
    install -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
}