APKBUILD 1.44 KB
Newer Older
Leo's avatar
Leo committed
1
2
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
Paul Bredbury's avatar
Paul Bredbury committed
3
pkgname=flameshot
alice's avatar
alice committed
4
pkgver=12.0.0
Leo's avatar
Leo committed
5
pkgrel=0
Paul Bredbury's avatar
Paul Bredbury committed
6
pkgdesc="Featureful screenshot app"
Leo's avatar
Leo committed
7
options="!check" # No test suite
Paul Bredbury's avatar
Paul Bredbury committed
8
9
10
11
url="https://github.com/lupoDharkael/flameshot"
arch="all"
license="GPL-3.0-or-later"
depends="qt5-qtsvg"
alice's avatar
alice committed
12
13
14
15
16
17
18
makedepends="
	cmake
	kguiaddons-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	samurai
	"
19
20
21
22
23
24
25
subpackages="
	$pkgname-lang
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	$pkgname-doc
	"
alice's avatar
alice committed
26
source="$pkgname-$pkgver.tar.gz::https://github.com/lupoDharkael/flameshot/archive/v$pkgver.tar.gz"
Paul Bredbury's avatar
Paul Bredbury committed
27
28
langdir="/usr/share/flameshot/translations"

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

Leo's avatar
Leo committed
32
33
34
35
build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
36
	cmake -B build -G Ninja \
Leo's avatar
Leo committed
37
		-DCMAKE_INSTALL_PREFIX=/usr \
38
		-DCMAKE_BUILD_TYPE=MinSizeRel \
alice's avatar
alice committed
39
40
		-DUSE_WAYLAND_CLIPBOARD=ON \
		-DENABLE_CACHE=OFF \
Leo's avatar
Leo committed
41
		$CMAKE_CROSSOPTS
42
	cmake --build build
Paul Bredbury's avatar
Paul Bredbury committed
43
44
45
}

package() {
alice's avatar
alice committed
46
47
48
49
50
51
52
	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
Paul Bredbury's avatar
Paul Bredbury committed
53
}
Leo's avatar
Leo committed
54

55
sha512sums="
alice's avatar
alice committed
56
8a7d0878ff57f9c3fcb12791c33f2c11de08b057a68bb50684dd9195fbba8557e71236bc4f8a5f50062af021ed970d5b4362fc2bfdc90415143d7597c3df50f0  flameshot-12.0.0.tar.gz
57
"