summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKian Kasad2020-10-10 17:22:04 -0700
committerKian Kasad2020-10-10 17:22:53 -0700
commitcaec10d0d19443e6162acd0a303e45a70c9e251a (patch)
tree804124edb5fb06b22e6f64922ec6a75532a68084
downloadaur-caec10d0d19443e6162acd0a303e45a70c9e251a.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD47
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5bb18830e48
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = sponsorblock-chromium-git
+ pkgdesc = SponsorBlock extension for chromium-based browsers
+ pkgver = 2.0.7.r38.4dc4160
+ pkgrel = 1
+ url = https://github.com/ajayyy/SponsorBlock
+ arch = any
+ license = GPL
+ makedepends = git
+ makedepends = npm
+ provides = sponsorblock-chromium
+ conflicts = sponsorblock-chromium
+ source = sponsorblock-chromium::git+https://github.com/ajayyy/SponsorBlock.git
+ sha256sums = SKIP
+
+pkgname = sponsorblock-chromium-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0386f816d02
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Kian Kasad <kian at kasad.com>
+
+pkgname=sponsorblock-chromium-git
+pkgver=2.0.7.r38.4dc4160
+pkgrel=1
+pkgdesc="SponsorBlock extension for chromium-based browsers"
+arch=(any)
+url="https://github.com/ajayyy/SponsorBlock"
+license=('GPL')
+makedepends=('git' 'npm')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname%-git}::git+${url}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+
+ # print version string
+ printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+
+ cp config.json.example config.json
+
+ # install build-time dependencies using npm
+ npm install
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+
+ # build extension
+ npm run build
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+
+ # create install dir
+ mkdir -p "$pkgdir/usr/share/"
+
+ # install extension files
+ cp -aT dist "$pkgdir/usr/share/${pkgname%-git}"
+}