PKGBUILDs/community/opendht/PKGBUILD

59 lines
1.7 KiB
Bash
Raw Normal View History

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
buildarch=26
2018-02-08 00:34:26 +00:00
pkgname=opendht
epoch=1
2021-10-19 00:34:06 +00:00
pkgver=2.3.1
pkgrel=1
2020-10-02 01:53:18 +00:00
pkgdesc="C++14 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)
2021-10-19 00:34:06 +00:00
depends=(glibc gnutls nettle readline argon2 jsoncpp libjsoncpp.so fmt http-parser openssl)
makedepends=(cmake msgpack-c msgpack-cxx asio restinio cython python-setuptools cppunit)
2019-04-14 22:29:34 +00:00
optdepends=('python: to use the Python bindings')
2021-07-13 12:41:31 +00:00
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
opendht-gcc11.patch)
2021-10-19 00:34:06 +00:00
sha256sums=('9a75db4f119761d6524964b27d3a49aa809a6cb08bde963edc2f338458433c78'
2021-07-13 12:41:31 +00:00
'4cd9ee51b3da01f00b0eb4367c48fb3a00df0840d5cf7beafaabcd149c8bd0fc')
prepare() {
2021-10-19 00:34:06 +00:00
# https://github.com/savoirfairelinux/opendht/pull/567
patch -d ${pkgname}-${pkgver} -p1 < opendht-gcc11.patch
2021-07-13 12:41:31 +00:00
}
2018-02-08 00:34:26 +00:00
build() {
2020-12-22 01:31:14 +00:00
cmake -B build -S ${pkgname}-${pkgver} \
2018-04-13 00:04:18 +00:00
-DCMAKE_BUILD_TYPE=None \
2019-02-04 14:54:09 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
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_STATIC=OFF \
-DOPENDHT_SYSTEMD=ON \
2020-10-02 01:53:18 +00:00
-DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system/ \
2018-02-08 00:34:26 +00:00
-DOPENDHT_LTO=OFF \
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 \
2019-02-04 14:54:09 +00:00
-DOPENDHT_PUSH_NOTIFICATIONS=ON
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
}