archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gvfs / trunk / PKGBUILD
blobf1257347f27de96359ed080ab833c4a24ed491f7
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
4 pkgbase=gvfs
5 pkgname=(gvfs gvfs-{smb,afc,gphoto2,goa,mtp,nfs,google})
6 pkgver=1.50.2
7 pkgrel=1
8 pkgdesc="Virtual filesystem implementation for GIO"
9 url="https://wiki.gnome.org/Projects/gvfs"
10 arch=(x86_64)
11 license=(LGPL)
12 depends=(avahi dconf fuse3 libarchive libcdio-paranoia libsoup3 udisks2
13          libsecret libbluray libgudev gcr psmisc gsettings-desktop-schemas)
14 makedepends=(dbus libgphoto2 libimobiledevice smbclient docbook-xsl gtk3 libmtp
15              gnome-online-accounts libnfs libgdata git gtk-doc python meson
16              openssh)
17 groups=(gnome)
18 options=(debug)
19 _commit=781bf205e96f1f214db9f185b8533d9afd4de0aa  # tags/1.50.2^0
20 source=("git+https://gitlab.gnome.org/GNOME/gvfs.git#commit=$_commit"
21         gvfsd.hook)
22 sha256sums=('SKIP'
23             'd3b714db35b2ce75d7f6d528044554decbb9149a98425aff119a071ca0a25282')
25 pkgver() {
26   cd gvfs
27   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
30 prepare() {
31   cd gvfs
34 build() {
35   arch-meson gvfs build -D man=true
36   meson compile -C build
39 check() {
40   meson test -C build --print-errorlogs
43 _pick() {
44   local p="$1" f d; shift
45   for f; do
46     d="$srcdir/$p/${f#$pkgdir/}"
47     mkdir -p "$(dirname "$d")"
48     mv "$f" "$d"
49     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
50   done
53 package_gvfs() {
54   replaces=(gvfs-{obexftp,afp})
55   optdepends=('gvfs-afc: AFC (mobile devices) support'
56               'gvfs-smb: SMB/CIFS (Windows client) support'
57               'gvfs-gphoto2: gphoto2 (PTP camera/MTP media player) support'
58               'gvfs-mtp: MTP device support'
59               'gvfs-goa: gnome-online-accounts (e.g. OwnCloud) support'
60               'gvfs-nfs: NFS support'
61               'gvfs-google: Google Drive support'
62               'gtk3: Recent files support')
64   meson install -C build --destdir "$pkgdir"
66   ( cd "$pkgdir"
68     _pick smb \
69       usr/lib/gvfsd-smb{,-browse} \
70       usr/share/GConf/gsettings/gvfs-smb.convert \
71       usr/share/glib-2.0/schemas/org.gnome.system.smb.gschema.xml \
72       usr/share/gvfs/mounts/smb{,-browse}.mount
74     _pick afc \
75       usr/lib/gvfs{-afc-volume-monitor,d-afc} \
76       usr/lib/systemd/user/gvfs-afc-volume-monitor.service \
77       usr/share/dbus-1/services/org.gtk.vfs.AfcVolumeMonitor.service \
78       usr/share/gvfs/mounts/afc.mount \
79       usr/share/gvfs/remote-volume-monitors/afc.monitor
81     _pick gphoto2 \
82       usr/lib/gvfs{-gphoto2-volume-monitor,d-gphoto2} \
83       usr/lib/systemd/user/gvfs-gphoto2-volume-monitor.service \
84       usr/share/dbus-1/services/org.gtk.vfs.GPhoto2VolumeMonitor.service \
85       usr/share/gvfs/mounts/gphoto2.mount \
86       usr/share/gvfs/remote-volume-monitors/gphoto2.monitor
88     _pick mtp \
89       usr/lib/gvfs{-mtp-volume-monitor,d-mtp} \
90       usr/lib/systemd/user/gvfs-mtp-volume-monitor.service \
91       usr/share/dbus-1/services/org.gtk.vfs.MTPVolumeMonitor.service \
92       usr/share/gvfs/mounts/mtp.mount \
93       usr/share/gvfs/remote-volume-monitors/mtp.monitor
95     _pick goa \
96       usr/lib/gvfs-goa-volume-monitor \
97       usr/lib/systemd/user/gvfs-goa-volume-monitor.service \
98       usr/share/dbus-1/services/org.gtk.vfs.GoaVolumeMonitor.service \
99       usr/share/gvfs/remote-volume-monitors/goa.monitor
101     _pick nfs \
102       usr/lib/gvfsd-nfs \
103       usr/share/gvfs/mounts/nfs.mount
105     _pick google \
106       usr/lib/gvfsd-google \
107       usr/share/gvfs/mounts/google.mount
109     install -d -o root -g 102 -m 750 usr/share/polkit-1/rules.d
110   )
112   install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
115 package_gvfs-smb() {
116   pkgdesc+=" (SMB/CIFS backend; Windows client)"
117   depends=("gvfs=$pkgver" 'smbclient>=4.12.0')
119   mv smb/* "$pkgdir"
122 package_gvfs-afc() {
123   pkgdesc+=" (AFC backend; Apple mobile devices)"
124   depends=("gvfs=$pkgver" libimobiledevice usbmuxd)
126   mv afc/* "$pkgdir"
129 package_gvfs-gphoto2() {
130   pkgdesc+=" (gphoto2 backend; PTP camera, MTP media player)"
131   depends=("gvfs=$pkgver" libgphoto2)
133   mv gphoto2/* "$pkgdir"
136 package_gvfs-mtp() {
137   pkgdesc+=" (MTP backend; Android, media player)"
138   depends=("gvfs=$pkgver" libmtp)
140   mv mtp/* "$pkgdir"
143 package_gvfs-goa() {
144   pkgdesc+=" (Gnome Online Accounts backend; cloud storage)"
145   depends=("gvfs=$pkgver" gnome-online-accounts)
147   mv goa/* "$pkgdir"
150 package_gvfs-nfs() {
151   pkgdesc+=" (NFS backend)"
152   depends=("gvfs=$pkgver" libnfs)
153   install=gvfs-nfs.install
155   mv nfs/* "$pkgdir"
158 package_gvfs-google() {
159   pkgdesc+=" (Google Drive backend)"
160   depends=("gvfs-goa=$pkgver" libgdata)
162   mv google/* "$pkgdir"
165 # vim:set sw=2 et: