summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bd5e9b83e3166d979bf40e941d6a0255e683a695 (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
# Maintainer: SelfRef <arch@selfref.dev>
# Contributor: Christian Schendel (doppelhelix@gmail.com)

_basename=gnome-shell-extension-pano
pkgname=${_basename}-git
pkgver=23.alpha3.r4.gd0d71f8
pkgrel=1
pkgdesc="Next-gen Clipboard Manager for Gnome Shell"
arch=('any')
url="https://github.com/oae/gnome-shell-pano"
license=('GPL-2.0')
depends=(
	'gnome-shell>=45'
	'libgda6'
)
makedepends=(
	'git'
	'nvm'
	'yarn'
)
provides=("$_basename")
conflicts=("$_basename")
source=("$_basename::git+https://github.com/oae/gnome-shell-pano.git")
sha256sums=('SKIP')

_ensure_local_nvm() {
	which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
	export NVM_DIR="${srcdir}/.nvm"
	source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
}

pkgver() {
	cd "$_basename"
	git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

prepare() {
	cd "$_basename"
	_ensure_local_nvm
	nvm install 20
	yarn install --cache-folder "$srcdir/yarn-cache"
}

build() {
	cd "$_basename"
	_ensure_local_nvm
	yarn build
}

package() {
	cd "$_basename/dist"
	mkdir -p "$pkgdir/usr/share/gnome-shell/extensions/pano@elhan.io"
	cp -r * "$pkgdir/usr/share/gnome-shell/extensions/pano@elhan.io/"
}