aboutsummaryrefslogtreecommitdiffstats
path: root/main/newt/APKBUILD
blob: 555176830bfd4254ecb476ee9dc9457247d86f45 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
pkgver=0.52.19
pkgrel=0
pkgdesc="Redhat's Newt windowing toolkit development files"
url="https://pagure.io/newt/"
arch="all"
license="LGPL2"
depends=
makedepends="slang-dev popt-dev python2-dev ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc py-newt:py $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 || return 1
}

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

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
}

py() {
	pkgdesc="A NEWT module for Python2"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="a71b3ea69e09f348f6f883c9c3cccf3743e986858235e3df1c85e28d74605a1f822bc35c9450c473efe7e6b5f252d2b5a12e11b2023463e9803916ff09b42834  newt-0.52.19.tar.gz
ea3937142ce776b6c227936e87f7bc28116ab7775db5785600e39bee38eba914d3ccae1ecb54d9f4ac9505918da255d69a777b105d80d72cd087545b1dae18bc  parallel-build.patch
ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611  fix-includes.patch"