summaryrefslogtreecommitdiffstats
path: root/main/newt/APKBUILD
blob: d3ee3b8ec3b11be1dc970f006aa05cc137ce7959 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
pkgver=0.52.11
pkgrel=0
pkgdesc="Redhat's Newt windowing toolkit development files"
url="https://fedorahosted.org/newt/"
arch="x86 x86_64"
license="LGPL-2"
depends=
makedepends="slang-dev popt-dev python-dev ncurses-dev wget"
subpackages="$pkgname-dev $pkgname-doc py-newt:py"
source="https://fedorahosted.org/releases/n/e/newt/newt-$pkgver.tar.gz
	"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in ../*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done

	sed -i -e 's:-lslang:-lslang -lncurses:g' \
		-e 's:instroot:DESTDIR:g' Makefile.in || return 1
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure --prefix=/usr \
		--without-gpm \
		--without-tcl \
		--disable-nls
	make RPM_OPT_FLAGS="$CFLAGS" || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	# 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 Python"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

md5sums="4b9a0685ecd180c42d2c4a5806e3fc52  newt-0.52.11.tar.gz"