summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 34313b1b1f4ff21ef72e3426ff9f84204d22b84a (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
#Maintainer: Zachary Jordan <zacjor at protronmail dot com>
#PKGBUILD based off https-everywhere-chrome-git from Yardena Cohen <yardenack at gmail dot com>

pkgsubn=Tab-Session-Manager
pkgname=chromium-extension-tab-session-manager-git
pkgver=6.4.0.r13.g36f06d1d
pkgrel=2
pkgdesc="Chrome/Chromium extension for Tab Session Manager - git/dev"
arch=('any')
url='https://github.com/sienori/Tab-Session-Manager'
license=('MPL2')
makedepends=(git nodejs npm unzip)
source=("git+https://github.com/sienori/Tab-Session-Manager.git"
		credentials.js)
sha256sums=('SKIP'
			'e6dfe1439052821b474c45e0fe473029c84b57f95ef9fca6db7f552e967350ee')

pkgver() {
  cd "${srcdir}/${pkgsubn}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}
build() {
	cp "credentials.js" "${srcdir}/${pkgsubn}/src/credentials.js"
	cd "${srcdir}/${pkgsubn}"
	npm install --cache "${srcdir}/npm-cache" 
	npm run build
	cd dist/
	mkdir chrome
	unzip "*chrome*.zip" -d chrome
}
package() {
	 mkdir -p "${pkgdir}/usr/share/${pkgname}"
	 shopt -s dotglob
	 cp -dr --no-preserve=ownership "${srcdir}/${pkgsubn}/dist/chrome"/* "${pkgdir}/usr/share/${pkgname}"
}