PKGBUILDs/aur/libparserutils-svn/PKGBUILD

50 lines
1.3 KiB
Bash
Raw Normal View History

2011-06-16 13:04:10 +00:00
# Contributor: Alexander R<>dseth <rodseth@gmail.com>
pkgname=libparserutils-svn
2012-04-23 01:04:33 +00:00
pkgver=12813
2011-06-16 13:04:10 +00:00
pkgrel=1
plugrel=1
pkgdesc="A library for building efficient parsers"
arch=('any')
url="http://www.netsurf-browser.org/projects/libparserutils/"
license=('MIT')
provides=('libparserutils')
conflicts=('libparserutils')
makedepends=('subversion')
_svntrunk=svn://svn.netsurf-browser.org/trunk/libparserutils
_svnmod=libparserutils
build() {
cd "$srcdir"
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"
cd $_svnmod
msg2 "Patching..."
sed -i 's/static uint16_t utf16;//' src/input/inputstream.c
sed -i 's/static uint16_t utf32;//' src/input/inputstream.c
sed -i 's/utf16 = parserutils/\/\//' src/input/inputstream.c
sed -i 's/utf32 = parserutils/\/\//' src/input/inputstream.c
sed -i 's/SLEN("UTF-16"/\/\//' src/input/inputstream.c
sed -i 's/SLEN("UTF-32"/\/\//' src/input/inputstream.c
msg2 "Compiling..."
make
}
package() {
cd $_svnmod
msg2 "Packaging..."
make PREFIX="/usr" DESTDIR="$pkgdir/" install
msg2 "Packaging license..."
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
# vim:set ts=2 sw=2 et: