aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kooha/APKBUILD
blob: 5ce1691cbb16cf059f38b43c419e40b93288d16d (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=kooha
pkgver=2.0.1
pkgrel=1
pkgdesc="Elegantly record your screen"
url="https://github.com/SeaDve/Kooha"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # blocked by rust/cargo
license="GPL-3.0-or-later"
depends="
	gst-plugin-pipewire
	gst-plugins-good
	pipewire
	xdg-desktop-portal
	"
makedepends="
	cargo
	gettext-dev
	glib-dev
	gst-plugins-base-dev
	gstreamer-dev
	gstreamer-vaapi
	gtk4.0-dev
	libadwaita-dev
	meson
	pulseaudio-dev
	wayland-dev
	x264-dev
	"
checkdepends="
	cmd:desktop-file-validate
	"
subpackages="$pkgname-lang $pkgname-mp4"
source="https://github.com/SeaDve/Kooha/releases/download/v$pkgver/kooha-$pkgver.tar.xz"

prepare() {
	default_prepare

	# Optimize binary for size (but don't use panic=abort here).
	cat >> Cargo.toml <<-EOF

		[profile.release]
		codegen-units = 1
		lto = true
		opt-level = "s"
	EOF
}

build() {
	abuild-meson -Db_lto=true . output
	meson compile -j ${JOBS:-0} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

mp4() {
	pkgdesc="Kooha dependencies for recording into MP4 format"
	depends="$pkgname=$pkgver-r$pkgrel gst-plugins-ugly"

	mkdir -p "$subpkgdir"
}

sha512sums="
230d3c9547f586393568772d346dc384c2f9f242c936e86edaa0237f762df409173da2ec10a8ceea7490d944199d63e88eaef1c717632e8dccde66062a7e4fd7  kooha-2.0.1.tar.xz
"