summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9dbd79c5fd477c6c617e4d1f7e5471c3200e3a73 (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: sxe <sxxe at gmx.de>

pkgname=firefox-extension-ublock-git
pkgver=r2664.8919ea1
pkgrel=1
pkgdesc='An efficient blocker for modern browsers. Fast and lean. Written from scratch. Development through benchmarking.'
url='https://github.com/chrisaljoudi/uBlock'
arch=('any')
license=('GPL')
depends=('firefox')
makedepends=('python' 'git')
source=("$pkgname::git+https://github.com/chrisaljoudi/uBlock.git")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/$pkgname"
    sh tools/make-firefox.sh
}

package() {
  cd "$srcdir/$pkgname/dist/build/uBlock.firefox"

  local version="$(grep -Pom1 '(?<=<id>).*(?=</id>)' install.rdf)"

  local dstdir="$pkgdir/usr/lib/firefox/browser/extensions/$version"
  install -d $dstdir
  cp -dpr --no-preserve=ownership * $dstdir
  chmod -R 755 $dstdir
}