summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 653c3704f4868f67382782996f1f3de64348adb5 (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
# Maintainer: Grey Christoforo <first name [at] last name [dot] net>

pkgname=python-occ-cadquery-git
_pkgname=pythonocc-core
pkgver=r929.701e924a
pkgrel=1
pkgdesc="A python library whose purpose is to provide 3D modeling features -- CadQuery's fork"
url="https://github.com/CadQuery/pythonocc-core"
arch=('i686' 'x86_64')
license=('Apache')
makedepends=('cmake' 'swig')
depends=('oce' 'python')
conflicts=('python-occ')
source=("git://github.com/CadQuery/pythonocc-core.git")
md5sums=('SKIP')

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

prepare() {
  cd ${_pkgname}
  mkdir -p build
  cd build
  flags=""
  flags="$flags -DCMAKE_INSTALL_PREFIX=/usr/local"
  flags="$flags -DOCE_INCLUDE_PATH=/opt/oce/include/oce"
  flags="$flags -DOCE_LIB_PATH=/opt/oce/lib"
  cmake $flags ..
}

check(){
  cd ${_pkgname}/test
  python run_tests.py | true
}

build() {
  cd ${_pkgname}/build
  make
}

package() {
  cd ${_pkgname}/build
  make DESTDIR="${pkgdir}" install
  install -Dm644 ${srcdir}/${_pkgname}/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: