void-packages/srcpkgs/LibreCAD/template

61 lines
2.0 KiB
Bash

# Template file for 'LibreCAD'
pkgname=LibreCAD
version=2.2.0.2
revision=1
build_style=qmake
hostmakedepends="qt5-qmake pkg-config ImageMagick qt5-host-tools"
makedepends="qt5-devel qt5-svg-devel boost-devel muparser-devel librsvg-devel"
short_desc="2D Computer-aided design (CAD) software"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://librecad.org"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
checksum=fcb888a550f1f515ef6a2f7af2dd02605dd5c6da8a23f6c3a52479f8532ac109
if [ -n "$CROSS_BUILD" ]; then
configure_args+=" BOOST_DIR=${XBPS_CROSS_BASE}/usr"
fi
do_install() {
vbin unix/librecad
vbin unix/ttf2lff
vman tools/ttf2lff/ttf2lff.1
vinstall desktop/librecad.desktop 0644 usr/share/applications/
vinstall desktop/librecad.sharedmimeinfo 0644 usr/share/mime/packages/ librecad.xml
# install documentation
vdoc librecad/support/doc/README
vdoc librecad/support/doc/index.html
vdoc librecad/support/doc/style.css
vmkdir librecad/support/doc/img
vinstall librecad/support/doc/img/librecadlogo.png 0644 \
usr/share/doc/${pkgname}/img/
# install icons
for size in 16 24 32 48 64 96 128; do
convert -scale ${size} \
desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
librecad.png
vmkdir usr/share/icons/hicolor/${size}x${size}/apps
vcopy librecad.png usr/share/icons/hicolor/${size}x${size}/apps/
done
cp desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg librecad.svg
vmkdir usr/share/icons/hicolor/scalable/apps
vcopy librecad.svg usr/share/icons/hicolor/scalable/apps
# install resources
vmkdir usr/share/librecad
for resource in fonts library patterns qm; do
vcopy unix/resources/${resource} usr/share/librecad/
done
# install plugins
vmkdir usr/share/librecad/plugins
vcopy unix/resources/plugins usr/lib/librecad/
for plugin in $DESTDIR/usr/lib/librecad/*.so ; do
ln -sf ../../../lib/librecad/$(basename $plugin) ${DESTDIR}/usr/share/librecad/plugins/$(basename $plugin)
done
}