freecad/PKGBUILD

79 lines
2.4 KiB
Text
Raw Normal View History

2016-09-22 14:53:49 +02:00
# Maintainer: Markus Hovorka <m.hovorka@live.de>
# Contributer: Christian Hesse <mail@eworm.de>
pkgname=freecad-git
2016-09-22 14:53:49 +02:00
pkgver=0.17pre.r1771.gf944ab3
pkgrel=1
2016-09-22 14:53:49 +02:00
epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
arch=('i686' 'x86_64')
url='http://www.freecadweb.org/'
license=('LGPL')
2016-09-22 14:53:49 +02:00
depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade'
'med' 'xerces-c' 'python2-pivy' 'python2-pyside' 'qtwebkit'
'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp')
makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools'
'desktop-file-utils' 'eigen' 'gcc-fortran' 'swig' 'patch')
optdepends=('python2-matplotlib'
'pycollada-git: Create, edit and load COLLADA documents.')
provides=('freecad')
conflicts=('freecad')
install=freecad.install
2016-09-22 14:53:49 +02:00
source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git"
"freecad.install"
"freecad.desktop"
"freecad.xml"
"fem-rpath.patch")
md5sums=('SKIP'
'2fad48203f96f1e7cb97934ea20ed848'
'0a4d0635dbd97d9f594ac8e927284316'
'c2f4154c8e4678825411de8e7fa54c6b'
'99a41687a9ba980eea86aee4345d9a1d')
pkgver() {
2016-09-22 14:53:49 +02:00
cd "$pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_//'
}
prepare() {
2016-09-22 14:53:49 +02:00
cd "$srcdir/$pkgname"
patch -p1 -i "$srcdir/fem-rpath.patch"
}
build() {
2016-09-22 14:53:49 +02:00
cd "$srcdir/$pkgname"
2016-09-22 14:53:49 +02:00
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc \
-DOCC_LIBRARY_DIR:PATH=/opt/opencascade/lib \
-DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
-DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic
make
}
package() {
2016-09-22 14:53:49 +02:00
cd "$srcdir/$pkgname"
2016-09-22 14:53:49 +02:00
make DESTDIR="$pkgdir" install
# Symlink binaries to /usr/bin.
mkdir -p "$pkgdir/usr/bin"
ln -s "/opt/freecad/bin/FreeCAD" "$pkgdir/usr/bin/FreeCAD"
ln -s "/opt/freecad/bin/FreeCADCmd" "$pkgdir/usr/bin/FreeCADCmd"
2016-09-22 14:53:49 +02:00
# Lowercase aliases like the official arch package.
ln -s "/opt/freecad/bin/FreeCAD" "$pkgdir/usr/bin/freecad"
ln -s "/opt/freecad/bin/FreeCADCmd" "$pkgdir/usr/bin/freecadcmd"
2016-09-22 14:53:49 +02:00
# Install pixmaps and desktop shortcut.
desktop-file-install \
2016-09-22 14:53:49 +02:00
--dir="$pkgdir/usr/share/applications" "$srcdir/freecad.desktop"
2016-09-22 14:53:49 +02:00
# Install mime info.
install -D -m644 "$srcdir/freecad.xml" \
"$pkgdir/usr/share/mime/packages/freecad.xml"
}