blob: 1a5b7d829f3bdee66eadca9256be6bc048bee344 (
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
70
71
72
73
74
75
76
77
78
79
|
# Maintainer: Hendrik 'T4cC0re' Meyer <aur@t4cc0.re>
pkgname=curl-http3
pkgver=7.73.0
pkgrel=1
pkgdesc="An URL retrieval utility and library - compiled with HTTP/3 support - binary is called curl3"
arch=('x86_64')
url="https://curl.haxx.se"
license=('MIT')
depends=('ca-certificates' 'openssl' 'zlib' 'libpsl' 'libnghttp2'
'libidn2' 'libidn2.so')
makedepends=('rust' 'git' 'go' 'cmake')
source=("https://curl.haxx.se/download/curl-$pkgver.tar.gz"{,.asc})
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
#source=("curl-$pkgver.zip::https://github.com/curl/curl/archive/master.zip")
# Master as of 2020-10-14 (7.73.0 release day)
_quiche_ref=107a054b73bb4d381931dbc46aecccbb1801d91a
build(){
rm -rf quiche
## Build quiche
mkdir quiche
cd quiche
git init
git remote add origin https://github.com/cloudflare/quiche.git
git fetch --depth 1 origin ${_quiche_ref}
git checkout FETCH_HEAD
git submodule update --init --recursive
cargo build --release --features pkg-config-meta,qlog
mkdir deps/boringssl/src/lib
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) deps/boringssl/src/lib/
cd ..
## Build curl
cd "curl-${pkgver}"
./buildconf
## Arch Linux build flags + BoringSSL and quiche
./configure \
LDFLAGS="-Wl,-rpath,${PWD}/../quiche/target/release" \
--with-ssl=$PWD/../quiche/deps/boringssl/src \
--with-quiche=$PWD/../quiche/target/release \
--enable-alt-svc \
--prefix=/usr \
--mandir=/usr/share/man \
--disable-ldap \
--disable-ldaps \
--disable-manual \
--disable-shared \
--enable-ipv6 \
--enable-threaded-resolver \
--with-random=/dev/urandom \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
make
}
package() {
cd "curl-${pkgver}"
# cd "curl-master"
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install -C scripts
# license
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
cd ..
# rename curl to avoid conflicts
mv "${pkgdir}/usr/bin/curl" "${pkgdir}/usr/bin/curl3"
mv "${pkgdir}/usr/bin/curl-config" "${pkgdir}/usr/bin/curl-config3"
# Remove stuff that would conflict with core/curl
rm -rf "${pkgdir}/usr/lib" "${pkgdir}/usr/share" "${pkgdir}/usr/include"
# libquice is requried
install -Dm755 quiche/target/release/libquiche.so "${pkgdir}/usr/lib/libquiche.so"
}
sha512sums=(86996f7ce537cfc39be18a6a93af0524c7a878d9e003ce0106eb4ff6ce2dea99da1cb9af297b87f93b204b42a3d793198a6e01764aa2a06f5b6fe0623b008f88 SKIP)
|