summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladislav Nepogodin2022-12-28 00:37:52 +0400
committerVladislav Nepogodin2022-12-28 00:37:52 +0400
commit3bcf96a268540b02c4b9ef6a7fe6f176012cd4ab (patch)
tree6e89645823a14335a226cf362891e4d524dcd160
parent8aa46c9370541ba56458ffc9ca9f3f04f6f8f307 (diff)
downloadaur-3bcf96a268540b02c4b9ef6a7fe6f176012cd4ab.tar.gz
cleanup pkgbuild & expose compiler/linker flags
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD75
2 files changed, 49 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8b5efcd19392..8e217814b592 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,14 @@
pkgbase = ananicy-cpp-git
pkgdesc = Ananicy Cpp is a full rewrite of Ananicy in C++, featuring lower CPU and RAM usage.
- pkgver = 1.0.0.rc7.r60.g35cab20
+ pkgver = 1.0.1.r12.gcafb692
pkgrel = 1
url = https://gitlab.com/ananicy-cpp/ananicy-cpp.git
arch = x86_64
arch = i386
arch = armv7h
+ license = GPLv3
makedepends = cmake
+ makedepends = ninja
makedepends = clang
makedepends = git
makedepends = nlohmann-json
@@ -22,9 +24,10 @@ pkgbase = ananicy-cpp-git
optdepends = ananicy-rules: Rules based for ananicy-cpp
provides = ananicy-cpp
conflicts = ananicy-cpp
- source = git+https://gitlab.com/ananicy-cpp/ananicy-cpp.git
+ options = !strip
+ source = ananicy-cpp::git+https://gitlab.com/ananicy-cpp/ananicy-cpp.git
source = git+https://gitlab.com/vnepogodin/std-format.git
- md5sums = SKIP
- md5sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
pkgname = ananicy-cpp-git
diff --git a/PKGBUILD b/PKGBUILD
index 12058af9759f..7b6a940a8317 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,57 +1,66 @@
# Maintainer: dr460nf1r3 <dr460nf1r3 at garudalinux dot org>
# Maintainer: Antoine Viallon <antoine@lesviallon.fr>
-pkgname=ananicy-cpp-git
_pkgname=ananicy-cpp
-pkgver=1.0.0.rc7.r60.g35cab20
+pkgname=ananicy-cpp-git
+pkgver=1.0.1.r12.gcafb692
pkgrel=1
pkgdesc="Ananicy Cpp is a full rewrite of Ananicy in C++, featuring lower CPU and RAM usage."
-url="https://gitlab.com/ananicy-cpp/ananicy-cpp.git"
-source=(
- "git+https://gitlab.com/ananicy-cpp/ananicy-cpp.git"
- "git+https://gitlab.com/vnepogodin/std-format.git"
-)
-md5sums=('SKIP'
- 'SKIP')
arch=(x86_64 i386 armv7h)
+url="https://gitlab.com/ananicy-cpp/ananicy-cpp.git"
+license=('GPLv3')
depends=(fmt spdlog nlohmann-json systemd libelf zlib libbpf)
-makedepends=(cmake clang git nlohmann-json bpf)
-conflicts=(ananicy-cpp)
-provides=(ananicy-cpp)
+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"
+ "git+https://gitlab.com/vnepogodin/std-format.git")
+sha512sums=('SKIP'
+ 'SKIP')
+provides=('ananicy-cpp')
+conflicts=('ananicy-cpp')
+options=(!strip)
+
pkgver() {
- cd "$_pkgname"
+ cd "${srcdir}/${_pkgname}"
+
git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- cd "$_pkgname"
-
- git submodule init
- git config submodule."external/std-format".url "${srcdir}/std-format"
- git -c protocol.file.allow=always submodule update
-
- cmake -B build -S . \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DUSE_EXTERNAL_SPDLOG=ON \
- -DUSE_EXTERNAL_JSON=ON \
- -DUSE_BPF_PROC_IMPL=ON \
- -DBPF_BUILD_LIBBPF=OFF \
- -DUSE_EXTERNAL_FMTLIB=ON
+ cd "${_pkgname}"
+
+ export CFLAGS="${CFLAGS}"
+ export CXXFLAGS="${CXXFLAGS}"
+ export LDFLAGS="${LDFLAGS}"
+
+ git submodule init
+ git config submodule."external/std-format".url "${srcdir}/std-format"
+ git -c protocol.file.allow=always submodule update
+
+ cmake -S . -Bbuild \
+ -GNinja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_EXTERNAL_SPDLOG=ON \
+ -DUSE_EXTERNAL_JSON=ON \
+ -DUSE_BPF_PROC_IMPL=ON \
+ -DBPF_BUILD_LIBBPF=OFF \
+ -DUSE_EXTERNAL_FMTLIB=ON
}
build() {
- cd "$_pkgname"
- cmake --build build --target ananicy-cpp
+ cd "${srcdir}/${_pkgname}"
+
+ _cpuCount=$(grep -c -w ^processor /proc/cpuinfo)
+ cmake --build build --target ananicy-cpp --parallel $_cpuCount
}
package() {
- cd "$_pkgname"
- export DESTDIR="$pkgdir"
- cmake --install build --component Runtime
+ 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: