summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c192875c7e8eda2f2107871018d5a9f616439fd (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
# Maintainer: otreblan <otreblain@gmail.com>

pkgname=trantor
pkgver=1.5.11
pkgrel=2
pkgdesc='A non-blocking I/O tcp network lib based on c++14/17'
arch=('x86_64')
url="https://github.com/an-tao/trantor"
license=('BSD')
depends=('c-ares' 'openssl' 'gcc-libs')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('3cff9653380f65acaa6ffa191620a2783e866a4552c3408a6919759ce4cfc1dc')

prepare() {
	cd "$srcdir/$pkgname-$pkgver/"

	sed -i "s/algorithm>/&\n#include <cstdint>/" trantor/utils/MsgBuffer.h
	sed -i "s/string>/&\n#include <cstdint>/" trantor/utils/Utilities.h
}

build() {
	cmake -B build -S "$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=ON

	cmake --build build
}

package() {
	install -Dm644 "$pkgname-$pkgver/License" "$pkgdir/usr/share/licenses/$pkgname/License"

	DESTDIR="$pkgdir" cmake --install build
}