mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
62 lines
2.3 KiB
Bash
62 lines
2.3 KiB
Bash
# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
|
|
# Contributions from AUR: https://aur.archlinux.org/packages/librecad/
|
|
|
|
pkgname=librecad
|
|
pkgver=2.0.3
|
|
pkgrel=1
|
|
pkgdesc="A 2D CAD drawing tool based on the community edition of QCad"
|
|
arch=('x86_64')
|
|
url="http://www.librecad.org/"
|
|
license=('GPL')
|
|
depends=('qt5-base' 'qt5-svg' 'qt5-tools' 'libxcb' 'muparser')
|
|
makedepends=('boost' 'imagemagick')
|
|
conflicts=('librecad-git')
|
|
replaces=('librecad-svn' 'caduntu' 'caduntu-svn')
|
|
install=librecad.install
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://codeload.github.com/LibreCAD/LibreCAD/tar.gz/${pkgver}")
|
|
sha256sums=('e6a24b8b9bdfe9916c6d404d94e43e91aeeaa17d1a4f7a080afe7479105715c6')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/LibreCAD-${pkgver}"
|
|
|
|
# fix version string
|
|
sed -i "/^SCMREVISION/c SCMREVISION=\"${pkgver}\"" librecad/src/src.pro
|
|
|
|
# fix qcollectiongenerator name
|
|
sed -i 's/qcollectiongenerator/qcollectiongenerator-qt5/g' scripts/postprocess-unix.sh
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/LibreCAD-${pkgver}"
|
|
|
|
export CPPFLAGS="-std=c++0x"
|
|
qmake-qt5 librecad.pro
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/LibreCAD-${pkgver}"
|
|
|
|
install -D -m 755 unix/librecad "${pkgdir}/usr/bin/librecad"
|
|
install -D -m 755 unix/ttf2lff "${pkgdir}/usr/bin/ttf2lff"
|
|
|
|
install -D -m 644 desktop/librecad.desktop "${pkgdir}/usr/share/applications/librecad.desktop"
|
|
install -D -m 644 desktop/librecad.1 "${pkgdir}/usr/share/man/man1/librecad.1"
|
|
|
|
install -D -m0644 librecad/support/doc/README "${pkgdir}/usr/share/doc/librecad/index.README"
|
|
install -D -m0644 librecad/support/doc/index.html "${pkgdir}/usr/share/doc/librecad/index.html"
|
|
install -D -m0644 librecad/support/doc/style.css "${pkgdir}/usr/share/doc/librecad/style.css"
|
|
install -D -m0644 librecad/support/doc/img/librecadlogo.png "${pkgdir}/usr/share/doc/librecad/img/librecadlogo.png"
|
|
|
|
for SIZE in 16 24 32 48 64 96 128; do
|
|
convert -scale ${SIZE} \
|
|
desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
|
|
${srcdir}/librecad.png
|
|
install -D -m 644 ${srcdir}/librecad.png "${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/librecad.png"
|
|
done
|
|
install -D -m 644 desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/librecad.svg"
|
|
|
|
mkdir -p "${pkgdir}/usr/share/librecad/"
|
|
cp -r unix/resources/{library,patterns,fonts,qm} "${pkgdir}/usr/share/librecad/"
|
|
}
|