aboutsummaryrefslogtreecommitdiffstats
path: root/main/newt/APKBUILD
blob: 323368b3cb82ac3ff3a136ce55aff9e7c8b8ea4e (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
56
57
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
pkgver=0.52.20
pkgrel=0
pkgdesc="Redhat's Newt windowing toolkit development files"
url="https://pagure.io/newt/"
arch="all"
license="LGPL-2.0"
makedepends="slang-dev popt-dev python2-dev python3-dev ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc py-newt:py2 py3-newt:py3 $pkgname-lang"
source="https://releases.pagure.org/newt/newt-$pkgver.tar.gz
	parallel-build.patch
	fix-includes.patch"

builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	sed -i -e 's:-lslang:-lslang -lncurses:g' \
		-e 's:instroot:DESTDIR:g' Makefile.in
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-tcl \
		--disable-nls \
		|| return 1
	make RPM_OPT_FLAGS="$CFLAGS"
}

package() {
	cd "$builddir"
	# TODO: fix the make install target to not try install po files
	make -j1 DESTDIR="$pkgdir" prefix="/usr" RPM_OPT_FLAGS="ERROR" install \
		||  true
}

py2() {
	pkgdesc="A NEWT module for Python2"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib/
}


py3() {
	pkgdesc="A NEWT module for Python3"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python3.6 "$subpkgdir"/usr/lib/
}

sha512sums="0c10c373c6a5299a85fc38f32d3590fff3b26c4be40e6c85ed73c20724ef2fb094bf37a8c3b1b80a4bcdfc14fe59254d4419c391245c298a4e16788954b88236  newt-0.52.20.tar.gz
ea3937142ce776b6c227936e87f7bc28116ab7775db5785600e39bee38eba914d3ccae1ecb54d9f4ac9505918da255d69a777b105d80d72cd087545b1dae18bc  parallel-build.patch
ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611  fix-includes.patch"