mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-13 00:16:45 +02:00
75 lines
1.7 KiB
Text
75 lines
1.7 KiB
Text
# Contributor: Gavin Henry <ghenry@sentrypeer.org>
|
|
# Maintainer: Gavin Henry <ghenry@sentrypeer.org>
|
|
pkgname=opendht
|
|
pkgver=3.1.11
|
|
pkgrel=0
|
|
pkgdesc="C++17 Distributed Hash Table implementation"
|
|
url="https://github.com/savoirfairelinux/opendht"
|
|
arch="all"
|
|
license="GPL-3.0-or-later"
|
|
makedepends="
|
|
argon2-dev
|
|
asio-dev
|
|
cmake
|
|
cython
|
|
fmt-dev
|
|
gnutls-dev
|
|
http-parser-dev
|
|
jsoncpp-dev
|
|
msgpack-cxx-dev
|
|
nettle-dev
|
|
openssl-dev
|
|
py3-setuptools
|
|
python3-dev
|
|
readline-dev
|
|
restinio-dev
|
|
samurai
|
|
"
|
|
checkdepends="cppunit-dev"
|
|
depends_dev="fmt-dev"
|
|
subpackages="py3-$pkgname:_py3 $pkgname-libs $pkgname-dev $pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/savoirfairelinux/opendht/archive/refs/tags/v$pkgver.tar.gz"
|
|
# tests require a quiet environment or network reads don't match
|
|
options="!check"
|
|
|
|
build() {
|
|
if [ "$CBUILD" != "$CHOST" ]; then
|
|
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
cmake -B build -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBUILD_SHARED_LIBS=True \
|
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
|
-DOPENDHT_C=ON \
|
|
-DOPENDHT_TOOLS=ON \
|
|
-DOPENDHT_PYTHON=ON \
|
|
-DOPENDHT_HTTP=ON \
|
|
-DOPENDHT_PUSH_NOTIFICATIONS=ON \
|
|
-DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \
|
|
$CMAKE_CROSSOPTS .
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
ctest --test-dir build
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
libs() {
|
|
default_libs
|
|
amove usr/lib/libopendht-c.so
|
|
}
|
|
|
|
_py3() {
|
|
pkgdesc="$pkgdesc (python bindings)"
|
|
amove usr/lib/python*
|
|
amove usr/bin/dhtcluster
|
|
}
|
|
|
|
sha512sums="
|
|
266a974047886a06cffacb685ca880bb4c6e4d53ff416c257c14de2cdd02a40b235b7a01e66b0bfef1dd691712d045d6bc44d724f60d897ac70b9c1101294420 opendht-3.1.11.tar.gz
|
|
"
|