initial import of freecad-git 0.14.1.r896.gaeabffe-1

This commit is contained in:
Christian Hesse 2015-06-30 09:40:28 +02:00
commit 97bf587149
5 changed files with 162 additions and 0 deletions

43
.SRCINFO Normal file
View file

@ -0,0 +1,43 @@
pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout
pkgver = 0.14.1.r896.gaeabffe
pkgrel = 1
url = http://www.freecadweb.org/
install = freecad.install
arch = i686
arch = x86_64
license = LGPL
makedepends = git
makedepends = boost
makedepends = eigen
makedepends = gcc-fortran
makedepends = swig
makedepends = desktop-file-utils
makedepends = cmake
makedepends = coin
makedepends = python2-pyside-tools
depends = boost-libs
depends = curl
depends = opencascade>=6.6.0
depends = python2-pivy
depends = xerces-c
depends = libspnav
depends = shared-mime-info
depends = hicolor-icon-theme
depends = python2-matplotlib
depends = python2-shiboken
depends = python2-pyside
depends = qtwebkit
optdepends = freecad-dxf: import DXF files
optdepends = pycollada-git: create, edit and load COLLADA documents
provides = freecad
conflicts = freecad
source = freecad::git://git.code.sf.net/p/free-cad/code
source = freecad.desktop
source = freecad.xml
sha256sums = SKIP
sha256sums = 886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f
sha256sums = 248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a
pkgname = freecad-git

82
PKGBUILD Normal file
View file

@ -0,0 +1,82 @@
# Maintainer: Christian Hesse <mail@eworm.de>
pkgname=freecad-git
pkgver=0.14.1.r896.gaeabffe
pkgrel=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
arch=('i686' 'x86_64')
url='http://www.freecadweb.org/'
license=('LGPL')
depends=('boost-libs' 'curl' 'opencascade>=6.6.0' 'python2-pivy' 'xerces-c'
'libspnav' 'shared-mime-info' 'hicolor-icon-theme'
'python2-matplotlib' 'python2-shiboken' 'python2-pyside' 'qtwebkit')
makedepends=('git' 'boost' 'eigen' 'gcc-fortran' 'swig' 'desktop-file-utils'
'cmake' 'coin' 'python2-pyside-tools')
optdepends=('freecad-dxf: import DXF files'
'pycollada-git: create, edit and load COLLADA documents')
provides=('freecad')
conflicts=('freecad')
install=freecad.install
source=('freecad::git://git.code.sf.net/p/free-cad/code'
'freecad.desktop'
'freecad.xml')
sha256sums=('SKIP'
'886688f1f3624fafe92710890bda7504d1e0181c2c5239b313066eb412a78e0f'
'248918de7d3c2145b5cc4fbbc9e224d22f4a6ca7ead2680e8c3a32e91772482a')
pkgver() {
cd freecad/
if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
else
echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
fi
}
prepare() {
sed -i \
-e "46i\\\tModDir = '/usr/share/freecad/Mod'" \
-e "50i\\\tLibDir = '/usr/lib/freecad'" \
"${srcdir}/freecad/src/App/FreeCADInit.py"
}
build() {
cd freecad/
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DCMAKE_INSTALL_DOCDIR:PATH="share/freecad/doc" \
-DCMAKE_INSTALL_DATADIR:PATH="share/freecad" \
-DCMAKE_INSTALL_LIBDIR:PATH="lib/freecad" \
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc/ \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
-DPYSIDEUIC4BINARY:FILEPATH=/usr/bin/python2-pyside-uic \
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON
make
}
package() {
cd freecad/build/
make DESTDIR="${pkgdir}" install
# Symlink to /usr/bin
ln -sf "FreeCAD" "${pkgdir}/usr/bin/freecad"
ln -sf "FreeCADCmd" "${pkgdir}/usr/bin/freecadcmd"
cp -ra "${pkgdir}/usr/Mod" "${pkgdir}/usr/share/freecad/"
rm -r "${pkgdir}/usr/Mod"
# Install pixmaps and desktop shortcut
desktop-file-install \
--dir="${pkgdir}/usr/share/applications" \
"${srcdir}/freecad.desktop"
# Mime info
install -D -m644 "${srcdir}/freecad.xml" "${pkgdir}/usr/share/mime/packages/freecad.xml"
}

14
freecad.desktop Normal file
View file

@ -0,0 +1,14 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=FreeCAD
Comment=A general purpose 3D CAD modeler
GenericName=CAD Application
Exec=/usr/bin/freecad %F
Path=/opt/freecad/lib
Terminal=false
Type=Application
Icon=/opt/freecad/data/freecad.xpm
Categories=Application;Science;Math;Education;
StartupNotify=true
MimeType=application/x-extension-fcstd;

15
freecad.install Normal file
View file

@ -0,0 +1,15 @@
post_install() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
update-desktop-database -q
update-mime-database usr/share/mime
}
post_upgrade() {
post_install
}
post_remove() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
update-desktop-database -q
update-mime-database usr/share/mime
}

8
freecad.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-extension-fcstd">
<sub-class-of type="application/zip"/>
<comment>FreeCAD document</comment>
<glob pattern="*.fcstd"/>
</mime-type>
</mime-info>