blob: 623d60a0bd93b33b9f72edda5e53bc142b726e5f (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: surefire@cryptomile.net
pkgname=sqlectron-gui-git
pkgver=1.29.0+3+gd1eb407
pkgrel=1
pkgdesc="A simple and lightweight SQL client with cross database and platform support"
arch=('x86_64')
url="https://sqlectron.github.io/"
license=('MIT')
depends=('electron')
makedepends=('npm' 'asar' 'git')
conflicts=('sqlectron-gui')
provides=('sqlectron-gui')
source=("${pkgname}::git+https://github.com/sqlectron/sqlectron-gui.git"
'sqlectron-gui.sh'
'sqlectron-gui.desktop')
sha1sums=('SKIP'
'e0e7c83e47f368543a3c4505cf035d570e0d645b'
'b9fb3bc29a17dee5de9295e2fdb2b3025ed51d1f')
pkgver() {
cd "${pkgname}"
git describe --tags --long | sed 's/-/+/g; s/^v//'
}
prepare() {
cd "${pkgname}"
# remove extra dependencies
sed -i package.json \
-e '/"postinstall":/ d' \
-e '/"electron":/ d' \
-e '/"electron-builder":/ d' \
-e '/"spawn-auto-restart":/ d' \
-e '/"webpack-dev-middleware":/ d' \
-e '/"webpack-dev-server":/ d' \
-e '/"webpack-bundle-analyzer":/ s/,$//'
}
build() {
cd "${pkgname}"
npm install --build-from-source
npm run compile:browser
npm run compile:renderer
mkdir app
mv -t ./app out
cp -t ./app package.json
pushd app
npm install \
--production \
--build-from-source \
--nodedir=/usr/lib/electron/node \
--runtime=electron \
--target=$(electron -v) \
popd
asar p app app.asar
}
package() {
cd "${pkgname}"
install -Dm0755 ../sqlectron-gui.sh "${pkgdir}/usr/bin/sqlectron-gui"
install -Dm0644 build/app.png "${pkgdir}/usr/share/pixmaps/sqlectron-gui.png"
install -Dm0644 -t "${pkgdir}/usr/lib/sqlectron-gui" app.asar
install -Dm0644 -t "${pkgdir}/usr/share/applications" ../sqlectron-gui.desktop
install -Dm0644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
|