Last active
November 24, 2021 19:52
-
-
Save japm48/c6df10fcd7e84b76dac2c7d18beb0561 to your computer and use it in GitHub Desktop.
libsigmf-git workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: xiretza <xiretza+aur@xiretza.xyz> | |
_pkgname=libsigmf | |
pkgname=$_pkgname-git | |
pkgver=r15.d3e985d | |
pkgrel=1 | |
pkgdesc="A header-only C++ library for working with SigMF metadata" | |
arch=(any) | |
url="https://github.com/deepsig/libsigmf" | |
license=('Apache') | |
depends=() | |
makedepends=('cmake' 'git' 'flatbuffers' 'nlohmann-json') | |
provides=("$_pkgname") | |
conflicts=("$_pkgname") | |
source=("git+$url.git" | |
"0001-cmake-fix-installation-of-fbs-files.patch" | |
) | |
sha256sums=('SKIP' | |
'03012d41f55c1a2f7a61f952c79d14e80bba1f2ee508d77a3d94fe78f3ab394c') | |
pkgver() { | |
cd "$_pkgname" | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
prepare() { | |
cd "$_pkgname" | |
patch -p1 < "$srcdir/0001-cmake-fix-installation-of-fbs-files.patch" | |
} | |
build() { | |
rm $_pkgname/sigmf_protocols/*.h | |
cmake -B build -S "$_pkgname" \ | |
-Wno-dev \ | |
-DCMAKE_BUILD_TYPE='None' \ | |
-DUSE_SYSTEM_FLATBUFFERS=ON \ | |
-DUSE_SYSTEM_JSON=ON \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -C build | |
cp build/include/*.h $_pkgname/sigmf_protocols/ | |
} | |
package() { | |
make -C build DESTDIR="$pkgdir/" install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment