mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
56 lines
2.1 KiB
Bash
56 lines
2.1 KiB
Bash
pkgname=librecad
|
|
pkgver=2.1.1
|
|
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' 'librsvg')
|
|
conflicts=('librecad-git')
|
|
replaces=('librecad-svn' 'caduntu' 'caduntu-svn')
|
|
install=librecad.install
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/LibreCAD/LibreCAD/archive/${pkgver}.tar.gz")
|
|
sha256sums=('6b8ae6c98c6abed46ce7be92c82bfdfe10499a01cfcf6857fdc4f4f56fda5b8c')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/LibreCAD-${pkgver}"
|
|
|
|
# fix version string
|
|
sed -i "/^SCMREVISION/c SCMREVISION=\"${pkgver}\"" librecad/src/src.pro
|
|
}
|
|
|
|
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/"
|
|
}
|