aboutsummaryrefslogtreecommitdiffstats
path: root/community/notcurses/APKBUILD
blob: 82289d9342d60a04043ce12c8ce56593fee9dc55 (plain) (blame)
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
# Contributor: Nick Black <dankamongmen@gmail.com>
# Maintainer: Nick Black <dankamongmen@gmail.com>
pkgname=notcurses
pkgver=2.2.3
pkgrel=1
pkgdesc="Blingful character graphics and TUI library"
url="https://nick-black.com/dankwiki/index.php/Notcurses"
arch="all"
license="Apache-2.0"
makedepends="cmake ncurses-dev linux-headers ffmpeg-dev doctest-dev libunistring-dev readline-dev ncurses-terminfo"
subpackages="$pkgname-static $pkgname-dbg $pkgname-dev $pkgname-doc
	$pkgname-libs $pkgname-demo ncneofetch ncls $pkgname-view $pkgname-tetris"
source="$pkgname-$pkgver.tar.gz::https://github.com/dankamongmen/notcurses/archive/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DUSE_PANDOC=off \
		-DUSE_QRCODEGEN=off \
		-DUSE_PYTHON=off \
		$CMAKE_CROSSOPTS
	make -C build
}

check() {
	env TERM=vt100 make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

libs() {
	amove usr/lib/libnotcurses*.so.*
}

demo() {
	amove usr/bin/notcurses-demo
	amove usr/bin/notcurses-tester
	amove usr/share/notcurses
}

ncneofetch() {
	amove usr/bin/ncneofetch
}

ncls() {
	amove usr/bin/ncls
}

view() {
	amove usr/bin/ncplayer
}

tetris() {
	amove usr/bin/nctetris
}

sha512sums="9c718a39352cc10e4f4cb24cd7940ccc7ac7ad1f5890f1a87166267b3c24011629464a4720f08c2b8bbf0fab2c5cb9b31fba7a43bc62ae65dff894019adece7d  notcurses-2.2.3.tar.gz"