OCaml 4.14.0 rebuild
[arch-packages.git] / curl / trunk / PKGBUILD
blob997f5b641a71bad656d8a4dfb9fdc1feb00b1dd6
1 # Maintainer: Dave Reisner <dreisner@archlinux.org>
2 # Contributor: Angel Velasquez <angvp@archlinux.org>
3 # Contributor: Eric Belanger <eric@archlinux.org>
4 # Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
5 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
7 pkgbase=curl
8 pkgname=(curl libcurl-compat libcurl-gnutls)
9 pkgver=7.84.0
10 pkgrel=2
11 pkgdesc='An URL retrieval utility and library'
12 arch=('x86_64')
13 url='https://curl.haxx.se'
14 license=('MIT')
15 options=('debug')
16 depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so'
17          'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so'
18          'openssl' 'zlib' 'zstd' 'libzstd.so')
19 provides=('libcurl.so')
20 source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc}
21         '0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch')
22 sha512sums=('8133baf48dfd93531ce0a226b54cb153fd58bb0c1ffe8159cee0c0aa23ce210192c572e8ee01f3d75a87b609a580e76929df1e66635be59c177b0cb8076043b2'
23             'SKIP'
24             '3d771caae23f4b602e57788c61d3f4eaccbd3a73e7256ef7dc2699e574554246280afde1f9eac10c54a498aa0d25de6e696ea36f65389e45ec8ec9abcb3bfb88')
25 validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
27 _configure_options=(
28   --prefix='/usr'
29   --mandir='/usr/share/man'
30   --disable-ldap
31   --disable-ldaps
32   --disable-manual
33   --enable-ipv6
34   --enable-threaded-resolver
35   --with-gssapi
36   --with-libssh2
37   --with-openssl
38   --with-random='/dev/urandom'
39   --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
42 prepare() {
43   cd "${srcdir}/${pkgbase}-${pkgver}"
45   patch -Np1 < ../0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch
48 build() {
49   mkdir build-curl{,-compat,-gnutls}
51   # build curl
52   cd "${srcdir}"/build-curl
54   "${srcdir}/${pkgbase}-${pkgver}"/configure \
55     "${_configure_options[@]}" \
56     --enable-versioned-symbols
57   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
58   make
60   # build libcurl-compat
61   cd "${srcdir}"/build-curl-compat
63   "${srcdir}/${pkgbase}-${pkgver}"/configure \
64     "${_configure_options[@]}" \
65     --disable-versioned-symbols
66   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
67   make -C lib
69   # build libcurl-gnutls
70   cd "${srcdir}"/build-curl-gnutls
72   "${srcdir}/${pkgbase}-${pkgver}"/configure \
73     "${_configure_options[@]}" \
74     --disable-versioned-symbols \
75     --without-ssl \
76     --with-gnutls='/usr'
77   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
78   make -C lib
81 package_curl() {
82   cd build-curl
84   make DESTDIR="${pkgdir}" install
85   make DESTDIR="${pkgdir}" install -C scripts
87   cd "${srcdir}/${pkgname}-${pkgver}"
89   # license
90   install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING
93 package_libcurl-compat() {
94   pkgdesc='An URL retrieval library (without versioned symbols)'
95   depends=('curl' 'openssl')
97   cd "${srcdir}"/build-curl-compat
99   make -C lib DESTDIR="${pkgdir}" install
101   mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.8.0
102   rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
103   for version in 3 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0; do
104     ln -s libcurl-compat.so.4.8.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
105   done
107   install -dm 0755 "${pkgdir}"/usr/share/licenses
108   ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-compat
111 package_libcurl-gnutls() {
112   pkgdesc='An URL retrieval library (without versioned symbols and linked against gnutls)'
113   depends=('curl' 'gnutls')
115   cd "${srcdir}"/build-curl-gnutls
117   make -C lib DESTDIR="${pkgdir}" install
119   mv "${pkgdir}"/usr/lib/libcurl{,-gnutls}.so.4.8.0
120   rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
121   for version in 3 4 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0; do
122     ln -s libcurl-gnutls.so.4.8.0 "${pkgdir}"/usr/lib/libcurl-gnutls.so.${version}
123   done
125   install -dm 0755 "${pkgdir}"/usr/share/licenses
126   ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-gnutls