summaryrefslogtreecommitdiff
path: root/community/xmlrpc-c/PKGBUILD
blob: 994de7f2eccb0f9c586c8c816cff49a8630b7f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id: PKGBUILD 111892 2014-05-26 12:53:39Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
# Contributor: Vitaliy Berdinskikh <skipper13@root.ua>

pkgname=xmlrpc-c
pkgver=1.38.02
pkgrel=1
epoch=1
pkgdesc='XML-RPC for C and C++'
arch=('x86_64' 'i686')
url='http://xmlrpc-c.sourceforge.net/'
license=('custom')
depends=('curl' 'libxml2')
makedepends=('libtool' 'setconf' 'python')
options=('!makeflags' '!emptydirs')
source=('svn://svn.code.sf.net/p/xmlrpc-c/code/advanced')
sha1sums=('SKIP')

pkgver() {
  python -c 'print("%01d.%02d.%02d" % tuple(map(int, (x.rsplit(" ",1)[1] for x in open("advanced/version.mk").read().split("\n")[-4:-1]))))' 
}

build() {
  cd advanced

  [ "$CARCH" != "i686" ] && export CFLAGS="$CFLAGS -fPIC"
  ./configure --prefix=/usr \
    --mandir=/usr/share/man \
    --enable-libxml2-backend \
    --disable-cgi-server \
    --disable-libwww-client \
    --disable-wininet-client \
    --enable-abyss \
    --enable-cplusplus
  mkdir include/curl
  touch include/curl/types.h
  make CFLAGS_PERSONAL="$CFLAGS"
  make -C tools CFLAGS_PERSONAL="$CFLAGS"
}

package() {
  cd advanced

  make DESTDIR="$pkgdir" install
  make -C tools DESTDIR="$pkgdir" install
  install -Dm644 doc/COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  # Remove references to build directory
  setconf "$pkgdir/usr/bin/xmlrpc-c-config" BLDDIR ''
  setconf "$pkgdir/usr/bin/xmlrpc-c-config" ABS_SRCDIR ''
}

# vim:set ts=2 sw=2 et: