PKGBUILDs/community/opendht/PKGBUILD

58 lines
1.8 KiB
Bash
Raw Normal View History

2018-02-08 00:34:26 +00:00
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
2019-02-04 14:54:09 +00:00
# Maintainer: Bruno Pagani <archange@archlinux.org>
2018-02-08 00:34:26 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set -DOPENDHT_LTO=OFF
2018-03-31 23:37:54 +00:00
# - explicitly link v5/v6 with libatomic
2018-02-08 00:34:26 +00:00
pkgname=opendht
epoch=1
2020-12-22 01:31:14 +00:00
pkgver=2.1.9.5
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)
2020-10-02 01:53:18 +00:00
depends=(openssl gnutls nettle argon2 readline fmt http-parser jsoncpp libjsoncpp.so)
makedepends=(msgpack-c cmake cython cppunit restinio)
2019-04-14 22:29:34 +00:00
optdepends=('python: to use the Python bindings')
2020-12-22 01:31:14 +00:00
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
${pkgname}-fix-systemd-makedep.patch::${url}/pull/535.patch)
sha256sums=('74eb58f0589577a9df378772f1dd2edc1c3f1b16a045057c3bcb120d2c16403f'
'7774b345aa48f948bb0dcca3cd4341da53b8a0df8f8ba96440e9a0b0776e40e9')
2019-02-04 14:54:09 +00:00
prepare() {
2020-12-22 01:31:14 +00:00
cd ${pkgname}-${pkgver}
patch -Np1 -i ../${pkgname}-fix-systemd-makedep.patch
2019-02-04 14:54:09 +00:00
}
2018-02-08 00:34:26 +00:00
build() {
2020-12-22 01:31:14 +00:00
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(opendht PRIVATE atomic)" >> ${pkgname}-${pkgver}/CMakeLists.txt
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_TESTS=ON \
-DOPENDHT_DOCUMENTATION=OFF \
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 \
2018-04-13 00:04:18 +00:00
-DOPENDHT_TOOLS=ON \
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
}
2020-10-02 01:53:18 +00:00
#check() {
2020-12-22 01:31:14 +00:00
# make -C build test
2020-10-02 01:53:18 +00:00
#}
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
}