summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4baa0796457310bf2f95edbb4944e7a2819afeb9 (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
# Maintainer: bziemons <ben@rs485.network>
pkgname=chr-editor-git
pkgver=r652.b3a4c07
pkgrel=1
pkgdesc="Console-based editor designed for simplified use like gedit"
arch=("x86_64")
url="https://github.com/istoph/editor"
license=('Boost')
depends=('tuiwidgets-git' 'qt5-base' 'icu' 'gcc-libs')
makedepends=(meson git)
provides=(chr-editor)
conflicts=(chr-editor)
options=(strip)
source=("git+https://github.com/istoph/editor.git"
        "meson-install.patch")
sha512sums=('SKIP'
            'e400d64cf6ef5eb0a0935a716cf64a9a7a498532c42b9c46f4014f970efee4ae519cbeacabe9edd2f6c767232733613a8e7b9ca22b5a96642654653ed509c486')

pkgver() {
    cd "editor"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "editor"
    patch --forward --strip=1 --input="${srcdir}/meson-install.patch"
}

build() {
    arch-meson editor _build
    meson compile -C _build
}

check() {
    meson test -C _build
}

package() {
    DESTDIR="$pkgdir" meson install -C _build

    # install manpages
    install -d "${pkgdir}/usr/share/man/man1/"
    install -pm 644 "${srcdir}/editor/manpages/"* "${pkgdir}/usr/share/man/man1"
}