summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d4a9e6d35d6de339d8b3afb53d24b8bb01a3784d (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
# Maintainer: Kasei Wang <kasei@kasei.im>

pkgname=quiche
pkgver=0.4.0
pkgrel=1
pkgdesc='an implementation of the QUIC transport protocol and HTTP/3 as specified by the IETF'
arch=('x86_64')
url='https://github.com/cloudflare/quiche'
license=('custom:BSD')
depends=('gcc-libs')
makedepends=('cmake' 'git' 'go' 'rust')
source=("https://github.com/cloudflare/$pkgname/archive/$pkgver.tar.gz"
		"git+https://boringssl.googlesource.com/boringssl#branch=chromium-stable")
sha256sums=('a74ab9eeb9b836ead6d06f3d4df274c96c4b02b21de22ad4ceda513602db5580'
            'SKIP')
validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491')

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	rm -rf deps/boringssl
	ln -s $srcdir/boringssl deps/boringssl
}

build() {
	cd "$srcdir/$pkgname-$pkgver"
	cargo build --release
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
    mkdir -p $pkgdir/usr/include
	mkdir -p $pkgdir/usr/lib
	mkdir -p $pkgdir/usr/lib/pkgconfig
    mkdir -p $pkgdir/usr/share/licenses/quiche

	install -Dm644 include/quiche.h $pkgdir/usr/include
	install -Dm644 target/release/libquiche.a $pkgdir/usr/lib
	install -Dm755 target/release/libquiche.so $pkgdir/usr/lib
	install -Dm644 /dev/stdin $pkgdir/usr/lib/pkgconfig/quiche.pc <<PC
# quiche

Name: quiche
Description: quiche library
URL: https://github.com/cloudflare/quiche
Version: $pkgver
Libs: -lquiche
PC

    install COPYING $pkgdir/usr/share/licenses/quiche
}