summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6f4f923da5bcb86bffaac277f705c1cf4622d7b (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
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Caleb Maclennan <caleb@alerque.com>
pkgname=ezra-bible-app
pkgver=1.13.0
pkgrel=2
pkgdesc="A user-friendly Bible study tool focussing on topical study based on keywords/tags"
arch=('x86_64')
url="https://github.com/ezra-bible-app/ezra-bible-app"
license=('GPL-2.0-or-later')
depends=('alsa-lib' 'gtk3' 'nodejs' 'nss')
makedepends=('cmake' 'git' 'npm' 'subversion' 'unzip')
conflicts=('ezra-project')
_commit=48357d117fc0648f60b87efa6f4b1913118e4501  # tags/1.13.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"
  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.2.3/g" package.json
}

build() {
  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"
  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/"
}