diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 101 |
1 files changed, 47 insertions, 54 deletions
@@ -1,66 +1,59 @@ -# Maintainer: Caleb Maclennan <caleb@alerque.com> - +# Maintainer: Mark Wagie <mark dot wagie at proton dot me> +# Contributor: Caleb Maclennan <caleb@alerque.com> pkgname=ezra-bible-app -pkgver=1.2.0 +pkgver=1.12.0 pkgrel=1 -pkgdesc='A user-friendly Bible study tool focussing on topical study based on keywords/tags' +pkgdesc="A user-friendly Bible study tool focussing on topical study based on keywords/tags" arch=('x86_64') -url="https://github.com/$pkgname/$pkgname" -license=(GPL3) -depends=(electron - icu - nodejs) -provides=(ezra-project) -conflicts=(ezra-project) -replaces=(ezra-project) -makedepends=(git # Upstream Issue: https://github.com/ezra-bible-app/ezra-bible-app/issues/388 - jq - moreutils - node-gyp - node-prune - nodejs-addon-api # run time dep but gets baked into electron asar - nodejs-pug-cli - nodejs-sword-interface # run time dep but gets baked into electron asar - npm) -source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" - "$pkgname.sh") -sha256sums=('11fede4cdc9654904efc8f3f515a9dc8eec86178c1eb29fddf38738081a6e348' - 'e135a382166ce27cf1348750767e157b2d292d4a189940f0fa874af29bc6540b') +url="https://github.com/ezra-bible-app/ezra-bible-app" +license=('GPL3') +depends=('alsa-lib' 'gtk3' 'nodejs' 'nss') +conflicts=('ezra-project') +replaces=('ezra-project') +makedepends=('cmake' 'git' 'npm' 'subversion' 'unzip') +_commit=e657a10864edea8bb5499e02338accc07d6b76d2 # tags/1.12.0^0 +source=("git+https://github.com/ezra-bible-app/ezra-bible-app.git#commit=$_commit" + 'git+https://github.com/ezra-project/apidocs.ezrabibleapp.net.git') +sha256sums=('SKIP' + 'SKIP') + +pkgver() { + cd "$pkgname" + git describe --tags | sed 's/-/+/g' +} prepare() { - cd "$pkgname-$pkgver" - jq 'del(.dependencies["node-addon-api", "node-sword-interface"], .devDependencies["electron", "electron-osx-sign", "node-abi", "node-gyp", "pug-cli", "sequelize-cli"])' package.json | - sponge package.json - # Upstream Issue: https://github.com/ezra-bible-app/ezra-bible-app/issues/436 - rm -rf node_modules/{node-addon-api,node-sword-interface} - sed -i -e '/sqlite3/s/\^//' package.json - npm install --cache "$srcdir/npm-cache" --no-audit --no-fund --ignore-scripts + cd "$pkgname" + git submodule init + git config submodule.docs.url "$srcdir/apidocs.ezrabibleapp.net" + git -c protocol.file.allow=always submodule update + + # Use latest version of Electron + sed -i "s/17.1.0/28.0.0/g" package.json } build() { - cd "$pkgname-$pkgver" - local _electron="$(electron --version | sed 's/^v//')" - npx electron-rebuild -f --version="$_electron" - node-prune node_modules - _ep () { - npx electron-packager ./ "$pkgname" \ - --electron-version="$_electron" \ - --overwrite \ - --platform=linux \ - --arch=x64 $@ - } - _ep - ./build_scripts/purge_build_artifacts.sh - npm link node-addon-api node-sword-interface - _ep --asar + cd "$pkgname" + export npm_config_cache="$srcdir/npm_cache" + npm install + npm run compile-pug + npm run commit-info + npm run install-node-prune + npm i node-pre-gyp rebuild + npm run rebuild + npm run prune-node-modules + rm -rf /tmp/electron-packager &> /dev/null + npm run purge-build-artifacts + npm run package-linux } package() { - cd "$pkgname-$pkgver" - install -Dm755 "../$pkgname.sh" "$pkgdir/usr/bin/$pkgname" - install -Dm644 -t "$pkgdir/usr/share/applications/" "$pkgname.desktop" - install -Dm644 -t "$pkgdir/usr/lib/$pkgname/resources/" "$pkgname-linux-x64/resources/app.asar" - install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE - install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/" {CHANGELOG,README,TECH,LOC_METRICS}.md - install -Dm644 icons/ezra.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" + cd "$pkgname" + install -d "$pkgdir/opt/$pkgname" + cp -r "release/$pkgname-linux-x64"/* "$pkgdir/opt/$pkgname" + install -Dm644 "$pkgname.desktop" -t "$pkgdir/usr/share/applications/" + install -Dm644 icons/ezra.svg \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" + install -d "$pkgdir/usr/bin" + ln -s "/opt/$pkgname/$pkgname" "$pkgdir/usr/bin/" } |