diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 68 |
1 files changed, 39 insertions, 29 deletions
@@ -1,47 +1,57 @@ # Maintainer: dr460nf1r3 <dr460nf1r3 at garudalinux dot org> +# Maintainer: Antoine Viallon <antoine@lesviallon.fr> -pkgname=ananicy-cpp-git _pkgname=ananicy-cpp -pkgver=1.0.0.rc1.r0.g73390d2 +pkgname=ananicy-cpp-git +pkgver=1.1.0.r5.gddbb795 pkgrel=1 pkgdesc="Ananicy Cpp is a full rewrite of Ananicy in C++, featuring lower CPU and RAM usage." -source=("git+https://gitlab.com/aviallon/ananicy-cpp.git") -md5sums=('SKIP') arch=(x86_64 i386 armv7h) -depends=(fmt spdlog nlohmann-json systemd) -makedepends=(cmake git gcc) -conflicts=(ananicy-cpp) -provides=(ananicy-cpp) -optdepends=("ananicy-rules-git: community rules") +url="https://gitlab.com/ananicy-cpp/ananicy-cpp.git" +license=('GPL3') +depends=(fmt systemd libelf zlib libbpf) +makedepends=(cmake ninja clang git nlohmann-json bpf) +optdepends=("ananicy-rules-git: community rules" + "ananicy-rules: Rules based for ananicy-cpp") +source=("${_pkgname}::git+https://gitlab.com/ananicy-cpp/ananicy-cpp.git") +sha512sums=('SKIP') +provides=('ananicy-cpp') +conflicts=('ananicy-cpp') pkgver() { - cd "$_pkgname" - git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' -} + cd "${srcdir}/${_pkgname}" -prepare() { - cd "$_pkgname" - mkdir -p build - cd build - - cmake .. \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DUSE_EXTERNAL_SPDLOG=ON \ - -DUSE_EXTERNAL_JSON=ON \ - -DUSE_EXTERNAL_FMTLIB=ON + git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "$_pkgname/build" - cmake --build . + cd "${srcdir}/${_pkgname}" + + _cpuCount=$(grep -c -w ^processor /proc/cpuinfo) + + export CFLAGS="${CFLAGS}" + export CXXFLAGS="${CXXFLAGS}" + export LDFLAGS="${LDFLAGS}" + + # disable system spdlog + cmake -S . -Bbuild \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_EXTERNAL_SPDLOG=OFF \ + -DUSE_EXTERNAL_JSON=ON \ + -DUSE_BPF_PROC_IMPL=ON \ + -DBPF_BUILD_LIBBPF=OFF \ + -DUSE_EXTERNAL_FMTLIB=ON + + cmake --build build --target ananicy-cpp --parallel $_cpuCount } package() { - cd "$_pkgname/build" - export DESTDIR="$pkgdir" - cmake --install . + cd "${srcdir}/${_pkgname}" + DESTDIR="${pkgdir}" cmake --install build --component Runtime - install -m755 -d "$pkgdir/etc/ananicy.d" + install -m755 -d "${pkgdir}/etc/ananicy.d" } +# vim:set sw=2 sts=2 et: |