PKGBUILDs/aur/netsurf-svn-z2/PKGBUILD

67 lines
2.2 KiB
Bash
Raw Normal View History

2011-06-16 13:04:10 +00:00
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Thanks to: Georgij Kondratjev <smpuj@bk.ru>
pkgname=netsurf-svn-z2
pkgver=12470
pkgrel=1
plugrel=1
pkgdesc="Lightweight and fast web browser"
arch=('arm' 'i686' 'x86_64')
url="http://www.netsurf-browser.org/"
license=("GPL")
depends=('libnsfb-svn' 'libmng' 'curl' 'lcms' 'librsvg'
'libnsbmp-svn' 'libnsgif-svn' 'libcss-svn' 'hubbub-svn' 'libpng' 'libmng' 'mouse-emul-git')
provides=('netsurf')
conflicts=('netsurf')
source=('0002-netsurf-add-zipit-keymap.patch' '0004-curl-disable-verify-peer.patch' '0005-fix-content_get_width_height.patch' 'netsurf.sh')
md5sums=('36f5e546979269d93196ceedaa1f6fe8'
'41f9b588580af155e563412664935172'
'50e1d946985d5d5ae0e85e3f54bdbfd2'
'5697422f8ebe615821ff4c8c476c0024')
_svntrunk=svn://svn.netsurf-browser.org/trunk/netsurf
_svnmod=netsurf-svn
build() {
cd "$srcdir"
#msg "Fetching two extra files..."
curl http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c -O || return 1
curl http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lempar.c -O || return 1
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Preparing..."
gcc lemon.c -o lemon
PATH=`pwd`:$PATH
cp -rT $_svnmod $_svnmod-build
ln -sf $_svnmod-build netsurf #will not compile otherwise
cd netsurf
patch -p1 < ../0002-netsurf-add-zipit-keymap.patch
patch -p1 < ../0004-curl-disable-verify-peer.patch
patch -p1 < ../0005-fix-content_get_width_height.patch
echo "override NETSURF_FB_FRONTEND := sdl" > Makefile.config
sed -i -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' ./framebuffer/convert_image.c
msg "Compiling Netsurf..."
make TARGET=framebuffer || return 1
msg "Packaging executables..."
mkdir -p ${pkgdir}/usr/bin
install nsfb ${pkgdir}/usr/bin
install -Dm755 ${srcdir}/netsurf.sh ${pkgdir}/usr/bin/netsurf
install -d ${pkgdir}/usr/bin ${pkgdir}/usr/share/netsurf
msg "Packaging resources..."
rm -rf framebuffer/res/.svn gtk/res/docs/.svn
cp -RL framebuffer/res ${pkgdir}/usr/share/netsurf
msg "Cleaning up..."
find "$pkgdir" -name ".svn" -print0 | xargs -0 rm -rf
}