summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f4957bb41e4f427b95cc9b354e79e87b584bdc6 (plain)
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
pkgbase=nautilus-git
_pkgbase=nautilus
pkgname=('nautilus-git' 'libnautilus-extension-git')
pkgver=40.alpha+13+g9b733dd9d
pkgrel=1
pkgdesc="Default file manager for GNOME"
url="https://wiki.gnome.org/Apps/Files"
arch=(x86_64)
license=(GPL)
depends=('libgexiv2' 'gnome-desktop' 'gvfs' 'dconf' 'tracker3' 'tracker3-miners'
         'gnome-autoar' 'gst-plugins-base-libs')
makedepends=('gobject-introspection' 'git' 'gtk-doc' 'meson' 'appstream-glib')
checkdepends=('python-gobject')
source=("git+https://gitlab.gnome.org/GNOME/nautilus.git"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
b2sums=('SKIP'
        'SKIP')

prepare() {
  cd $_pkgbase

  git submodule init
  git submodule set-url subprojects/libgd "$srcdir/libgd"
  git submodule update
}

pkgver() {
  cd $_pkgbase
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $_pkgbase build \
    -D docs=true \
    -D packagekit=false
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

package_nautilus-git() {
  depends+=('libnautilus-extension')
  optdepends=('nautilus-sendto: Send files via mail extension')
  provides=('nautilus')
  conflicts=('nautilus')

  DESTDIR="$pkgdir" meson install -C build

### Split libnautilus-extension

  _pick libne "$pkgdir"/usr/include
  _pick libne "$pkgdir"/usr/lib/{girepository-1.0,libnautilus-extension*,pkgconfig}
  _pick libne "$pkgdir"/usr/share/{gir-1.0,gtk-doc}
}

package_libnautilus-extension-git() {
  pkgdesc="Library for extending the $pkgdesc"
  depends=('gtk3')
  provides=('libnautilus-extension' 'libnautilus-extension.so')
  conflicts=('libnautilus-extension')
  mv libne/* "$pkgdir"
}

# vim:set sw=2 et: