summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 925f920d586cef950941fb91a5c072814c08c077 (plain)
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
52
53
54
55
56
# $Id$
# Maintainer: Julio Campagnolo <juliocampagnolo@gmail.com>

pkgname=('armorpaint-git')
_pkgname='armorpaint'
pkgver=0.8.r1974.g5cab715
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="ArmorPaint is a software for 3D PBR texture painting"
url="https://armorpaint.org/"
license=('ZLIB')
depends=('mesa' 'alsa-lib' 'libxinerama' 'gcc-libs' 'nodejs')
makedepends=('git' 'nodejs' 'clang' 'make' 'gcc' 'gtk3' 'vulkan-headers')
provides=('armorpaint')
conflicts=('armorpaint')
source=("git+https://github.com/armory3d/armorpaint"
        "armorpaint.sh"
        "armorpaint.desktop"
        "armorpaint.png")
md5sums=(SKIP
         "728cc52bfa9e7b16390459e7a80fad16"
         "dd5d97aadd39966ff7d9dda68b5ae29a"
         "67cf4a0cb08c66c4a68c677885e8ac99")

pkgver() {
  cd ${srcdir}/${_pkgname}
  ver=$(grep -Po '(^|\s)+(public static var version =)(\s)+\"\K(([0-9|\.])+)' 'Sources/Main.hx')
  printf "%s.r%s.g%s" "$ver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd ${srcdir}/${_pkgname}
    git submodule update --init --recursive
}

build() {
    cd "$srcdir/${_pkgname}"
    node armorcore/make -g opengl
    cd armorcore
    node Kinc/make -g opengl --compiler clang --compile
    cd Deployment
    strip Krom
}

package() {
	cd "$srcdir"/"$_pkgname"
	mkdir -p ${pkgdir}/usr/{bin,share,lib}
	mkdir -p ${pkgdir}/usr/lib/armorpaint
	install -Dm755 ${srcdir}/armorpaint.sh ${pkgdir}/usr/bin/armorpaint
	install -Dm644 LICENSE.md ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
	install -Dm755 armorcore/Deployment/Krom ${pkgdir}/usr/lib/armorpaint/
	install -Dm644 ${srcdir}/armorpaint.desktop ${pkgdir}/usr/share/applications/armorpaint.desktop
	mkdir -p ${pkgdir}/usr/share/armorpaint
	cp -r build/krom ${pkgdir}/usr/share/armorpaint/krom
	install -Dm644 ${srcdir}/armorpaint.png ${pkgdir}/usr/share/icons/armorpaint.png
}