core/libxml2/PKGBUILD

56 lines
1.3 KiB
Bash
Raw Normal View History

2010-03-13 23:54:19 +08:00
pkgname=libxml2
pkgver=2.9.4+12+ge905f08
pkgrel=1
2010-03-13 23:54:19 +08:00
pkgdesc="XML parsing library, version 2"
2014-06-28 23:20:47 +08:00
arch=('x86_64')
license=('MIT')
2014-06-28 23:20:47 +08:00
depends=('zlib' 'readline' 'ncurses' 'xz')
makedepends=('python2' 'python3' 'git')
2010-03-13 23:54:19 +08:00
url="http://www.xmlsoft.org/"
_commit=e905f08123e4a6e7731549e6f09dadff4cab65bd # master
source=(git://git.gnome.org/libxml2#commit=$_commit
http://www.w3.org/XML/Test/xmlts20080827.tar.gz)
md5sums=('SKIP'
'ae3d1ebe000a3972afa104ca7f0e1b4a')
pkgver() {
cd $pkgname
git describe --long | sed -e 's/-/+/g' -e 's/^v//'
}
2010-03-13 23:54:19 +08:00
prepare() {
mkdir build-py3
mkdir build-py2
mv xmlconf build-py2/
cd $pkgname
NOCONFIGURE=1 ./autogen.sh
}
2014-06-28 23:20:47 +08:00
build() {
cd build-py2
../$pkgname/configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python2
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
2011-01-16 06:40:12 +08:00
make
cd ../build-py3
../$pkgname/configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python3
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
PYTHONHASHSEED=0 make
}
check() {
cd ${srcdir}/build-py2
make check
2011-01-16 06:40:12 +08:00
}
package() {
cd ${srcdir}/build-py2
find doc -type f -exec chmod 0644 {} \;
2011-01-16 06:40:12 +08:00
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
cd ../build-py3/python
PYTHONHASHSEED=0 make DESTDIR="${pkgdir}" install
2010-03-13 23:54:19 +08:00
}