summaryrefslogtreecommitdiff
path: root/multilib/lib32-nettle/PKGBUILD
blob: 1da03abb672c946b9e5de59cbc7446af1d25faec (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
# $Id: PKGBUILD 73784 2012-07-15 14:03:44Z bluewind $
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Christoph Vigano <mail@cvigano.de>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: bender02 at gmx dot com

_pkgbasename=nettle
pkgname=lib32-$_pkgbasename
pkgver=2.5
pkgrel=1
pkgdesc="A low-level cryptographic library (32-bit)"
arch=('i686' 'x86_64')
url="http://www.lysator.liu.se/~nisse/nettle/"
license=('GPL2')
depends=('lib32-gmp' $_pkgbasename)
makedepends=(gcc-multilib)
source=(ftp://ftp.gnu.org/gnu/nettle/$_pkgbasename-$pkgver.tar.gz)
md5sums=('d66882e6ad31a9f651b73d7a1a93bd4c')

build() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  ./configure --prefix=/usr --libdir=/usr/lib32 \
    --enable-shared \
    --disable-static # <-- seems not working now
  make
}

check() {
  cd "$srcdir/$_pkgbasename-$pkgver"
  make -k check
}

package() {
  cd "$srcdir/$_pkgbasename-$pkgver"
  make DESTDIR="$pkgdir/" install

  find $pkgdir
  
  # remove static libs
  rm -f ${pkgdir}/usr/lib32/{libhogweed,libnettle}.a

  rm -rf "${pkgdir}"/usr/{include,share,bin}
}