summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd62d4284db0e5ad2a33801af98bc02b87ab5154 (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
# Maintainer: sum01 <sum01@protonmail.com>
pkgname=cpp-httplib
pkgver=0.6.6
pkgrel=2
pkgdesc='A C++ header-only HTTP/HTTPS server and client library'
arch=('any')
url='https://github.com/yhirose/cpp-httplib'
license=('MIT')
makedepends=('cmake>=3.12')
optdepends=('openssl>=1.1.1: https support' 'zlib: compression support')
source=("$pkgname-$pkgver.tar.gz::https://github.com/yhirose/cpp-httplib/archive/v$pkgver.tar.gz")
sha512sums=('89e58e84da1c3f55e55d59a48c3be1c7b63f0c7c589f38c7ed9fbbc50fc1abf6199429500e1d8226218a9db0d405ce17dddbfdda45cf2464bd7eefbff8d62b7c')
build() {
	mkdir -p "$srcdir/$pkgname-$pkgver/build"
	cd "$srcdir/$pkgname-$pkgver/build"
	cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
	cmake --build .
}
package() {
	cd "$srcdir/$pkgname-$pkgver/build"
	cmake --build . --target install DESTDIR="$pkgdir"
	install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 '../README.md' "$pkgdir/usr/share/doc/$pkgname/README.md"
}