summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 063cfc58ef040838ad4e4597aa094e5ae3fe57fe (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
# Maintainer: Philipp Cla├čen <philipp.classen@posteo.de>
pkgname=num
pkgver=r312.9aa9e49
pkgrel=1
pkgdesc="a command line tool for mathematics and statistics data processing"
arch=('i686' 'x86_64')
url="http://www.numcommand.com"
license=('MIT')

depends=('glibc')
makedepends=('gcc' 'make')

source=('git://github.com/numcommand/num.git')
md5sums=('SKIP')

pkgver() {
  cd num
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/num/implementations/num-c"
  gcc -Wall -O3 -march=native -mtune=native num.c -o num -lm
  strip num
}

package() {
  cd "${srcdir}/num"
  mkdir -p "${pkgdir}/usr/bin"
  install -D -m755 implementations/num-c/num "${pkgdir}/usr/bin/num"
  install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}