aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flameshot/APKBUILD
blob: 667f86ef3497d18b544d9167b3358e9b0dd13bf5 (plain) (blame)
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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=flameshot
pkgver=11.0.0
pkgrel=0
pkgdesc="Featureful screenshot app"
options="!check" # No test suite
url="https://github.com/lupoDharkael/flameshot"
arch="all"
license="GPL-3.0-or-later"
depends="qt5-qtsvg"
makedepends="cmake qt5-qtsvg-dev qt5-qttools-dev samurai"
subpackages="
	$pkgname-lang
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	$pkgname-doc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/lupoDharkael/flameshot/archive/v$pkgver.tar.gz"
langdir="/usr/share/flameshot/translations"

# XXX: Temporarily allow textrels on riscv64.
[ "$CARCH" = "riscv64" ] && options="$options textrels"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		$CMAKE_CROSSOPTS
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	mkdir -p "$pkgdir"/usr/share/fish/completions
	mv "$pkgdir"/usr/share/fish/vendor_completions.d/flameshot.fish \
		"$pkgdir"/usr/share/fish/completions

	rmdir "$pkgdir"/usr/share/fish/vendor_completions.d
}

sha512sums="
de13f3c5bc18f164c6e37c0b3f42c8693d3ebfaba5f3d54360899df6479390e2a0c38970fa2595c9293304b4e52ca2198477f4f317abcb11df4c30a24ab1909f  flameshot-11.0.0.tar.gz
"