mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
65 lines
2.5 KiB
Bash
65 lines
2.5 KiB
Bash
pkgname=freecad
|
|
pkgver=0.15.4671
|
|
pkgrel=1
|
|
pkgdesc='A general purpose 3D CAD modeler'
|
|
arch=('x86_64')
|
|
url='http://www.freecadweb.org/wiki'
|
|
license=('GPL')
|
|
depends=('boost-libs' 'curl' 'opencascade' 'pivy-hg' 'xerces-c' 'libspnav' 'shared-mime-info' 'hicolor-icon-theme' 'python2-matplotlib' 'python2-shiboken' 'python2-pyside-tools' 'pyside-tools-common' 'python2-pyqt4' 'qtwebkit')
|
|
makedepends=('boost' 'eigen3' 'gcc-fortran' 'swig' 'xerces-c' 'desktop-file-utils' 'cmake' 'coin' 'zlib' 'glu')
|
|
options=(!libtool !makeflags)
|
|
install=freecad.install
|
|
source=("http://downloads.sourceforge.net/project/free-cad/FreeCAD%20Source/${pkgname}_${pkgver}.tar.gz"
|
|
"${pkgname}.desktop"
|
|
"${pkgname}.xml")
|
|
sha512sums=('695081117b5511bbc0b7335b63a8760e164987a6dff2c5b0dc86b6b0a93bb7d7b83aa9f4fab1d66d7d2c917a42b0135af78553b463579873a1d1e52e3dd9aecb'
|
|
'a58dd5f6d8217b6633d5cc24a0b61954b1044d4156b25b78c00ea29f3ac9ca4932e9bde08bd11fc4327d76c7e82500cf3c2ddc934f426e970757cd200b070aec'
|
|
'ac0dfe1b2c58335867e94d4ce86696763b6354dcdca68a653bf115b6ea562f0f8ff7d243d42d0c6fd6e758bd488d626e30cd917bb1b5c676c1f0cafdece005d6')
|
|
|
|
prepare() {
|
|
sed -i \
|
|
-e "46i\\\tModDir = '/usr/share/freecad/Mod'" \
|
|
-e "50i\\\tLibDir = '/usr/lib/freecad'" \
|
|
"${srcdir}/freecad-${pkgver}/src/App/FreeCADInit.py"
|
|
|
|
sed -i \
|
|
-e 's|\bpyside-uic\b|python2-pyside-uic|' \
|
|
$srcdir/freecad-$pkgver/cMake/FindPySideTools.cmake
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/freecad-${pkgver}/"
|
|
cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-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 \
|
|
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=ON
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/freecad-${pkgver}"
|
|
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}/${pkgname}.desktop"
|
|
|
|
install -d ${pkgdir}/usr/share/pixmaps
|
|
cp ${pkgdir}/usr/share/freecad/freecad.svg ${pkgdir}/usr/share/pixmaps/freecad.svg
|
|
|
|
# Mime info
|
|
install -D -m644 "${srcdir}/${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
|
|
} |