blob: 5a539b04ab7978251b2e9ba483786f13d6379f42 (
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
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=lemmy-ui
pkgver=0.18.1
pkgrel=1
pkgdesc='The official web app for lemmy'
arch=('any')
url='https://github.com/LemmyNet/lemmy-ui'
license=('AGPL3')
depends=('nodejs')
makedepends=('git' 'yarn' 'python')
_commit='719747463307080ae29a119ab1ad22657a13455b'
source=(
"$pkgname::git+https://github.com/LemmyNet/lemmy-ui#commit=$_commit"
'git+https://github.com/LemmyNet/lemmy-translations.git'
)
b2sums=('SKIP' 'SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
prepare() {
cd "$pkgname"
# setup submodules
git submodule init
git config submodule.lemmy-translations.url ../lemmy-translations
git -c protocol.file.allow=always submodule update
# set UI version
sed -i "s/unknown version/$pkgver/" src/shared/version.ts
}
build() {
cd "$pkgname"
yarn install
yarn build:prod
}
package() {
cd "$pkgname"
install -vd "$pkgdir/usr/share/$pkgname"
cp -R dist/* node_modules "$pkgdir/usr/share/$pkgname"
}
|