Clean up code and formatting

This commit is contained in:
Markus Hovorka 2017-03-29 14:32:08 +02:00
parent c47f71a271
commit a09136dbcf
2 changed files with 52 additions and 49 deletions

View file

@ -1,6 +1,6 @@
pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout
pkgver = 0.17pre.r3954.g7e9da5e95
pkgver = 0.17pre.r3959.g0ca5ebe78
pkgrel = 1
epoch = 1
url = http://www.freecadweb.org/

View file

@ -1,8 +1,9 @@
# Maintainer: Markus Hovorka <m.hovorka@live.de>
# Contributer: Christian Hesse <mail@eworm.de>
pkgname=freecad-git
pkgver=0.17pre.r3954.g7e9da5e95
_appname=freecad
pkgname="${_appname}-git"
pkgver=0.17pre.r3959.g0ca5ebe78
pkgrel=1
epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
@ -44,7 +45,7 @@ build() {
cd "$srcdir/$pkgname"
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
-DCMAKE_INSTALL_PREFIX:PATH="/opt/${_appname}" \
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade7/include/opencascade \
-DOCC_LIBRARY_DIR:PATH=/opt/opencascade7/lib \
-DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
@ -63,29 +64,31 @@ build() {
package() {
cd "$srcdir/$pkgname"
local bin="FreeCAD"
local bin_cmd="FreeCADCmd"
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"
ln -s "/opt/${_appname}/bin/${bin}" "$pkgdir/usr/bin/${bin}"
ln -s "/opt/${_appname}/bin/${bin_cmd}" "$pkgdir/usr/bin/${bin_cmd}"
# 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"
ln -s "/opt/${_appname}/bin/${bin}" "$pkgdir/usr/bin/${bin,,}"
ln -s "/opt/${_appname}/bin/${bin_cmd}" "$pkgdir/usr/bin/${bin_cmd,,}"
# Install pixmaps and desktop shortcut.
for i in 16 32 48 64; do
install -Dm644 "src/Gui/Icons/freecad-icon-${i}.png" \
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/freecad.png"
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/${_appname}.png"
done
install -Dm644 "src/Gui/Icons/freecad.svg" \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/freecad.svg"
"$pkgdir/usr/share/icons/hicolor/scalable/apps/${_appname}.svg"
desktop-file-install \
--dir="$pkgdir/usr/share/applications" "$srcdir/freecad.desktop"
--dir="$pkgdir/usr/share/applications" "$srcdir/${_appname}.desktop"
# Install mime info.
install -D -m644 "$srcdir/freecad.xml" \
"$pkgdir/usr/share/mime/packages/freecad.xml"
install -D -m644 "$srcdir/${_appname}.xml" \
"$pkgdir/usr/share/mime/packages/${_appname}.xml"
}