summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 511cd1e8c26fd5e42604963c3f35171868d7d6ed (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Florian Maunier <fmauneko@dissidence.ovh>

pkgname=msquic
pkgver=2.4.5
pkgrel=1
epoch=1
pkgdesc="Microsoft implementation of the IETF QUIC protocol"
arch=(x86_64 armv7h aarch64)
url="https://github.com/microsoft/msquic"
license=(MIT)
depends=(glibc numactl)
makedepends=(cmake git)
provides=(libmsquic.so)
conflicts=(libmsquic.so)
source=("git+https://github.com/microsoft/msquic.git#tag=v${pkgver}"
        "git+https://github.com/google/googletest.git"
        "quictls-openssl::git+https://github.com/quictls/openssl.git"
        "git+https://github.com/microsoft/CLOG.git")
sha512sums=('e988d30adad37b79d9d2360297278e005c8301fdbb295716470c473a5f8cfb46c0a57420d6084bd0b41bd98b490b48ab1815e269592b317d047b27f0a6356a8c'
            'SKIP'
            'SKIP'
            'SKIP')

prepare() {
  cd "msquic"
  git submodule init
  git config submodule.submodules/googletest.url "${srcdir}/googletest"
  #git config submodule.submodules/openssl.url "${srcdir}/quictls-openssl"
  git config submodule.submodules/openssl.update none
  git config submodule.submodules/openssl3.url "${srcdir}/quictls-openssl"
  git config submodule.submodules/clog.url "${srcdir}/CLOG"
  git config submodule.submodules/xdp-for-windows.update none
  git -c protocol.file.allow=always submodule update
}

build() {
  cmake -B build -S "msquic" -Wno-dev \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DQUIC_TLS=openssl3 \
    -DCMAKE_SKIP_INSTALL_RPATH=YES \
    -DQUIC_BUILD_TEST=NO

  cmake --build build

#    -DQUIC_USE_SYSTEM_LIBCRYPTO=ON \
#CMake Error at submodules/CMakeLists.txt:349 (message):
#  OpenSSL 3.0 not found, found 3.2.0
}

check() {
  #ctest --test-dir build --output-on-failure || true
  true
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -D -m644 "msquic/LICENSE" -t "$pkgdir/usr/share/licenses/${pkgname}"
}