mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
56 lines
1.6 KiB
Bash
56 lines
1.6 KiB
Bash
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
|
# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - set -DOPENDHT_LTO=OFF
|
|
# - move cppunit to makedepends from checkdepends
|
|
|
|
pkgname=opendht
|
|
epoch=1
|
|
pkgver=2.4.7.2
|
|
pkgrel=1
|
|
pkgdesc="C++17 Distributed Hash Table (DHT) implementation"
|
|
arch=(x86_64)
|
|
url="https://github.com/savoirfairelinux/opendht"
|
|
license=(GPL3)
|
|
depends=(glibc gnutls nettle readline argon2 jsoncpp libjsoncpp.so fmt http-parser openssl)
|
|
makedepends=(git cmake msgpack-cxx asio restinio cython python-setuptools cppunit)
|
|
optdepends=('python: to use the Python bindings'
|
|
'msgpack-cxx: linking against opendht')
|
|
_commit=4d356b6dcaed3ee0280fc2ef31933dd951b9aba7
|
|
source=(git+${url}#commit=${_commit})
|
|
sha256sums=(SKIP)
|
|
|
|
pkgver() {
|
|
cd ${pkgname}
|
|
git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./;s/-/+/'
|
|
}
|
|
|
|
build() {
|
|
cmake -B build -S ${pkgname} \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DOPENDHT_DOCUMENTATION=OFF \
|
|
-DOPENDHT_TESTS=ON \
|
|
-DOPENDHT_STATIC=OFF \
|
|
-DOPENDHT_SYSTEMD=ON \
|
|
-DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system/ \
|
|
-DOPENDHT_INDEX=ON \
|
|
-DOPENDHT_PYTHON=ON \
|
|
-DOPENDHT_HTTP=ON \
|
|
-DOPENDHT_PROXY_SERVER=ON \
|
|
-DOPENDHT_PROXY_CLIENT=ON \
|
|
-DOPENDHT_PUSH_NOTIFICATIONS=ON \
|
|
-DOPENDHT_LTO=OFF
|
|
make -C build
|
|
}
|
|
|
|
check() {
|
|
# https://github.com/savoirfairelinux/opendht/issues/568
|
|
make -C build test || echo "Tests failed"
|
|
}
|
|
|
|
package() {
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
}
|