summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12024-04-04 16:43:54 +0800
committerChocobo12024-04-04 16:46:57 +0800
commite4d7ecf92f9a578ff0a4d7e93778a2439199d2d6 (patch)
treee8726982ace323a586e8954fd67d6fb5dcf22c37
downloadaur-e4d7ecf92f9a578ff0a4d7e93778a2439199d2d6.tar.gz
newpkg: unittestpp-git 2.0.0.r30.g10e50ad-1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD45
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e2a35d856853
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = unittestpp-git
+ pkgdesc = A lightweight unit testing framework for C++
+ pkgver = 2.0.0.r30.g10e50ad
+ pkgrel = 1
+ url = https://github.com/unittest-cpp/unittest-cpp/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ provides = unittestpp=2.0.0.r30.g10e50ad
+ conflicts = unittestpp
+ options = staticlibs
+ source = git+https://github.com/unittest-cpp/unittest-cpp.git
+ sha256sums = SKIP
+
+pkgname = unittestpp-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..343aaf690aed
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=unittestpp-git
+pkgver=2.0.0.r30.g10e50ad
+pkgrel=1
+pkgdesc="A lightweight unit testing framework for C++"
+arch=('i686' 'x86_64')
+url="https://github.com/unittest-cpp/unittest-cpp/"
+license=('MIT')
+makedepends=('git' 'cmake')
+provides=("unittestpp=$pkgver")
+conflicts=('unittestpp')
+options=('staticlibs')
+source=("git+https://github.com/unittest-cpp/unittest-cpp.git")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "unittest-cpp"
+
+ _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
+ _rev=$(git rev-list --count $_tag..HEAD)
+ _hash=$(git rev-parse --short HEAD)
+ printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
+}
+
+build() {
+ cd "unittest-cpp"
+
+ CXXFLAGS="$CXXFLAGS -ffat-lto-objects" \
+ cmake \
+ -B "_build" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DUTPP_AMPLIFY_WARNINGS=OFF \
+ ./
+ make -C "_build"
+}
+
+package() {
+ cd "unittest-cpp"
+
+ make -C "_build" DESTDIR="$pkgdir" install
+ install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/unittestpp"
+}