jobcore/curl/PKGBUILD-arch

124 lines
3.6 KiB
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
# Maintainer: 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>
pkgbase=curl
pkgname=(curl libcurl-compat libcurl-gnutls)
2022-12-21 21:09:15 +01:00
pkgver=7.87.0
pkgrel=1
2022-03-20 13:19:37 +01:00
pkgdesc='An URL retrieval utility and library'
arch=('x86_64')
url='https://curl.haxx.se'
license=('MIT')
options=('debug')
depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so'
'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so'
'openssl' 'zlib' 'zstd' 'libzstd.so')
2022-09-12 23:24:07 +02:00
makedepends=('patchelf')
2022-03-20 13:19:37 +01:00
provides=('libcurl.so')
2022-12-21 21:09:15 +01:00
source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc})
sha512sums=('939be5a7d82f7ed4e96173639aa50f5e6748b387d3f458f3845c584ad24d15d77b8cd64f4f2dc11bcc207b097d125d1dc713a9769964e3d4766182a217e9898d'
'SKIP')
2022-03-20 13:19:37 +01:00
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
_configure_options=(
--prefix='/usr'
--mandir='/usr/share/man'
--disable-ldap
--disable-ldaps
--disable-manual
--enable-ipv6
--enable-threaded-resolver
--with-gssapi
--with-libssh2
--with-random='/dev/urandom'
--with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
)
build() {
mkdir build-curl{,-compat,-gnutls}
# build curl
cd "${srcdir}"/build-curl
"${srcdir}/${pkgbase}-${pkgver}"/configure \
"${_configure_options[@]}" \
2022-10-27 06:18:57 +02:00
--with-openssl \
2022-03-20 13:19:37 +01:00
--enable-versioned-symbols
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
# build libcurl-compat
cd "${srcdir}"/build-curl-compat
"${srcdir}/${pkgbase}-${pkgver}"/configure \
"${_configure_options[@]}" \
2022-10-27 06:18:57 +02:00
--with-openssl \
2022-03-20 13:19:37 +01:00
--disable-versioned-symbols
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make -C lib
# build libcurl-gnutls
cd "${srcdir}"/build-curl-gnutls
"${srcdir}/${pkgbase}-${pkgver}"/configure \
"${_configure_options[@]}" \
--disable-versioned-symbols \
2022-10-27 06:18:57 +02:00
--without-openssl \
--with-gnutls
2022-03-20 13:19:37 +01:00
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make -C lib
2022-09-12 23:24:07 +02:00
patchelf --set-soname 'libcurl-gnutls.so.4' ./lib/.libs/libcurl.so
2022-03-20 13:19:37 +01:00
}
package_curl() {
cd build-curl
make DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install -C scripts
cd "${srcdir}/${pkgname}-${pkgver}"
# license
install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING
}
package_libcurl-compat() {
pkgdesc='An URL retrieval library (without versioned symbols)'
depends=('curl' 'openssl')
cd "${srcdir}"/build-curl-compat
make -C lib DESTDIR="${pkgdir}" install
2022-04-27 12:23:36 +02:00
mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.8.0
2022-03-20 13:19:37 +01:00
rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
2022-04-27 12:23:36 +02:00
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
ln -s libcurl-compat.so.4.8.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
2022-03-20 13:19:37 +01:00
done
install -dm 0755 "${pkgdir}"/usr/share/licenses
ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-compat
}
package_libcurl-gnutls() {
pkgdesc='An URL retrieval library (without versioned symbols and linked against gnutls)'
depends=('curl' 'gnutls')
cd "${srcdir}"/build-curl-gnutls
make -C lib DESTDIR="${pkgdir}" install
2022-04-27 12:23:36 +02:00
mv "${pkgdir}"/usr/lib/libcurl{,-gnutls}.so.4.8.0
2022-03-20 13:19:37 +01:00
rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
2022-09-12 23:24:07 +02:00
ln -s libcurl-gnutls.so.4 "${pkgdir}"/usr/lib/libcurl-gnutls.so
2022-04-27 12:23:36 +02:00
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
ln -s libcurl-gnutls.so.4.8.0 "${pkgdir}"/usr/lib/libcurl-gnutls.so.${version}
2022-03-20 13:19:37 +01:00
done
install -dm 0755 "${pkgdir}"/usr/share/licenses
ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-gnutls
}