summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyson Christoforo2020-12-05 11:34:05 +0000
committerGreyson Christoforo2020-12-05 11:34:05 +0000
commit8e815abd1940ede9d3ebcf7260b4efe44dc6f18e (patch)
tree2e3771dac5787fc23637bf479d9e6e22c42419fb
parent5f28da53eb7c87acff5a89bf34cb548f588bc8bc (diff)
downloadaur-8e815abd1940ede9d3ebcf7260b4efe44dc6f18e.tar.gz
minor cleanups
-rw-r--r--PKGBUILD43
1 files changed, 22 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 63f7ef7fa1e..d3735c606c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -55,22 +55,18 @@ pkgver() {
}
prepare() {
- cd "${srcdir}/FreeCAD"
+ cd FreeCAD
# fix a build error
#curl -L "https://github.com/FreeCAD/FreeCAD/pull/2842/commits/095984fce44931a4c8e2ace269d45a62640fbfb4.patch" | patch -p1
-}
-
-build() {
- # OpenCascade requires that /bin comes before /usr/bin in $PATH
- export PATH="/usr/bin:$PATH"
+ # OpenCascade requires that /bin comes before /usr/bin in $PATH export PATH="/usr/bin:$PATH"
mkdir -p build
cd build
- cmake -Wno-dev ../FreeCAD \
+ cmake -Wno-dev .. \
-D BUILD_QT5=ON \
-D CMAKE_BUILD_TYPE=Release \
- -D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
- -D CMAKE_CXX_FLAGS="$CXXFLAGS -fPIC -w" \
+ -D CMAKE_C_FLAGS="${CFLAGS} -fPIC -w" \
+ -D CMAKE_CXX_FLAGS="${CXXFLAGS} -fPIC -w" \
-D CMAKE_INSTALL_DATADIR="/usr/share/freecad" \
-D CMAKE_INSTALL_DOCDIR="/usr/share/freecad/doc" \
-D CMAKE_INSTALL_PREFIX="/usr/lib/freecad" \
@@ -79,38 +75,43 @@ build() {
-D FREECAD_USE_QT_FILEDIALOG=ON \
-D PYTHON_EXECUTABLE=/usr/bin/python \
-G Ninja
- ninja
+}
+
+build() {
+ cd FreeCAD
+ ninja -C build
}
package() {
- DESTDIR="$pkgdir" ninja -C build install
+ cd FreeCAD
+ DESTDIR="${pkgdir}" ninja -C build install
# Create desktop shortcut
- gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name FreeCAD \
+ gendesk -f -n --pkgname "${pkgname}" --pkgdesc "${pkgdesc}" --name FreeCAD \
--mimetypes='application/x-extension-fcstd' --startupnotify=true
# Package desktop shortcut
install -Dm644 freecad.desktop \
- "$pkgdir/usr/share/applications/freecad.desktop"
+ "${pkgdir}/usr/share/applications/freecad.desktop"
# Package MIME info
#install -Dm644 freecad.xml "$pkgdir/usr/share/mime/packages/freecad.xml"
- cd FreeCAD/src/Gui/Icons
+ cd src/Gui/Icons
# Package icons
for i in 16 32 48 64; do
install -Dm644 "freecad-icon-$i.png" \
- "$pkgdir/usr/share/icons/hicolor/${i}x$i/apps/freecad.png"
+ "${pkgdir}/usr/share/icons/hicolor/${i}x$i/apps/freecad.png"
done
install -Dm644 freecad.svg \
- "$pkgdir/usr/share/icons/hicolor/scalable/apps/freecad.svg"
+ "${pkgdir}/usr/share/icons/hicolor/scalable/apps/freecad.svg"
# Package symlinks in /usr/bin
- install -d "$pkgdir/usr/bin"
- ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/freecad"
- ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/FreeCAD"
- ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/freecadcmd"
- ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/FreeCADCmd"
+ install -d "${pkgdir}/usr/bin"
+ ln -sf /usr/lib/freecad/bin/FreeCAD "${pkgdir}/usr/bin/freecad"
+ ln -sf /usr/lib/freecad/bin/FreeCAD "${pkgdir}/usr/bin/FreeCAD"
+ ln -sf /usr/lib/freecad/bin/FreeCADCmd "${pkgdir}/usr/bin/freecadcmd"
+ ln -sf /usr/lib/freecad/bin/FreeCADCmd "${pkgdir}/usr/bin/FreeCADCmd"
}