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

pkgsubn=darkreader
pkgname=chromium-extension-dark-reader-git
pkgver=r1154.39f4b6a
pkgrel=2
pkgdesc="Chrome/Chromium extension for Dark Reader - git/dev"
arch=('any')
url='https://github.com/darkreader/darkreader'
license=('MIT')
makedepends=(git nodejs npm unzip)
source=("git+https://github.com/darkreader/darkreader.git")
sha512sums=('SKIP')

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() {
	cd "${srcdir}/${pkgsubn}"
	npm install --cache "${srcdir}/npm-cache"
	npm run release
	mkdir chrome
	unzip "*build*.zip" -d chrome
}
package() {
	 mkdir -p "${pkgdir}/usr/share/${pkgname}"
	 shopt -s dotglob
	 cp -dr --no-preserve=ownership "${srcdir}/${pkgsubn}/chrome"/* "${pkgdir}/usr/share/${pkgname}"
}