aboutsummaryrefslogtreecommitdiffstats
path: root/community/w3m/APKBUILD
blob: 8f5488468067663ce0814cc5286737f41def66ff (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
59
# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=w3m
_pkgver=0.5.3+git20180125
pkgver=${_pkgver/+git/.}
pkgrel=4
pkgdesc='Text-based Web browser, as well as pager'
url='https://github.com/tats/w3m'
license='MIT UCD'
arch='all'
makedepends="imlib2-dev openssl-dev gc-dev ncurses-dev linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tats/$pkgname/archive/v$_pkgver.tar.gz
	https.patch"
builddir="$srcdir/$pkgname-${_pkgver/+/-}"

# secfixes:
#   0.5.3.20180125-r0:
#     - CVE-2018-6196
#     - CVE-2018-6197
#     - CVE-2018-6198

build() {
	cd "$builddir"
	PERL=/usr/bin/perl ./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib \
		--enable-image=fb \
		--with-ssl \
		--disable-nntp \
		--disable-dict \
		--disable-help-cgi \
		--with-imagelib=imlib2 \
		--with-termlib=ncurses \
		--disable-w3mmailer \
		--disable-mouse
	make -j1
}

check() {
	cd "$builddir"
	./w3m -version
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -d "$pkgdir"/usr/share/doc/"$pkgname"
	install -d "$pkgdir"/usr/share/licenses/"$pkgname"
	local i; for i in doc/*; do
		install -m644 "$i" "$pkgdir"/usr/share/doc/"$pkgname"
	done
	ln -s /usr/share/doc/"$pkgname"/README \
		"$pkgdir"/usr/share/licenses/"$pkgname"
}

sha512sums="61b8498b927569937c509460e291eeba6eb302d34ccd6e1bf4d1eb07ac73a3ac5a477161727d310324625be04b907f8c3e970382d08c9fa0846b371699f04e14  w3m-0.5.3.20180125.tar.gz
3844b3a079524ad403da7fe03461210a433ff1cd562862c4df55c3be250ccba0c34eb61bcc8df1973d70e2ef034edaf1804bb2fa682b01723322f108f523932a  https.patch"