blob: 1cb78b648538e54ee3d63efaf3d660014a15dc35 (
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: Frederik Schwan <frederik dot schwan at linux dot com>
# Contributor: Frederick Gnodtke <frederick@gnodtke.net>
pkgname=onivim2-git
pkgver=554.f4cd1e28
pkgrel=1
pkgdesc='Native, lightweight modal code editor'
arch=('any')
url='https://github.com/onivim/oni2'
license=('comercial')
makedepends=('git' 'esy' 'ragel' 'nodejs')
options=('!strip')
source=("${pkgname}::git+https://github.com/onivim/oni2.git#branch=master")
sha512sums=('SKIP')
pkgver() {
cd ${pkgname}
echo $(git rev-list --count master).$(git rev-parse --short master)
}
# set ESY__PREFIX to avoid 5G of dependency cache ending up in ~/.esy
build() {
cd ${pkgname}
ESY__PREFIX=${srcdir}/esy_cache esy install
ESY__PREFIX=${srcdir}/esy_cache esy bootstrap
ESY__PREFIX=${srcdir}/esy_cache esy build
ESY__PREFIX=${srcdir}/esy_cache esy x Oni2 -f --checkhealth
ESY__PREFIX=${srcdir}/esy_cache esy create-release
}
check() {
cd ${pkgname}
ESY__PREFIX=${srcdir}/esy_cache esy '@bench' install
ESY__PREFIX=${srcdir}/esy_cache esy '@bench' build
ESY__PREFIX=${srcdir}/esy_cache esy '@bench' run
}
package() {
install -d -m 755 "${pkgdir}/opt/"
install -d -m 755 "${pkgdir}/usr/bin/"
cd ${pkgname}/_release/
install -D -m 644 Onivim2.AppDir/usr/share/applications/Onivim2.desktop "${pkgdir}/usr/share/applications/Onivim2.desktop"
install -D -m 644 Onivim2.AppDir/usr/share/icons/hicolor/512x512/apps/Onivim2.png "${pkgdir}/usr/share/pixmaps/Onivim2.png"
cp -ar Onivim2.AppDir "${pkgdir}/opt/onivim2"
cp -ar linux/bin "${pkgdir}/opt/onivim2/usr/"
ln -s "${pkgdir}/opt/onivim2/AppRun" "${pkgdir}/usr/bin/Oni2"
}
|