-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
54 lines (46 loc) · 1.79 KB
/
PKGBUILD
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
# Maintainer: Antony Ho <ntonyworkshop@gmail.com>
pkgname=session-desktop
pkgver=1.11.5
pkgrel=1
pkgdesc="Private messaging from your desktop"
arch=(x86_64)
url="https://getsession.org"
license=('GPL-3.0')
depends=(libxtst nss alsa-lib libxss libnotify xdg-utils)
makedepends=('git' 'git-lfs' 'nvm' 'yarn' 'nodejs')
optdepends=('libappindicator-gtk3: for tray support')
provides=(session-messenger-desktop)
conflicts=(session-desktop-bin session-desktop-git session-desktop-appimage)
options=(!strip)
install=$pkgname.install
source=('git+https://github.com/loki-project/session-desktop.git'
'session-desktop.desktop')
sha256sums=('SKIP'
'fde2e8851d93a7a8ca2dc0338535362da3240208262d08155a594500e41a199b')
prepare() {
cd $srcdir/session-desktop
git checkout v$pkgver
source /usr/share/nvm/init-nvm.sh
git lfs install
nvm install
nvm use
}
build() {
cd $srcdir/session-desktop
source /usr/share/nvm/init-nvm.sh && nvm use --delete-prefix
yarn install
export SIGNAL_ENV=production
yarn build-everything
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=never --config.directories.output=release --linux=tar.xz
}
package() {
install -d "${pkgdir}/usr/"{lib,bin}
cp -a $srcdir/session-desktop/release/linux-unpacked $pkgdir/usr/lib/$pkgname
install -Dm644 $srcdir/session-desktop/build/session_icon_source_1024px.png $pkgdir/usr/share/pixmaps/$pkgname.png
for size in 16 32 48 64 128 256 512 1024; do
install -Dm644 "${srcdir}/session-desktop/build/icons/icon_${size}x${size}.png" \
"${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png"
done
install -Dm644 $srcdir/session-desktop.desktop $pkgdir/usr/share/applications/${pkgname}.desktop
ln -s "/usr/lib/${pkgname}/session-desktop" "${pkgdir}/usr/bin/"
}