summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 56c40b8ae970c21ba5e9fb0cd4832c66c45d77af (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
# Maintainer: Dario Ostuni <another.code.996@gmail.com>
pkgname=astc-encoder-git
pkgver=r43.a47b80f
pkgrel=1
pkgdesc="An ASTC (Adaptive Scalable Texture Compression) encoder and decoder"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/ARM-software/astc-encoder"
license=('CUSTOM')
depends=('openexr')
makedepends=('clang')
options=()
source=("git+https://github.com/ARM-software/astc-encoder.git")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/astc-encoder"
	echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/astc-encoder/Source"
    sed -i -- 's/g++/clang++/g' Makefile
    sed -i -- 's/-msse2 -mfpmath=sse//g' Makefile
    make
    clang++ exr_to_htga.cpp $(pkg-config --cflags --libs OpenEXR) -o exr_to_htga
}

package() {
    cd "$srcdir/astc-encoder/Source"
    install -Dm755 astcenc "$pkgdir/usr/bin/astcenc"
    install -Dm755 exr_to_htga "$pkgdir/usr/bin/exr_to_htga"
    install -Dm644 ../license.txt "$pkgdir/usr/share/licenses/astc-encoder-git/LICENSE"
}