2019-02-04 14:54:09 +00:00
|
|
|
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
2021-10-19 00:34:06 +00:00
|
|
|
# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
|
2018-02-08 00:34:26 +00:00
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - set -DOPENDHT_LTO=OFF
|
2021-10-19 00:34:06 +00:00
|
|
|
# - move cppunit to makedepends from checkdepends
|
|
|
|
|
2018-02-08 00:34:26 +00:00
|
|
|
pkgname=opendht
|
|
|
|
epoch=1
|
2024-09-15 10:28:43 +00:00
|
|
|
pkgver=3.2.0
|
|
|
|
pkgrel=1
|
2022-06-30 12:45:39 +00:00
|
|
|
pkgdesc="C++17 Distributed Hash Table (DHT) implementation"
|
2019-04-14 22:29:34 +00:00
|
|
|
arch=(x86_64)
|
2018-02-08 00:34:26 +00:00
|
|
|
url="https://github.com/savoirfairelinux/opendht"
|
2019-04-14 22:29:34 +00:00
|
|
|
license=(GPL3)
|
2024-09-15 10:28:43 +00:00
|
|
|
depends=(glibc gnutls nettle readline argon2 jsoncpp libjsoncpp.so fmt openssl llhttp)
|
|
|
|
makedepends=(git cmake msgpack-cxx restinio asio cython python-setuptools cppunit)
|
2022-03-18 23:29:18 +00:00
|
|
|
optdepends=('python: to use the Python bindings'
|
|
|
|
'msgpack-cxx: linking against opendht')
|
2024-09-15 10:28:43 +00:00
|
|
|
source=(git+${url}#tag=v$pkgver
|
|
|
|
llhttp.patch)
|
|
|
|
sha256sums=('12f71503ba7253ca5545676ffed7a6fea9497e0227c9e2112d1901b7c8a63412'
|
|
|
|
'0f0b394656f719508ea83dd3ea87b08245fa1413a91e50a144dede20b2e3ca22')
|
2021-07-13 12:41:31 +00:00
|
|
|
|
2024-09-15 10:28:43 +00:00
|
|
|
prepare() {
|
|
|
|
patch -d $pkgname -p1 < llhttp.patch # Fix llhttp lib name
|
2021-07-13 12:41:31 +00:00
|
|
|
}
|
2018-02-08 00:34:26 +00:00
|
|
|
|
|
|
|
build() {
|
2021-11-13 19:05:22 +00:00
|
|
|
cmake -B build -S ${pkgname} \
|
2019-02-04 14:54:09 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2018-04-13 00:04:18 +00:00
|
|
|
-DOPENDHT_DOCUMENTATION=OFF \
|
2021-10-19 00:34:06 +00:00
|
|
|
-DOPENDHT_TESTS=ON \
|
2018-02-08 00:34:26 +00:00
|
|
|
-DOPENDHT_SYSTEMD=ON \
|
2020-10-02 01:53:18 +00:00
|
|
|
-DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system/ \
|
2019-03-26 18:44:33 +00:00
|
|
|
-DOPENDHT_INDEX=ON \
|
2018-02-08 00:34:26 +00:00
|
|
|
-DOPENDHT_PYTHON=ON \
|
2020-10-02 01:53:18 +00:00
|
|
|
-DOPENDHT_HTTP=ON \
|
2018-02-08 00:34:26 +00:00
|
|
|
-DOPENDHT_PROXY_SERVER=ON \
|
|
|
|
-DOPENDHT_PROXY_CLIENT=ON \
|
2021-11-13 19:05:22 +00:00
|
|
|
-DOPENDHT_PUSH_NOTIFICATIONS=ON \
|
|
|
|
-DOPENDHT_LTO=OFF
|
2020-12-22 01:31:14 +00:00
|
|
|
make -C build
|
2018-02-08 00:34:26 +00:00
|
|
|
}
|
|
|
|
|
2021-10-19 00:34:06 +00:00
|
|
|
check() {
|
|
|
|
# https://github.com/savoirfairelinux/opendht/issues/568
|
|
|
|
make -C build test || echo "Tests failed"
|
|
|
|
}
|
2018-04-13 00:04:18 +00:00
|
|
|
|
2018-02-08 00:34:26 +00:00
|
|
|
package() {
|
2020-12-22 01:31:14 +00:00
|
|
|
make -C build DESTDIR="${pkgdir}" install
|
2018-02-08 00:34:26 +00:00
|
|
|
}
|