blob: a2c097794d8f146bbca1d8872c8cd219347ad26d (
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
|
# Maintainer: devome <evinedeng@hotmail.com>
_reponame="PT-Plugin-Plus"
_pkgname="${_reponame,,}"
pkgname="${_pkgname}-git"
pkgver=1.6.1.2591
pkgrel=1
pkgdesc="Microsoft Edge, Google Chrome, Firefox browser plugin (Web Extensions), which is mainly used to assist the seeds of downloading PT station."
arch=("any")
url="https://github.com/pt-plugins/${_reponame}"
provides=("${_pkgname}-dev")
license=("MIT")
makedepends=("git" "jq" "nodejs" "yarn")
optdepends=('google-chrome' 'microsoft-edge-stable-bin')
source=("${_pkgname}::git+${url}.git#branch=dev")
sha256sums=('SKIP')
options=(!strip)
## prepare function run before pkgver function, and build funtion run after pkgver function.
## manifest.json are generated after "yarn build".
prepare() {
cd "${_pkgname}"
echo "ignore-engines true" > .yarnrc
NODE_OPTIONS="--openssl-legacy-provider" NODE_NO_WARNINGS=1 \
yarn build \
--ignore-engines \
--no-node-version-check \
--non-interactive \
--prod \
--silent \
--use-yarnrc .yarnrc
}
pkgver() {
jq -r .version "${_pkgname}/dist/manifest.json" || exit 1
}
package() {
cd "${_pkgname}/dist"
find . -type f -exec install -Dm644 {} "${pkgdir}/usr/share/${_pkgname}-dev/"{} \;
}
|