summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d334ca4bcc2d53c56b43de9400d988aadc094551 (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Yufan You <ouuansteve at gmail>

pkgname=nvui
pkgver=0.3.1
pkgrel=2
pkgdesc='Modern frontend for Neovim'
arch=('x86_64')
url='https://github.com/rohit-px2/nvui'
license=('MIT')
depends=('boost-libs' 'fmt' 'hicolor-icon-theme' 'qt5-base' 'qt5-svg')
makedepends=('catch2' 'cmake' 'msgpack-cxx' 'ninja')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
        nvui.desktop
        nvui.sh)
sha256sums=('90bd813115c7e86d66f0f0da2a9ed02495551c2cae84d4abb4ddf3cc043f80b9'
            '529e087f9ea5d212c05e1cfd7da51f5e5718acc186a1925f937707c641ebd509'
            'f6094d0da2e36432a74a6e7d4169b5c3c74d1c7383bec53819b5821e658ba12e')

prepare() {
	cd "$pkgname-$pkgver"
	sed -i '/find_package/s/msgpack/msgpackc-cxx/' CMakeLists.txt
}

build() {
	cmake \
		-B build \
		-S "$pkgname-$pkgver" \
		-G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-Wno-dev
	cmake --build build --target nvui
}

package() {
	# https://github.com/rohit-px2/nvui/blob/main/BUILDING.md#packaging-executable
	install -Dv nvui.sh "$pkgdir/usr/bin/$pkgname"
	install -Dvm644 nvui.desktop -t "$pkgdir/usr/share/applications"
	install -Dv build/nvui -t "$pkgdir/usr/lib/$pkgname/"

	cd "$pkgname-$pkgver"
	local dirs=(assets vim)
	find "${dirs[@]}" -type f -exec install -Dvm644 "{}" "$pkgdir/usr/share/$pkgname/{}" \;
	install -d "$pkgdir/usr/share/$pkgname/bin/"
	ln -sv "/usr/lib/$pkgname/$pkgname" "$pkgdir/usr/share/$pkgname/bin/"
	install -Dvm644 assets/appicon.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png"
	install -Dvm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}