blob: dbce1c0eec65761cfc2d071481bf3901fa2143e0 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Amy <amy at fluff dot tech>
pkgname=sponsorblock-chromium-git
pkgver=2.1.2.r6.1b96e210
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}"
}
|