summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad11ebaa9b4a524330a0b78bf0547bbca5c63698 (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
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Torsten Wagner <tottiwagner@yahoo.de>

pkgname=openscad-git
pkgver=20190505
pkgrel=1
pkgdesc="The programmers solid 3D CAD modeller"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://openscad.org/"
provides=('openscad')
conflicts=('openscad')
depends=('qt5-base' 'qscintilla-qt5' 'cgal' 'opencsg' 'boost-libs' 'qt5-multimedia' 'libzip')
makedepends=('git' 'boost' 'eigen' 'imagemagick' 'ccache')
source=('git+https://github.com/openscad/openscad.git'
        'git+https://github.com/openscad/MCAD.git')
md5sums=('SKIP' 'SKIP')

_gitname="openscad"
_gitbranch="master"

pkgver() {
  cd "$_gitname"
  git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
  #git describe --always --tags | sed 's/-/./g'
}

build() {
  cd "$_gitname"
  # submodules seem kind of weird with the detached bare repo
  cp -ar "$srcdir/MCAD" libraries
  rm -f libraries/MCAD/*.py
  rm -rf libraries/MCAD/.git/
  qmake-qt5 PREFIX="/usr" VERSION="$pkgver" CONFIG+=experimental
  make
  convert "icons/openscad.png" -resize 128x128\> "icons/openscad-128.png"
}

package() {
  cd "$_gitname"
  make INSTALL_ROOT="$pkgdir"  install
  install -Dm644 "icons/openscad.desktop" "$pkgdir/usr/share/applications/openscad.desktop"
  install -Dm644 "icons/openscad-128.png" "$pkgdir/usr/share/pixmaps/openscad.png"
}