summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 500a16b42d2fea16dea2373f686815ddd040b2ba (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
# Maintainer: meepzh <meep.aur@meepzh.com>
pkgname=seexpr-git
pkgver=2.9.r0.g36ffb81
pkgrel=1
pkgdesc="An embeddable expression evaluation engine"
arch=(i686 x86_64)
url="http://www.disneyanimation.com/technology/seexpr.html"
license=('custom:SeExpr')
optdepends=('python2-pyqt4: required for SeExpr editor')
makedepends=('cmake>=2.4.6' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/wdas/SeExpr.git' 'build-info.patch' 'CMakeLists.txt.patch' 'Editor_CMakeLists.txt.patch')
md5sums=('SKIP' 'bb56b587bca21debebf86b7adb6242f1' '0b04cc77edebf6d364767cad0a988ef2' '69721fc7e11747cfbc7f0712b4975f79')

pkgver() {
  cd "$srcdir/SeExpr"
  # Cutting off 'v' prefix that presents in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir"
  # Remove pyqtconfig module dependency
  patch -p1 -i "$srcdir/build-info.patch"
  # Remove demos, tests, and docs
  patch -p1 -i "$srcdir/CMakeLists.txt.patch"
  # Use Python2 for editor if available
  patch -p1 -i "$srcdir/Editor_CMakeLists.txt.patch"
}

build() {
  cd "$srcdir/SeExpr"
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  make
}

package() {
  cd "$srcdir/SeExpr/build"
  make DESTDIR="$pkgdir/" install
  # Copy custom Apache license
  mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
  cp "../LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}