diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-06-23 01:18:18 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-06-23 01:18:18 -0700 |
commit | 206736449b7822de1370ff8b754f02bd64564262 (patch) | |
tree | cf168b233bd15f1bb123f93b1f61e463dce8c2c0 | |
download | w3m-206736449b7822de1370ff8b754f02bd64564262.tar.xz |
Initial commit
-rw-r--r-- | PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..dc0b9be --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net> +# Maintainer (Arch): Gaetan Bisson <bisson@archlinux.org> +# Contributor (Arch): dorphell <dorphell@archlinux.org> + +# # I maintain this because: +# Arch version lacks additional optimization and hardening flags + +pkgname=w3m +_gitcommit=6376b90cdf93c367f39d1f74e3689367a4ca141b +_pkgver=0.5.3.git20210102-6 +pkgver=${_pkgver/-/_} +pkgrel=1 +pkgdesc='Text-based Web browser as well as pager' +url='https://salsa.debian.org/debian/w3m' +license=('custom') +arch=('x86_64') +makedepends=('git' 'imlib2') +optdepends=('imlib2: for graphics support') +depends=('openssl' 'gc' 'ncurses' 'gpm') +source=("git+https://salsa.debian.org/debian/w3m.git#commit=${_gitcommit}") +sha256sums=('SKIP') + +# There's also the maintainer's github repo, usually in sync with Debian's: +# https://github.com/tats/w3m + +build() { + cd "${srcdir}/${pkgname}" + + export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" + export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto -fPIE" + export LDFLAGS="$LDFLAGS,-pie" + + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --enable-image=x11,fb \ + --with-imagelib=imlib2 \ + --with-termlib=ncurses \ + --disable-w3mmailer \ + + make +} + +package() { + cd "${srcdir}/${pkgname}" + make DESTDIR="${pkgdir}" install + + install -d "${pkgdir}"/usr/share/{doc,licenses}/w3m + install -m644 doc/* "${pkgdir}/usr/share/doc/w3m" + ln -s ../../doc/w3m/README "${pkgdir}/usr/share/licenses/w3m" +} |