aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvfs/APKBUILD
blob: f161c09dc87e8054d3f5fe647b6f80bbf08beefc (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gvfs
pkgver=1.36.2
pkgrel=1
pkgdesc="Backends for the gio framework in GLib"
url="http://ftp.gnome.org/pub/gnome/sources/gvfs/${pkgver%.*}/"
arch="all"
license="GPL"
depends=""
options="!check"  # no tests available
triggers="$pkgname.trigger=/usr/lib/gvfs"
makedepends="intltool fuse-dev libgudev-dev expat-dev samba-dev
	libsoup-dev avahi-dev libarchive-dev udisks2-dev libgphoto2-dev
	libcdio-paranoia-dev libgcrypt-dev libxslt-dev docbook-xsl
	libmtp-dev gcr-dev libcap-dev libsecret-dev libnfs-dev meson ninja
	openssh-client"
subpackages="$pkgname-dev $pkgname-lang
	$pkgname-afp
	$pkgname-archive
	$pkgname-avahi
	$pkgname-cdda
	$pkgname-dav
	$pkgname-fuse
	$pkgname-gphoto2
	$pkgname-mtp
	$pkgname-nfs
	$pkgname-smb
	"
source="https://download.gnome.org/sources/gvfs/${pkgver%.*}/gvfs-$pkgver.tar.xz
	CVE-2019-12448.patch
	CVE-2019-12795.patch
	CVE-2019-12449.patch
	CVE-2019-12447.patch
	"

# secfixes:
#   1.36.2-r1:
#     - CVE-2019-12447
#     - CVE-2019-12448
#     - CVE-2019-12795
#     - CVE-2019-12449

builddir="$srcdir/$pkgname-$pkgver"
build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
	meson \
		--buildtype=release \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/gvfs \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		-Dafc=false \
		-Dbluray=false \
		-Dgdu=false \
		-Dgoa=false \
		-Dgoogle=false \
		-Dhttp=true \
		-Dlibmtp=true \
		-Dlogind=false \
		-Dsmb=true \
		-Dsystemduserunitdir=no \
		-Dtmpfilesdir=no \
		..
	# workaround parallel build issue
	ninja common/gvfsdbus.h

	ninja
}

package() {
	cd "$builddir"/build
	DESTDIR="$pkgdir" ninja install
}

_mv_files() {
	local i
	for i in "$@"; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv "$pkgdir"/$i "$subpkgdir"/$i
	done
}

fuse() {
	pkgdesc="FUSE support for gvfs"
	cd "$pkgdir"
	_mv_files usr/lib/gvfs/gvfsd-fuse
}

smb() {
	pkgdesc="Windows fileshare support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfsd-smb* \
		usr/share/gvfs/mounts/smb* \
		usr/share/glib-*/schemas/org.gnome.system.smb.gschema.xml \
		usr/share/GConf/gsettings/gvfs-smb.convert
}

mtp() {
	pkgdesc="MTP support for gvfs"
	cd "$pkgdir"
	_mv_files usr/lib/gvfs/gvfsd-mtp
}

archive() {
	pkgdesc="Archiving support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfsd-archive* \
		usr/share/gvfs/mounts/archive*
}

obexftp() {
	pkgdesc="ObexFTP support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfsd-obex* \
		usr/share/gvfs/mounts/obex*
}

gphoto2() {
	pkgdesc="gphoto2 support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfs*gphoto* \
		usr/share/gvfs/*/gphoto* \
		usr/share/dbus*/services/*GPhoto*
}

afp() {
	pkgdesc="AFP support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfs*afp* \
		usr/share/gvfs/*/afp*
}

avahi() {
	pkgdesc="DNS-SD support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/lib/gvfs/gvfs*dns* \
		usr/share/gvfs/mounts/dns-sd.mount \
		usr/share/glib-*/schemas/org.gnome.system.dns_sd.gschema.xml \
		usr/share/GConf/gsettings/gvfs-dns-sd.convert
}

cdda() {
	pkgdesc="CDDA support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/share/gvfs/mounts/cdda.mount \
		usr/lib/gvfs/gvfsd-cdda
}

dav() {
	pkgdesc="WebDAV support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/share/gvfs/mounts/dav.mount \
		usr/share/gvfs/mounts/dav+sd.mount \
		usr/lib/gvfs/gvfsd-dav
}

nfs() {
	pkgdesc="NFS support for gvfs"
	cd "$pkgdir"
	_mv_files \
		usr/share/gvfs/mounts/nfs.mount \
		usr/lib/gvfs/gvfsd-nfs
}

sha512sums="c5ffc3d36ad1f438c245877d94924aa22c4edf9d89be0a990ad03897d462459229e576064797e53a62063f4aaf91ad30870f0b57df3731a69951f4ceb61db0db  gvfs-1.36.2.tar.xz
a4daaf8e7f6ece24fd0fdbe0ca4cfa5a5d36189249c36779a09f6ab9033b0fcd1db47d1aaa0b5dd4b14c444cc3763d9e25e0580fb2e2021aa42bc5e6d1eef1ec  CVE-2019-12448.patch
4d381da1e164c1205a4fea19b235163e22c8d1d65ea7ffb130df9c8c76395f20c4b5879111e4ba6d4f54cadbfb084b8c82434ab698e39e6ab2d1e5e0b5ab93ac  CVE-2019-12795.patch
15c7c46f74049b539ae5d76d03f22b7efda39f0424b13582afca1e82ca90a03bb372ef8c42afdd21f257a46aae8c6c709715bdd76cb5aa4fdf13e4c1f58fa012  CVE-2019-12449.patch
02c4e94d8eef1f69b6d45ddbbbfa22ff9452238251c8bd3b8ae5cbbdc3a7c1fcde4612f96851dfff55f276bcf84f5b82561b06a18c1d9e20033457e72987013d  CVE-2019-12447.patch"