summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad426d78fcebd7b889b9cfd8ea885679f6561e78 (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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# SPDX-License-Identifier: AGPL-3.0
#
# Maintainer:  Pellegrino Prevete <cGVsbGVncmlub3ByZXZldGVAZ21haWwuY29tCg== | base -d>
# Maintainer:  Truocolo <truocolo@aol.com>
# Contributor: Ricardo Liang (rliang) <ricardoliang@gmail.com>
# Contributor: Marcell Meszaros (MarsSeed) <marcell.meszaros@runbox.eu>

# shellcheck disable=SC2034
_py="python"
_proj="gnome"
_ns="GNOME"
_pkgname="${_proj}-control-center"
pkgname="${_pkgname}-git"
pkgver=43.0.r11.g997a09e1a
pkgrel=1
pkgdesc="GNOME's main interface to configure various aspects of the desktop"
url="https://gitlab.${_proj}.org/${_ns}/${_pkgname}"
license=(
  GPL2
)
arch=(
  'arm'
  'aarch64'
  'armv7h'
  'x86_64'
  'i686'
  'pentium4'
  'powerpc'
)
provides=(
  "${_pkgname}=${pkgver}"
)
conflicts=(
  "${_pkgname}"
)
depends=(
  accountsservice
  bolt
  colord-gtk4
  cups-pk-helper
  "${_proj}-bluetooth-git"
  "${_proj}-color-manager"
  "${_proj}-desktop-4-git"
  "${_proj}-online-accounts"
  "${_proj}-settings-daemon"
  "gsettings-desktop-schemas-git"
  gsound
  gtk4
  "lib${_proj}kbd"
  libgtop
  libgudev
  libhandy
  libibus
  libnma-git
  libpwquality
  libmm-glib
  nm-connection-editor
  smbclient
  sound-theme-freedesktop
  udisks2
  upower
)
makedepends=(
  docbook-xsl
  git
  modemmanager
  meson
  "${_py}"
)
checkdepends=(
  "${_py}-dbusmock"
  "${_py}-gobject"
  xorg-server-xvfb
)
optdepends=(
  'system-config-printer: Printer settings'
  "${_proj}-user-share: WebDAV file sharing"
  "${_proj}-remote-desktop: screen sharing"
  'rygel: media sharing'
  'openssh: remote login'
  'power-profiles-daemon: Power profiles support'
)
groups=(
  "${_proj}"
)
source=(
  "${_pkgname}::git+${url}.git"
  "git+https://gitlab.${_proj}.org/${_ns}/lib${_proj}-volume-control.git"
)
sha256sums=(
  'SKIP'
  'SKIP'
)

_parse_ver() {
  local \
    _pkgver="${1}" \
    _out="" \
    _ver \
    _rev \
    _commit
  _ver="$( \
    echo \
      "${_pkgver}" | \
          awk \
            -F '+' \
            '{print $1}')"
  _rev="$( \
    echo \
      "${_pkgver}" | \
          awk \
            -F '+' \
            '{print $2}')"
  _commit="$( \
    echo \
      "${_pkgver}" | \
          awk \
            -F '+' \
            '{print $3}')"
  _out=${_ver}
  if [[ "${_rev}" != "" ]]; then
    _out+=".r${_rev}"
  fi
  if [[ "${_commit}" != "" ]]; then
    _out+=".${_commit}"
  fi
  echo \
    "${_out}"
}

pkgver() {
  local \
    _pkgver
  cd \
    "${_pkgname}" || \
    exit
  _pkgver="$( \
    git \
      describe \
      --tags | \
        sed \
          's/^GNOME_CONTROL_CENTER_//;s/_/./g;s/-/+/g')"
  _parse_ver \
    "${_pkgver}"
}

# shellcheck disable=SC2154
prepare() {
  cd \
    "${_pkgname}" || \
    exit
  # Install bare logos into pixmaps, not icons
  sed \
    -i \
    "/install_dir/s/'icons'/'pixmaps'/" \
    panels/info-overview/meson.build
  git \
    submodule \
    init \
    subprojects/gvc
  git \
    submodule \
    set-url \
    subprojects/gvc \
    "${srcdir}/lib${_proj}-volume-control"
  git \
    submodule \
    update
}


build() {
  arch-meson \
    "${_pkgname}" \
    build \
    -D documentation=true
  meson \
    compile \
    -C build
}

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

# shellcheck disable=SC2154
package() {
  meson \
    install \
    -C build \
    --destdir "${pkgdir}"
  install \
    -d \
    -o root \
    -g 102 \
    -m 750 \
    "${pkgdir}/usr/share/polkit-1/rules.d"
}

# vim:set sw=2 sts=-1 et: