summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 196464a329347138580d9e7d0bbcacbf7f545158 (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
# Maintainer: Oleksandr Natalenko aka post-factum <oleksandr@natalenko.name>
pkgname=pingtcp
pkgver=0.0.2
pkgrel=2
pkgdesc="Small utility to measure TCP handshake time (torify-friendly)"
url="https://github.com/LanetNetwork/pingtcp"
arch=('i686' 'x86_64')
license=('GPLv3')
depends=('glibc' 'gcc-libs')
optdepends=('gperftools: for libtcmalloc' 'torsocks: for TOR support')
makedepends=('cmake' 'git' 'make')
source=(${pkgname}::git+https://github.com/LanetNetwork/pingtcp.git)

md5sums=('SKIP')

build() {
	cd ${srcdir}/${pkgname}
	git submodule init
	git submodule update
	mkdir -p build
	cd build
	cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr ..
	# Detect CPUs count automatically
	CPUS_COUNT=$(nproc)
	echo "Compiling using $CPUS_COUNT thread(s)"
	make -j$CPUS_COUNT
}

package() {
	cd ${srcdir}/${pkgname}/build
	make install
}