summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 27b6c1c24baedbf92f0327ad2ba8b93d144886af (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
# Maintainer: Michael Picht <mipi@fsfe.org>
pkgdesc="Gnome: Organize the items of the top (menu)bar"
_pkgname="top-bar-organizer"
pkgname="gnome-shell-extension-${_pkgname}"
pkgver=10
pkgrel=3
arch=(any)
url="https://gitlab.gnome.org/julianschacher/top-bar-organizer"
license=(GPL3)
source=("https://gitlab.gnome.org/julianschacher/${_pkgname}/-/archive/v${pkgver}/${_pkgname}-v${pkgver}.tar.gz")
md5sums=('e8673e5e212410127e6a437744bef22a')
makedepends=(
  git
  glib2
)
depends=(
  "gnome-shell>=1:45.0"
)
options=(
  !debug
)
build() {
  cd "${_pkgname}-v${pkgver}" || return
  glib-compile-schemas data/
}

package() {
  cd "${_pkgname}-v${pkgver}" || return

  # Retrieve extension name from metadata file and create target directory
  _extname=$(grep -Po '(?<="uuid": ")[^"]*' src/metadata.json) 
  _destdir="${pkgdir}/usr/share/gnome-shell/extensions/${_extname}"
  mkdir -p "$_destdir"

  # Copy relevant extension files to target directory
  cp -r src/* "${_destdir}/."
  cp -r data/{css,ui} "${_destdir}/."
  mkdir "${_destdir}/schemas"
  cp data/{*.xml,gschemas.compiled} "${_destdir}/schemas/."
}