143 lines
4.5 KiB
Bash
143 lines
4.5 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgbase=curl
|
|
pkgname=(curl libcurl-compat libcurl-gnutls)
|
|
pkgver=7.82.0
|
|
pkgrel=02
|
|
pkgdesc='An URL retrieval utility and library - w/o ipv6 & zstd'
|
|
arch=('x86_64')
|
|
url='https://curl.haxx.se'
|
|
#options=(debug)
|
|
depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so'
|
|
'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so'
|
|
'openssl' 'zlib')
|
|
provides=('libcurl.so')
|
|
|
|
source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc}
|
|
0001-http2-handle-DONE-called-for-the-paused-stream.patch
|
|
0002-http-close-the-stream-not-connection-on-time-conditi.patch
|
|
0003-http2-RST-the-stream-if-we-stop-it-on-our-own-will.patch)
|
|
|
|
|
|
_configure_options=(
|
|
--prefix='/usr'
|
|
--mandir='/usr/share/man'
|
|
--disable-ldap
|
|
--disable-ldaps
|
|
--disable-manual
|
|
--disable-ipv6
|
|
--disable-zstd
|
|
--enable-threaded-resolver
|
|
--with-gssapi
|
|
--with-libssh2
|
|
--with-openssl
|
|
--with-random='/dev/urandom'
|
|
--without-zstd
|
|
--with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
|
|
)
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgbase}-${pkgver}"
|
|
# https://github.com/curl/curl/issues/8626
|
|
patch -Np1 -i ../0001-http2-handle-DONE-called-for-the-paused-stream.patch
|
|
patch -Np1 -i ../0002-http-close-the-stream-not-connection-on-time-conditi.patch
|
|
patch -Np1 -i ../0003-http2-RST-the-stream-if-we-stop-it-on-our-own-will.patch
|
|
}
|
|
|
|
build() {
|
|
mkdir build-curl{,-compat,-gnutls}
|
|
|
|
# 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_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
|
|
|
|
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
|
|
}
|
|
|
|
#---- license gpg-key sha256sums ----
|
|
|
|
license=('MIT')
|
|
|
|
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
|
|
|
|
sha256sums=(910cc5fe279dc36e2cca534172c94364cf3fcf7d6494ba56e6c61a390881ddce # curl-7.82.0.tar.gz
|
|
c1799877d4d45e733f2c88373d5b6399f169133551e8968f131bb8447e673004 # curl-7.82.0.tar.gz.asc
|
|
ee63885393f548166e08a85ce20b21b680cd654ecb26594aad4e5d7f3299c496 # 0001-http2-handle-DONE-called-for-the-paused-stream.patch
|
|
9d93b236d302fc4c8115317139c6d8454d3c76b5ee4767266f8dbcfbf82a61f9 # 0002-http-close-the-stream-not-connection-on-time-conditi.patch
|
|
d3262ade60f214e2bd7b7cb1b705256e69fc7e79e162cc4b6c59dbf5a1b7b987) # 0003-http2-RST-the-stream-if-we-stop-it-on-our-own-will.patch
|