summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06e772ae416c0551a5585b9b02ffbb5669881872 (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
# Maintainer: Grey Christoforo <first name at last name dot net>
pkgname=libarea-git
pkgver=120.f1986ac
pkgrel=6
pkgdesc="Library and python module for pocketing and profiling operations"
arch=('x86_64')
provides=('libarea')
url="https://github.com/Heeks/libarea"
license=('custom:BSD3')
depends=('python' 'oce' 'boost')
makedepends=('git' 'cmake')
source=('git://github.com/Heeks/libarea.git')
md5sums=('SKIP')

pkgver() {
  cd libarea
  #echo $(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd libarea
  sed -i 's,COMMAND python-config --includes,COMMAND python2-config --includes,g' CMakeLists.txt
  sed -i 's,COMMAND python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())",COMMAND python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())",g' CMakeLists.txt

}

build() {
  msg "Starting build..."
  cd libarea
  mkdir -p build
  cd build
  export OCE_DIR="/opt/oce/lib/oce-0.18"
  cmake -DCMAKE_INSTALL_PREFIX=/usr ..
}

package() {
  cd libarea/build
  make DESTDIR="$pkgdir/" install
  mkdir -p "$pkgdir/usr/share/licenses/libarea-git"
  install -m644 "$srcdir/libarea/debian/copyright" "$pkgdir/usr/share/licenses/libarea-git/copyright"
}