aboutsummaryrefslogtreecommitdiffstats
path: root/community/ttyd/APKBUILD
blob: c19a46cd435352c43d04a1defca86d3925416727 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ttyd
pkgver=1.4.2
pkgrel=1
pkgdesc="Share your terminal over the web"
url="https://tsl0922.github.io/ttyd"
arch="all"
license="MIT"
# Note: vim is needed for tool xxd.
makedepends="cmake json-c-dev bsd-compat-headers openssl-dev libwebsockets-dev
	vim zlib-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tsl0922/$pkgname/archive/$pkgver.tar.gz
	fix-cmake.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	mkdir -p build && cd build
	cmake .. \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_VERBOSE_MAKEFILE=TRUE
	make
}

check() {
	cd "$builddir"/build

	./ttyd --version
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="0caff3d3602c5baa7b8f277d4190e1053e66dcfd6b4d62bcfb6fd78522734a4fbc1578cd159bee796c05bf67a4155ab0283ca4e17572e1bc8508b863adc803ed  ttyd-1.4.2.tar.gz
677f71abfec9e74db8f7976e6cb8c4eba052df71162390fa26e7c31f064a179d8587f07088eb0a5ada507a345b11af8d663162c77aad5e7fd129503eb15f83af  fix-cmake.patch"