summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09daeee0cc5dee4d3f056569b388993fb7aec2da (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: begin-theadventure <begin-thecontact.ncncb at dralias dot com>
# Contributor: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Cookie Engineer <cookiengineer@protonmail.ch>
# Contributor: dr460nf1r3 <dr460nf1r3 at garudalinux dot org>

pkgname=librewolf-extension-darkreader
pkgver=4.9.74
pkgrel=1
pkgdesc='Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing'
url=https://github.com/darkreader/darkreader
arch=('any')
license=('MIT')
depends=('librewolf')
makedepends=('git' 'npm' 'strip-nondeterminism')
groups=('librewolf-addons')
source=("git+$url.git#tag=v$pkgver")
sha256sums=('SKIP')

prepare() {
  cd darkreader
  npm ci
}

build() {
  cd darkreader
  npm run build
  strip-nondeterminism -t zip build/release/*.xpi
}

package() {
  cd darkreader
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm644 build/release/darkreader-firefox.xpi "$pkgdir/usr/lib/librewolf/browser/extensions/addon@darkreader.org.xpi"
}