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

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 \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-gpm \
		--without-tcl \
		--disable-nls \
		|| return 1
	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
d4637d1cec167e1d7087b9137b6954db  fix-includes.patch"
sha256sums="8bac17b4272475f5e172b9894b8c062a6e5ab0689a736d9dbbcc1695604fb8d7  newt-0.52.11.tar.gz
bff77da4814f8f4ec09572bac464bf7545d4790ada2f4c0deffb27128b6dd83d  fix-includes.patch"
sha512sums="525da1b5af09fd023935a8ebbeaa34524c01145efb696f4baeff6c0bdba6eee35aed14403e0195816c9d9c3a9fe9fc8e2e0bc5c3965780f3c2c00e4dfe272c8d  newt-0.52.11.tar.gz
ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611  fix-includes.patch"