68 lines
1.7 KiB
Bash
68 lines
1.7 KiB
Bash
# Template file for 'w3m'
|
|
pkgname=w3m
|
|
version=0.5.3+git20210102
|
|
revision=1
|
|
wrksrc="${pkgname}-${version/+/-}"
|
|
build_style=gnu-configure
|
|
configure_args="--libexecdir=/usr/lib --enable-image=x11,fb
|
|
--with-nkf=/usr/bin/nkf
|
|
--with-imagelib=imlib2 --with-termlib=ncurses --disable-w3mmailer"
|
|
hostmakedepends="pkg-config gc-devel perl gettext nkf"
|
|
makedepends="zlib-devel ncurses-devel gc-devel libressl-devel imlib2-devel
|
|
libX11-devel"
|
|
short_desc="Text-based Web browser and pager (with Debian patches)"
|
|
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
|
license="MIT"
|
|
homepage="https://tracker.debian.org/pkg/w3m"
|
|
changelog="https://raw.githubusercontent.com/tats/w3m/master/NEWS"
|
|
distfiles="https://github.com/tats/w3m/archive/v$version.tar.gz"
|
|
checksum=7b276d2c6ee96588f990959a01e0d8979b1b8c86fdb04d0d17ef46c30c2cd884
|
|
|
|
LDFLAGS="-lX11"
|
|
|
|
post_patch() {
|
|
rm -f Bonus/oldconfigure.sh
|
|
vsed -i -e 's,/usr/local/bin,/usr/bin,g' \
|
|
Bonus/makeref Bonus/scanhist.rb Bonus/html2latex \
|
|
scripts/w3mman/hlink.cgi
|
|
chmod +x Bonus/scanhist.rb Bonus/utf8.cgi
|
|
}
|
|
|
|
pre_build() {
|
|
# build host mktable
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make CC=cc CFLAGS=-Os LD=ld LDFLAGS= mktable
|
|
mv mktable host-mktable
|
|
chmod 755 host-mktable
|
|
make clean
|
|
sed -e 's,./mktable$(EXT),./host-mktable$(EXT),g' -i Makefile
|
|
fi
|
|
}
|
|
|
|
do_check() {
|
|
cd tests
|
|
sh run_tests
|
|
}
|
|
|
|
post_install() {
|
|
local _file
|
|
vlicense doc/README
|
|
for _file in doc/HISTORY doc/README* doc/*.html
|
|
do
|
|
vdoc "$_file"
|
|
done
|
|
for _file in doc/keymap* doc/menu*
|
|
do
|
|
vsconf "$_file"
|
|
done
|
|
vcopy Bonus usr/share/examples/w3m/bonus
|
|
}
|
|
|
|
w3m-img_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - image display support"
|
|
pkg_install() {
|
|
vmove usr/lib/w3m/w3mimgdisplay
|
|
vmove usr/share/doc/w3m/README.img
|
|
}
|
|
}
|