summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 017219d72cef1191d203ae965d24c9eb190e2d1a (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
# Maintainer: Tyler Anderson <unlimitedbacon@gmail.com>

pkgname=stl-thumb
pkgver=0.5.0
pkgrel=1
license=('MIT')
pkgdesc="A fast lightweight thumbnail generator for STL files"
url='https://github.com/unlimitedbacon/stl-thumb'
source=(git+https://github.com/unlimitedbacon/stl-thumb.git)
depends=('libgl')
makedepends=("rust" "git")
arch=("i386" "x86_64")
sha256sums=('SKIP')

build() {
	cd "${srcdir}/${pkgname}"

	git checkout tags/v${pkgver}
	
	# Remove cargo config
	# This file has gcc paths specifically for building on Debian/ARM
	# Removing it allows this package to build on Arch Linux Arm
	rm .cargo/config

	cargo build --release
}

package() {
	cd "${srcdir}/${pkgname}"

	install -Dm755 target/release/stl-thumb       "${pkgdir}/usr/bin/stl-thumb"
	install -Dm755 target/release/libstl_thumb.so "${pkgdir}/usr/lib/libstl_thumb.so"
	install -Dm644 target/release/libstl_thumb.a  "${pkgdir}/usr/lib/libstl_thumb.a"
	install -Dm644 stl-thumb.thumbnailer          "${pkgdir}/usr/share/thumbnailers/stl-thumb.thumbnailer"
	install -Dm644 libstl_thumb.h                 "${pkgdir}/usr/include/libstl_thumb.h"
}