summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 391e0cf3f476a5ec7a5b90cd783936b2f6ddc619 (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
# Maintainer: someoneelse <lllusion3418@gmail.com>

pkgname=fstl
pkgver=0.11.0
pkgrel=1
pkgdesc="A viewer for .stl files"
url="http://www.mattkeeter.com/projects/fstl/"
arch=('x86_64')
license=('MIT')
depends=('qt5-base')
makedepends=("icoutils" "cmake")
source=("https://github.com/mkeeter/fstl/archive/v${pkgver}.tar.gz"
	"fstl.desktop")
sha256sums=('ec1334fa26574b4e8ef28c5cbee461b89c805b5b2616eae4e4236f0b293ad845'
	'53d2a7911cacc1ca8e9fe823e8ecf2777c1158f51d2b909ebb106d976c70bec5')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	cmake -B build \
		-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
		-DCMAKE_BUILD_TYPE='None' \
		-DCMAKE_INSTALL_PREFIX='/usr' \
		-Wno-dev
	cmake --build build

	sed -n '/Copyright/,/PROVIDED/p' README.md >LICENSE

	pushd "exe"
	icotool --extract --index=6 --output=../fstl.png fstl.ico
	popd
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	DESTDIR="$pkgdir" cmake --install build

	install -D -m644 fstl.png "${pkgdir}/usr/share/pixmaps/fstl.png"

	install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -D -m644 "${srcdir}/fstl.desktop" "${pkgdir}/usr/share/applications/fstl.desktop"

}