forked from leozide/leocad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
52 lines (49 loc) · 1.94 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Peter Bartfai <pbartfai[at]stardust[dot]hu>
pkgname=leocad
pkgver=18.02
pkgrel=1
pkgdesc="LeoCAD is a CAD program for creating virtual LEGO models."
url="http://leocad.org"
arch=('x86_64' 'i686')
license=('GPL')
#Qt4.x
depends=('qt4' 'libpng' 'libjpeg-turbo' 'mesa-libgl')
#Qt5.x
#depends=('qt5-base' 'qt5-tools' 'qt5-gamepad' 'libpng' 'libjpeg-turbo' 'mesa-libgl')
makedepends=('glu' 'ca-certificates')
conflicts=()
replaces=()
backup=()
source=("leocad-git.tar.gz")
md5sums=(SKIP)
build() {
cd ${srcdir}/leocad-git
if test "$CARCH" == x86_64; then
PLATFORM=linux-g++-64
else
PLATFORM=linux-g++-32
fi
if [ -x /usr/bin/qmake ] ; then qmake -spec $PLATFORM DISABLE_UPDATE_CHECK=1 LDRAW_LIBRARY_PATH=/usr/share/ldraw ; lrelease leocad.pro ;
elif [ -x /usr/bin/qmake-qt4 ] ; then qmake-qt4 -spec $PLATFORM DISABLE_UPDATE_CHECK=1 LDRAW_LIBRARY_PATH=/usr/share/ldraw ; lrelease-qt4 leocad.pro ;
elif [ -x /usr/bin/qmake-qt5 ] ; then qmake-qt5 -spec $PLATFORM DISABLE_UPDATE_CHECK=1 LDRAW_LIBRARY_PATH=/usr/share/ldraw ; lrelease-qt5 leocad.pro ; fi
make
}
package() {
cd "${srcdir}/leocad-git"
mkdir -p ${pkgdir}/usr/bin
mkdir -p ${pkgdir}/usr/share/leocad
install -m 755 build/release/leocad ${pkgdir}/usr/bin
install -m 644 docs/README.txt ${pkgdir}/usr/share/leocad/README.txt
install -m 644 docs/CREDITS.txt ${pkgdir}/usr/share/leocad/CREDITS.txt
install -m 644 docs/COPYING.txt ${pkgdir}/usr/share/leocad/COPYING.txt
mkdir -p ${pkgdir}/usr/share/mime/packages/
mkdir -p ${pkgdir}/usr/share/applications/
mkdir -p ${pkgdir}/usr/share/icons/hicolor/scalable/mimetypes
install -m 644 qt/leocad.xml \
${pkgdir}/usr/share/mime/packages/leocad.xml
install -m 644 qt/leocad.desktop \
${pkgdir}/usr/share/applications/leocad.desktop
install -m 644 resources/application-vnd.leocad.svg \
${pkgdir}/usr/share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg
make INSTALL_ROOT="${pkgdir}" install
}