[arch-commits] Commit in curl/trunk (PKGBUILD)
Christian Hesse
eworm at gemini.archlinux.org
Tue Mar 1 17:13:46 UTC 2022
Date: Tuesday, March 1, 2022 @ 17:13:45
Author: eworm
Revision: 438262
upgpkg: curl 7.81.0-3: make libcurl-compat & libcurl-gnutls split packages
Modified:
curl/trunk/PKGBUILD
----------+
PKGBUILD | 102 +++++++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 82 insertions(+), 20 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-01 11:08:26 UTC (rev 438261)
+++ PKGBUILD 2022-03-01 17:13:45 UTC (rev 438262)
@@ -4,9 +4,10 @@
# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-pkgname=curl
+pkgbase=curl
+pkgname=(curl libcurl-compat libcurl-gnutls)
pkgver=7.81.0
-pkgrel=2
+pkgrel=3
pkgdesc='An URL retrieval utility and library'
arch=('x86_64')
url='https://curl.haxx.se'
@@ -21,31 +22,56 @@
'SKIP')
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-openssl
+ --with-random='/dev/urandom'
+ --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
+)
+
build() {
- mkdir build
- cd build
+ mkdir build-curl{,-compat,-gnutls}
- "${srcdir}/${pkgname}-${pkgver}"/configure \
- --prefix='/usr' \
- --mandir='/usr/share/man' \
- --disable-ldap \
- --disable-ldaps \
- --disable-manual \
- --enable-ipv6 \
- --enable-versioned-symbols \
- --enable-threaded-resolver \
- --with-gssapi \
- --with-libssh2 \
- --with-openssl \
- --with-random='/dev/urandom' \
- --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
+ # build curl
+ cd "${srcdir}"/build-curl
+ "${srcdir}/${pkgbase}-${pkgver}"/configure \
+ "${_configure_options[@]}" \
+ --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[@]}" \
+ --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 \
+ --without-ssl \
+ --with-gnutls='/usr'
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make -C lib
}
-package() {
- cd build
+package_curl() {
+ cd build-curl
make DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install -C scripts
@@ -55,3 +81,39 @@
# 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
+
+ mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.7.0
+ rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
+ 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; do
+ ln -s libcurl-compat.so.4.7.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
+ 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
+
+ mv "${pkgdir}"/usr/lib/libcurl{,-gnutls}.so.4.7.0
+ rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
+ 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; do
+ ln -s libcurl-gnutls.so.4.7.0 "${pkgdir}"/usr/lib/libcurl-gnutls.so.${version}
+ done
+
+ install -dm 0755 "${pkgdir}"/usr/share/licenses
+ ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-gnutls
+}
More information about the arch-commits
mailing list