aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD91
-rw-r--r--README.md41
4 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..642a62bdb5ee
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = curl-quiche-http3
+ pkgdesc = An URL retrieval utility and library - build with quiche version HTTP3
+ pkgver = 7.76.0
+ pkgrel = 1
+ url = https://curl.haxx.se
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = rust
+ makedepends = cmake
+ depends = ca-certificates
+ depends = krb5
+ depends = libssh2
+ depends = libssh2.so
+ depends = openssl
+ depends = zlib
+ depends = libpsl
+ depends = libpsl.so
+ depends = libnghttp2
+ depends = libidn2
+ depends = libidn2.so
+ depends = zstd
+ depends = curl
+ source = https://curl.haxx.se/download/curl-7.76.0.tar.gz
+ source = https://curl.haxx.se/download/curl-7.76.0.tar.gz.asc
+ validpgpkeys = 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2
+ sha512sums = f074e9315739bb05fc194ef66b154912620df3ddec11c01ded8f2ecde08875006418a716919dafe5001256f912c07e5576072e1df9a683f91cd3bc8143c6f054
+ sha512sums = SKIP
+
+pkgname = curl-quiche-http3
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0760b049f07e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/src/
+/*.tar.*
+/pkg/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2a5c8397b834
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,91 @@
+# Maintainer: vkill <vkill.net@gmail.com>
+
+pkgname=curl-quiche-http3
+pkgver=7.76.0
+pkgrel=1
+pkgdesc="An URL retrieval utility and library - build with quiche version HTTP3"
+arch=('x86_64')
+url="https://curl.haxx.se"
+license=('MIT')
+depends=('ca-certificates' 'krb5' 'libssh2' 'libssh2.so' 'openssl' 'zlib'
+ 'libpsl' 'libpsl.so' 'libnghttp2' 'libidn2' 'libidn2.so' 'zstd'
+ 'curl')
+makedepends=('git' 'rust' 'cmake')
+source=("https://curl.haxx.se/download/curl-$pkgver.tar.gz"{,.asc})
+sha512sums=('f074e9315739bb05fc194ef66b154912620df3ddec11c01ded8f2ecde08875006418a716919dafe5001256f912c07e5576072e1df9a683f91cd3bc8143c6f054'
+ 'SKIP')
+validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
+
+# 2020-03-29
+_quiche_ref="ba90a8dba514c953d6102b812096f9238ec170bb"
+
+build() {
+ #
+ rm -rf 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 --depth 1 --recursive
+
+ sed -i -e 's/^name = "quiche"/name = "curl_quiche"/' Cargo.toml
+ cargo build --release --features ffi,pkg-config-meta,qlog
+ mv target/release/quiche.pc target/release/curl_quiche.pc
+ sed -i -e 's/ -lquiche$/ -lcurl_quiche/' target/release/curl_quiche.pc
+ mkdir deps/boringssl/src/lib
+ ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) deps/boringssl/src/lib/
+
+ cd ..
+
+ #
+ cd "curl-$pkgver"
+
+ sed -i -e 's/(quiche,/(curl_quiche,/' configure.ac
+ sed -i -e 's/ quiche`/ curl_quiche`/' configure.ac
+
+ ./buildconf
+
+ ./configure \
+ LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-ssl=$PWD/../quiche/deps/boringssl/src --with-curl_quiche=$PWD/../quiche/target/release \
+ --disable-shared \
+ --enable-alt-svc \
+ --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-random=/dev/urandom \
+ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+package() {
+ cd "curl-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install -C scripts
+
+ # license
+ install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
+
+ #
+ cd ..
+
+ mv "${pkgdir}/usr/bin/curl" "${pkgdir}/usr/bin/${pkgname}"
+ mv "${pkgdir}/usr/bin/curl-config" "${pkgdir}/usr/bin/${pkgname}-config"
+
+ #
+ rm -rf "${pkgdir}/usr/lib" "${pkgdir}/usr/share" "${pkgdir}/usr/include"
+
+ #
+ install -Dm755 quiche/target/release/libcurl_quiche.so "${pkgdir}/usr/lib/libcurl_quiche.so"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..17b8772e96d3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+## Curl HTTP3 - quiche version
+
+### Ref
+
+https://github.com/curl/curl/blob/master/docs/HTTP3.md#quiche-version
+
+https://aur.archlinux.org/packages/curl-http3/
+
+### Dev
+
+```
+sudo pacman -S git
+git clone git@github.com:vkill/archlinux-package-curl-quiche-http3.git
+cd archlinux-package-curl-quiche-http3
+
+sudo pacman -S base-devel
+
+sudo pacman -S rustup
+rustup install stable
+# or
+sudo pacman -S rust
+
+sudo pacman -S cmake
+
+gpg --recv-keys 5CC908FDB71E12C2
+
+rm -rf src/
+rm -rf *.tar.*
+rm -rf pkg/
+
+makepkg -f
+
+ldd pkg/curl-quiche-http3/usr/bin/curl-quiche-http3
+pkg/curl-quiche-http3/usr/bin/curl-quiche-http3 --http3 https://quic.aiortc.org/ -v
+```
+
+### Publish
+
+```
+makepkg --printsrcinfo > .SRCINFO
+```