summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef66da9a6924677a4274c871d0108a9bf6d6969c (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
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Aaron Abbott <aabmass at gmail dot com>
pkgname=neovim-qt-git
pkgver=r219.49a61e0
pkgrel=1
pkgdesc="A Qt gui for Neovim (Neovim RPC and GUI using Qt5)."
arch=('i686' 'x86_64')
url="https://github.com/equalsraf/neovim-qt"
license=('custom')
groups=()
# not sure which qt5 dependency to add
depends=('neovim' 'qt5-base' 'msgpack-c')
makedepends=('git' 'cmake')
provides=()
conflicts=('neovim-qt')
replaces=()
backup=()
options=()
install=
source=("${pkgname}::git+${url}.git")
noextract=()
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  mkdir -p "${pkgname}/build"
  cd "${pkgname}/build"

  cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release \
    -DUSE_SYSTEM_MSGPACK=ON -DCMAKE_INSTALL_PREFIX=/usr ..

  make
}

package() {
  cd "${pkgname}/build"

  # cmake isn't configured to install anything, do it on our own
  install -D -m755 bin/nvim-qt "${pkgdir}/usr/bin/nvim-qt"
  install -D -m644 lib/libneovim-qt.a "${pkgdir}/usr/lib/libneovim-qt.a"

  # install the custom license
  install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}