archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / dht / trunk / PKGBUILD
blobdd9604def72adce5d95e558d36049d008a13fc2d
1 # Maintainer: Brett Cornwall <ainola@archlinux.org>
2 # Contributor: Solomon Choina <shlomochoina@gmail.com>
4 pkgname=dht
5 pkgver=0.27
6 pkgrel=4
7 pkgdesc='BitTorrent DHT library'
8 arch=(x86_64)
9 url='https://github.com/jech/dht'
10 license=(MIT)
11 makedepends=(cmake)
12 source=(https://github.com/jech/dht/archive/refs/tags/$pkgname-$pkgver.tar.gz
13         dht-cmake.patch::https://github.com/transmission/dht/commit/b02da598.patch)
14 sha256sums=('caba469a784a5c359c084099fdc025cfe09b1faec2ba9ba257b7384351c43c0a'
15             '91fb75029bf04456bb7fd9c7cc14d544e906d35a309cc8de5be081049aeb7649')
17 prepare() {
18   patch -d dht-dht-$pkgver -p1 < dht-cmake.patch # Add cmake support
21 build() {
22   cmake -B build -S dht-dht-$pkgver \
23     -DCMAKE_INSTALL_PREFIX=/usr \
24     -DCMAKE_INSTALL_INCLUDEDIR=include/dht \
25     -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
26   cmake --build build
29 package() {
30   DESTDIR="$pkgdir" cmake --install build
31   install -Dm644 dht-dht-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE