APKBUILD 1.19 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
Natanael Copa's avatar
Natanael Copa committed
3
pkgver=0.52.11
4
pkgrel=2
Natanael Copa's avatar
Natanael Copa committed
5
pkgdesc="Redhat's Newt windowing toolkit development files"
Natanael Copa's avatar
Natanael Copa committed
6
url="https://fedorahosted.org/newt/"
7
arch="all"
Natanael Copa's avatar
Natanael Copa committed
8
license="LGPL-2"
Natanael Copa's avatar
Natanael Copa committed
9 10
depends=
makedepends="slang-dev popt-dev python-dev ncurses-dev wget"
Natanael Copa's avatar
Natanael Copa committed
11
subpackages="$pkgname-dev $pkgname-doc py-newt:py"
Natanael Copa's avatar
Natanael Copa committed
12
source="https://fedorahosted.org/releases/n/e/newt/newt-$pkgver.tar.gz
Natanael Copa's avatar
Natanael Copa committed
13 14
	"

Natanael Copa's avatar
Natanael Copa committed
15
prepare() {
Natanael Copa's avatar
Natanael Copa committed
16 17
	cd "$srcdir"/$pkgname-$pkgver
	for i in ../*.patch; do
Natanael Copa's avatar
Natanael Copa committed
18
		[ -r "$i" ] || continue
Natanael Copa's avatar
Natanael Copa committed
19 20 21 22 23 24
		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
Natanael Copa's avatar
Natanael Copa committed
25
}
Natanael Copa's avatar
Natanael Copa committed
26

Natanael Copa's avatar
Natanael Copa committed
27 28
build() {
	cd "$srcdir"/$pkgname-$pkgver
Natanael Copa's avatar
Natanael Copa committed
29 30 31 32
	./configure --prefix=/usr \
		--without-gpm \
		--without-tcl \
		--disable-nls
Natanael Copa's avatar
Natanael Copa committed
33 34 35 36 37
	make RPM_OPT_FLAGS="$CFLAGS" || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
Natanael Copa's avatar
Natanael Copa committed
38 39 40 41
	# TODO: fix the make install target to not try install po files
	make -j1 DESTDIR="$pkgdir" prefix="/usr" RPM_OPT_FLAGS="ERROR" install \
		||  true
}
Natanael Copa's avatar
Natanael Copa committed
42 43 44 45 46 47 48 49

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"