archrelease: copy trunk to community-any
[ArchLinux/community.git] / tinyxml / trunk / PKGBUILD
blob39830e7c3a7aacc14216303c0dddb6378226503f
1 # Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
2 # Contributor: Bartłomiej Piotrowski <barthalion@gmail.com>
3 # Contributor: Larry Hajali <larryhaja[at]gmail[dot]com>
4 # Contributor: Hubert Grzeskowiak <arch at nemesis13 dot de>
6 pkgname=tinyxml
7 pkgver=2.6.2
8 pkgrel=10
9 pkgdesc='Simple, small XML parser'
10 url='http://grinninglizard.com/tinyxml/'
11 arch=(x86_64)
12 license=(zlib)
13 makedepends=(setconf)
14 source=("https://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver//./_}.tar.gz"
15         entity.patch
16         $pkgname-2.5.3-stl.patch
17         $pkgname.pc)
18 b2sums=('84d4ad0174eb38583a4488523410105928b9797f09a2ef84b41156580a40cc11d1d09e28e67512494bd02d7a7e0b208aa6c1ce3383bec12de606491214c16a77'
19         'e8430b2fea965f351c12a0413c3bba43ce19da7e8a0973fae3c7db4b4a8978cbc8b74beb495dd9141e79e90f9ad012b6b5e738207f8075ad7001cb85b424f5be'
20         'e9a3d63283f7946e04dafa58a7eeda782b02d6d6093bae18fdec727b9e6c6722a4c610230cc43ea8142695f3a0aaa1e9bf11a8f0072ad580acb5428655a3d6e8'
21         '8d7658c143ccc3ebe226f3dfdf96ec96de94bca4168e77c560ec4bea41c5d78245c4a3cdf1f4126361f9214176bfb362a6c8377404ccf2a4c999c3f0d491930c')
23 prepare() {
24   cd $pkgname
26   # Fix entity encoding
27   patch -p0 -i "$srcdir/entity.patch"
29   # Make TINYXML_USE_STL permanently defined in tinyxml.h
30   patch -p1 -i "$srcdir/$pkgname-2.5.3-stl.patch"
32   # Fix Makefile
33   setconf Makefile TINYXML_USE_STL YES
34   setconf Makefile RELEASE_CFLAGS "$CXXFLAGS -fPIC"
37 build() {
38   cd $pkgname
40   make
41   g++ -fPIC $CXXFLAGS $LDFLAGS -shared -o "lib$pkgname.so.0.$pkgver" \
42       -Wl,-soname,"lib$pkgname.so.0" $(ls *.o | grep -v xmltest)
45 package() {
46   cd $pkgname
48   install -d -m 0755 "$pkgdir"/usr/{lib,include}
49   install -m 0755 "lib$pkgname.so.0.$pkgver" "$pkgdir"/usr/lib/
50   install -m 0644 $pkgname.h tinystr.h "$pkgdir"/usr/include
51   install -Dm644 readme.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
52   install -Dm644 "$srcdir/$pkgname.pc" "$pkgdir/usr/lib/pkgconfig/$pkgname.pc"
54   cd "$pkgdir/usr/lib"
55   ln -s "lib${pkgname}.so.0.$pkgver" lib$pkgname.so.0
56   ln -s "lib${pkgname}.so.0.$pkgver" lib$pkgname.so