blob: 95a7ebe978af62f1a14b6fd28232e3e779703407 (
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
|
# Maintainer: Jacob Morgan <arch_aur@slackspace.io>
pkgname=rotorflight-blackbox
pkgver=2.1.0
pkgrel=1
pkgdesc="Rotorflight Blackbox for Rotorflight FBL Controller"
arch=('x86_64')
url="https://github.com/rotorflight/rotorflight-blackbox"
license=('MIT')
options=('!debug' '!strip')
depends=('python' 'nodejs' 'npm' 'nvm')
makedepends=('yarn')
source=("$pkgname-$pkgver.tar.gz::https://github.com/rotorflight/rotorflight-blackbox/archive/refs/tags/release/${pkgver}.tar.gz"
"$pkgname.desktop")
sha512sums=('6328abf94f5ad87c918366145ba7195bd01918c9eea6cc0d6b8e41add3e55609c843dfd56f6d9161101e4318ce834912aad95ec2fa59185ea5a485e4f6b4692e'
'dc323d2e7bab4d0f65a9cd62d99e7bc696ac880bbe3ed824959c9d6b5142f9095195b3a234fb4676ef49dc5419f41218107e9f324e6351870a47aa19571b64f7')
_ensure_local_nvm() {
# let's be sure we are starting clean
which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
export NVM_DIR="${srcdir}/.nvm"
# The init script returns 3 if version specified
# in ./.nvrc is not (yet) installed in $NVM_DIR
# but nvm itself still gets loaded ok
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
}
prepare() {
cd "${pkgname}-release-${pkgver}"
_ensure_local_nvm
nvm install 16
}
build() {
cd "${pkgname}-release-${pkgver}"
_ensure_local_nvm
npm install yarn -g
yarn install
make version SEMVER="${pkgver}"
yarn gulp apps --linux64
}
package() {
cd "${pkgname}-release-${pkgver}"
install -d "$pkgdir/opt/$pkgname/"
cp -r apps/rotorflight-blackbox/linux64/* "${pkgdir}/opt/$pkgname/"
chmod -R a=u,g-w,o-w "$pkgdir/opt/$pkgname/"
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -d "$pkgdir/usr/bin/"
ln -s /opt/$pkgname/$pkgname "$pkgdir/usr/bin/$pkgname"
}
|