3.89.1-1
[arch-packages.git] / libutp / repos / extra-x86_64 / PKGBUILD
blob853b0f72c3aad55055c6922f71ecd76e553f1b69
1 # Maintainer:
2 # Contributor: Solomon Choina <shlomochoina@gmail.com>
4 pkgname=libutp
5 pkgver=r99.fda9f4b
6 pkgrel=1
7 _commit=fda9f4b3db97ccb243fcbed2ce280eb4135d705b
8 pkgdesc='uTorrent Transport Protocol library'
9 url='https://github.com/bittorrent/libutp'
10 makedepends=(git cmake)
11 depends=()
12 arch=(x86_64)
13 license=('custom:Public Domain')
14 source=(git+https://github.com/transmission/libutp.git#commit=$_commit)
15 sha256sums=('SKIP')
17 pkgver(){
18  cd libutp
19  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
22 build() {
23   cmake -B build -S libutp \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DLIBUTP_BUILD_PROGRAMS=OFF \
26     -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects"
27   cmake --build build
30 package() {
31   DESTDIR="$pkgdir" cmake --install build
32   install -Dm644 libutp/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname