blob: 689424c8ed83ffe0b377892a8ca3efb43465f1da (
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=v4.9.52.r91.g7e0e7fc5e
pkgrel=1
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 build
mkdir chrome
unzip "${srcdir}/darkreader/build/release/darkreader-chrome.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}"
}
|