aboutsummaryrefslogtreecommitdiffstats
path: root/community/flatpak/APKBUILD
blob: f36efa26c1ff77d1241db4361f0f817692987a1f (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
72
73
74
75
76
77
78
79
80
81
82
83
84
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=flatpak
# Follows GNOME versioning, MINOR (the 2nd number) must be even.
pkgver=1.12.2
pkgrel=0
pkgdesc="Application deployment framework for desktop apps"
url="https://flatpak.org"
# mips64, s390x and riscv64 blocked by polkit
arch="all !mips64 !s390x !riscv64"
license="LGPL-2.1-or-later"
depends="bubblewrap xdg-dbus-proxy"
makedepends="glib-dev libarchive-dev libsoup-dev libcap-dev polkit-dev
	libxau-dev ostree-dev>=2018.08 fuse-dev json-glib-dev
	libgcab-dev appstream-glib-dev dconf-dev
	libseccomp-dev libxslt-dev gpgme-dev bison
	py3-parsing zstd-dev"
subpackages="
	$pkgname-dbg
	$pkgname-lang
	$pkgname-dev
	$pkgname-libs
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
install="flatpak.pre-install flatpak.pre-upgrade flatpak.post-install"
source="https://github.com/flatpak/flatpak/releases/download/$pkgver/flatpak-$pkgver.tar.xz
	modules-load.conf
	"
options="!check"  # Tests fail with no error message

# secfixes:
#   1.12.2-r0:
#     - CVE-2021-41133
#   1.10.1-r0:
#     - CVE-2021-21261
#   1.2.4-r0:
#     - CVE-2019-10063

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--sbindir=/usr/bin \
		--libexecdir=/usr/lib/$pkgname \
		--disable-static \
		--disable-documentation \
		--with-priv-mode=none \
		--with-system-bubblewrap \
		--with-system-helper-user=flatpak \
		--with-system-dbus-proxy \
		--enable-gdm-env-file \
		--with-dbus-config-dir=/usr/share/dbus-1/system.d
	make
}

check() {
	make -k check
}

package() {
	make DESTDIR="$pkgdir" install

	cd "$pkgdir"

	# Remove systemd-specific files.
	rm -rf usr/lib/systemd
	rm -rf usr/lib/sysusers.d

	# Move fish completions to directory where abuild expects it.
	mv usr/share/fish/vendor_completions.d usr/share/fish/completions

	install -Dm644 "$srcdir"/modules-load.conf usr/lib/modules-load.d/flatpak.conf
}

sha512sums="
4887fe540a821f2c8539fbe1fd89b1cc350126a6fa90c1acf070e08db0de1073406a061f5483bc7a7ef9b07f73409beb7bc02d055d4b3ae1c33ba5c318e11b6f  flatpak-1.12.2.tar.xz
57d23d2778556eafc3035e6be575bf95b4032f123b35f2b1657eff5e7496de253173edc657f90531ee58e25673f4f27a5cd1cc76b14a038edb244f104a231771  modules-load.conf
"