PKGBUILD 1 KB
Newer Older
Giuseppe's avatar
Giuseppe committed
1 2
_pkgbasename=libgcrypt
pkgname=lib32-$_pkgbasename
3
pkgver=1.8.4
4 5
pkgrel=1
pkgdesc="A general purpose crypto library based on the code used (32-bit)"
Giuseppe's avatar
Giuseppe committed
6 7 8
arch=(x86_64)
url="http://www.gnupg.org"
license=('LGPL')
Samir Benmendil's avatar
Samir Benmendil committed
9
depends=('lib32-libgpg-error>=1.10' $_pkgbasename=$pkgver)
10
makedepends=('lib32-gcc-libs' 'libtool')
Luca Giambonini's avatar
Luca Giambonini committed
11
source=("https://www.gnupg.org/ftp/gcrypt/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.bz2")
12
sha1sums=('4a8ef9db6922f3a31992aca5640b4198a69b58fc')
Giuseppe's avatar
Giuseppe committed
13 14 15 16 17 18 19 20 21 22 23 24

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd ${srcdir}/${_pkgbasename}-${pkgver}

  # Use 32-bit assembler
  sed 's:path="amd64":path="i586 i386":' -i mpi/config.links

  # keep static library for , needed for cryptsetup
25 26 27 28
  ./configure --prefix=/usr \
              --disable-padlock-support \
              --libdir=/usr/lib32 \
              --enable-shared
Giuseppe's avatar
Giuseppe committed
29 30 31 32 33 34 35 36 37
  make
}

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

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