summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbf02de3392f76d85403495d1e462b5c42429d51 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# $Id: PKGBUILD 153571 2015-12-17 12:44:34Z fyan $
# Maintainer: Daniel Wallace <danielwallace@aur.archlinux.org>
# Contributor: Dave Reisner <dreisner@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# x32 Maintainer: Fantix King <fantix.king at gmail.com>

pkgname=libx32-curl
_pkgname=curl
pkgver=7.46.0
pkgrel=1.1
pkgdesc="An URL retrieval utility and library (x32 ABI)"
arch=('x86_64')
url="http://curl.haxx.se"
license=('MIT')
depends=('libx32-libssh2' 'libx32-krb5' 'libx32-libidn' "${_pkgname}")
source=("http://curl.haxx.se/download/$_pkgname-$pkgver.tar.gz"{,.asc}
        curlbuild-stub.h)
md5sums=('230e682d59bf8ab6eca36da1d39ebd75'
         'SKIP'
         'f8006c96c36ab7049412350968eb0389')
 validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91') # Daniel Stenberg

build() {
  cd "$_pkgname-$pkgver"

  export CC="gcc -mx32"
  export CXX="g++ -mx32"
  export PKG_CONFIG_PATH="/usr/libx32/pkgconfig"
  
  ./configure \
      --prefix=/usr \
      --mandir=/usr/share/man \
      --disable-dependency-tracking \
      --disable-ldap \
      --disable-ldaps \
      --enable-ipv6 \
      --enable-manual \
      --enable-versioned-symbols \
      --enable-threaded-resolver \
      --with-gssapi \
      --with-libidn \
      --with-random=/dev/urandom \
      --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
      --libdir=/usr/libx32

  make
}

package() {
  install="${pkgname}.install"

  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  rm -rf "${pkgdir}"/usr/{share,bin}
  
  # license
  install -d "$pkgdir/usr/share/licenses"
  ln -s "$_pkgname" "$pkgdir/usr/share/licenses/$pkgname"

  # devel
  find "${pkgdir}/usr/include/curl" -type f -not -name curlbuild.h -delete
  install -Dm644 "${srcdir}/curlbuild-stub.h" "${pkgdir}/usr/include/_$pkgname/curlbuild-stub.h"
  mv "$pkgdir/usr/include/curl/curlbuild.h" "$pkgdir/usr/include/$_pkgname/curlbuild-x32.h"
}