summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f0cbadfd59ebdc4433118612d19ab91f97862e2 (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
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
# Maintainer: Pellegrino Prevete <pellegrinoprevete@gmail.com>
# Contributor: lubosz <lubosz@gmail.com>
# Contributor: Kevin Majewski <kevin.majewski02@gmail.com>

# shellcheck disable=SC2034
_pkgbase=nautilus
pkgbase="${_pkgbase}-git"
pkgname=(
  "${pkgbase}"
  'libnautilus-extension-git')
pkgver=43.0+11+g992ff6204
pkgrel=2
pkgdesc="Default file manager for GNOME"
url="https://wiki.gnome.org/Apps/Files"
arch=(x86_64)
license=(GPL)
depends=(
  'libgexiv2'
  'gnome-desktop-4'
  'gvfs'
  'dconf'
  'tracker3'
  'tracker3-miners'
  'gnome-autoar'
  'gst-plugins-base-libs'
  'libportal-gtk4')
makedepends=(
  'cmake'
  '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')

# shellcheck disable=SC2154
prepare() {
  cd "${_pkgbase}" || exit

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

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

build() {
  local _options=()
  _options=(
    -D docs=true
    -D packagekit=false)
  arch-meson "${_pkgbase}" \
             build \
             "${_options[@]}"
  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"
}

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

# vim:set sw=2 et: