blob: f9e275a7d864e0fcf9bc27a5b26b99a42977bbdd (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# Maintainer: @RubenKelevra <cyrond@gmail.com>
# Contributor: Adrien Prost-Boucle <adrien.prost-boucle@laposte.net>
# Contributor: Kenneth Cremeans <iam@kcseb.digital>
# Contributor: Tom Zander <tom@flowee.org>
pkgname=lbry-desktop-git
_pkgname_base=lbry-desktop
pkgver=0.53.8.r10956.g523ea284a
pkgrel=2
arch=('x86_64')
pkgdesc='Desktop app for the lbry-network (Odysee.com) - a decentralized, user-controlled content marketplace and YouTube alternative - dev version'
url="https://github.com/lbryio/${_pkgname_base}.git"
license=('MIT')
makedepends=('git' 'yarn' 'nodejs>=16' 'npm' 'gnome-keyring' 'gconf' 'libnotify' 'libappindicator-gtk2' 'libsecret' 'libxcrypt-compat')
depends=('nss' 'alsa-lib' 'gtk3')
provides=("lbry=$pkgver" "$_pkgname_base=$pkgver" "lbrynet=$pkgver")
conflicts=('lbry' "$_pkgname_base-bin" 'lbrynet' 'lbrynet-bin' "$_pkgname_base")
source=(
"git+$url"
'lbry.desktop'
)
b2sums=('SKIP'
'7afceb849ab2ee1c7ddbe7ee642298cbf9d8fdf48ab9194a324fd97438fec11e60607ae469a692d079ba15bc2c5e099053ff3efcc4a62e7c94904e053ece858a')
pkgver() {
cd "${srcdir}/$_pkgname_base"
# LBRY version (extracted from package.json)
local _distver=`cat package.json | sed -nr 's/^[[:space:]]*"version" *: *"(.*)".*/\1/p' | head -n 1 | tr -d '-'`
# Date of the last git commit
#local _gitver=`git log -n 1 --date=short | sed -n -e 's/.*Date:\s*\([0-9-]*\).*/\1/p' | tr -d -`
# Revision number
local _gitrev=`git rev-list --count HEAD`
# Short hash of latest commit
local _githash=`git rev-parse --short HEAD`
#echo $_distver.git$_gitver;
echo $_distver.r$_gitrev.g$_githash;
}
build() {
cd "${srcdir}/$_pkgname_base"
export NODE_OPTIONS=--openssl-legacy-provider
# Note : see available yarn targets in file package.json
# Install dependencies
yarn
# Build the binaries
yarn build:dir
# Build and launch the dev version
#yarn dev
}
package() {
# Note : Intentionally not decompressing the generated .deb package ; this should not have been generated anyway
cd "$srcdir/$_pkgname_base/dist/electron/linux-unpacked"
mkdir -p "$pkgdir/opt/LBRY"
cp -r ./* "$pkgdir/opt/LBRY/"
cd "$srcdir/$_pkgname_base"
mkdir -p "$pkgdir/usr/share/doc/lbry"
gzip -c CHANGELOG.md > "$pkgdir/usr/share/doc/lbry/changelog.gz"
cd "$srcdir"
mkdir -p "$pkgdir/usr/share/applications"
cp lbry.desktop "$pkgdir/usr/share/applications/"
cd "$srcdir/$_pkgname_base/build/icons"
for s in 32x32 48x48 96x96 128x128 256x256 ; do
mkdir -p "$pkgdir/usr/share/icons/hicolor/$s/apps"
cp "$s.png" "$pkgdir/usr/share/icons/hicolor/$s/apps/lbry.png"
done
mkdir -p "$pkgdir/usr/bin"
install -dm755 "$pkgdir"/{opt,usr/bin,usr/share}
ln -s "/opt/LBRY/lbry" "$pkgdir/usr/bin/lbry"
ln -s "/opt/LBRY/resources/static/daemon/lbrynet" "$pkgdir/usr/bin/lbrynet"
cd "${srcdir}/$_pkgname_base"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|