summaryrefslogtreecommitdiff
path: root/multilib/lib32-expat/PKGBUILD
blob: c50cb9c794677164851db5e99cc6511d7eb8a4b1 (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
# $Id: PKGBUILD 26535 2010-09-15 22:31:07Z bluewind $

_pkgbasename=expat
pkgname=lib32-${_pkgbasename}
pkgver=2.0.1
pkgrel=7
pkgdesc="An XML Parser library written in C (32 bit)"
arch=('x86_64')
url="http://expat.sourceforge.net/"
license=('custom')
makedepends=('gcc-multilib')
depends=('lib32-glibc' "${_pkgbasename}")
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/expat/${_pkgbasename}-${pkgver}.tar.gz
        CVE-2009-3560.patch
        CVE-2009-3720.patch)
md5sums=('ee8b492592568805593f81f8cdf2a04c'
         '50603cac0f03aabc7087415251f592be'
         'f3eeb796f28945899216b815e5901996')

build() {
  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  patch -Np1 -i $srcdir/CVE-2009-3560.patch
  patch -Np1 -i $srcdir/CVE-2009-3720.patch
  export CC='gcc -m32'
  export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
  ./configure --prefix=/usr --libdir=/usr/lib32 --mandir=/usr/share/man 
  make
}

package() {
  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -d -m755 "${pkgdir}/usr/share/licenses/"
  ln -s ${_pkgbasename} "${pkgdir}/usr/share/licenses/${pkgname}"

  # Clean up lib32 package
  rm -rf "${pkgdir}"/usr/{bin,include,share/man}
}