summaryrefslogtreecommitdiff
path: root/user/libptytty/APKBUILD
blob: d12a73c33caabaddc17d0d2dbcd99f6aa4abfb25 (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
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libptytty
pkgver=2.0
pkgrel=0
pkgdesc="OS independent and secure pty/tty and utmp/wtmp/lastlog handling"
url="http://software.schmorp.de/pkg/libptytty.html"
arch="all"
options="!check"  # No test suite.
license="GPL-2.0+"
depends=""
makedepends="cmake utmps-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="http://dist.schmorp.de/libptytty/libptytty-$pkgver.tar.gz
	force-utmps.patch
	"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	export LDFLAGS="$LDFLAGS -Bdynamic"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} \
		-Bbuild
	make -C build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test
}

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

sha512sums="9cca5fddbcc4025c2bbe043e3367ac902d0024a34301258dafcf0de70935c055279d88227168d112d0e4c0dc37f1f49e1ea587bd6bddf0b9d92400657bc7be08  libptytty-2.0.tar.gz
34155b4c06bb8dc8f78777fd3a9e749b1c3c056bd073fd7a0c85404f1dfe29dae6b2513a1ed8093fd528d0eb30cd463a5896c0d05203f47bb4f9cad8067bec26  force-utmps.patch"