summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Nadeau2021-05-07 09:20:10 -0400
committerFrédéric Nadeau2021-05-07 09:20:10 -0400
commit161ad1fa8db7f6ca457700dcdb5e4e1bca0913cb (patch)
tree443c723badfb15f68cf03d1abec5304390ce5a8e
parent41d59592f03e4684fd1e79b93badfede939cb637 (diff)
downloadaur-161ad1fa8db7f6ca457700dcdb5e4e1bca0913cb.tar.gz
Use tarball rather than git clone and tags
-rw-r--r--.SRCINFO12
-rw-r--r--0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch28
-rw-r--r--PKGBUILD25
3 files changed, 51 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1fd8530d60aa..94b83ca32f72 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = cgreen
- pkgdesc = A modern, portable, cross-language unit testing and mocking framework for C and C++
+ pkgdesc = Unit Tests, Stubbing and Mocking for C and C++
pkgver = 1.3.0
pkgrel = 1
- url = https://github.com/cgreen-devs/cgreen/releases/tag/1.3.0
+ url = https://cgreen-devs.github.io/
arch = x86_64
license = ISC
makedepends = cmake>=2.8.5
- makedepends = gcc
- makedepends = git
provides = libcgreen.so
- source = cgreen::git+https://github.com/cgreen-devs/cgreen.git#tag=1.3.0
- sha256sums = SKIP
+ source = https://github.com/cgreen-devs/cgreen/archive/refs/tags/1.3.0.tar.gz
+ source = 0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch
+ sha256sums = 57ebad149a8b2e1c331bf576132306eb0bc7c2bac1ee55c47eafae1657a38b2d
+ sha256sums = 128eae71a5df2c477a76b6afcea02977bf53ecadc59bd25f8af92a4e5c87672e
pkgname = cgreen
diff --git a/0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch b/0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch
new file mode 100644
index 000000000000..98a22fd40110
--- /dev/null
+++ b/0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch
@@ -0,0 +1,28 @@
+From d4fc13a53f9a8bbfaf4f7fdcd5f51b94c63bf1e7 Mon Sep 17 00:00:00 2001
+From: Thomas Nilefalk <thomas.nilefalk@responsive.se>
+Date: Thu, 3 Sep 2020 16:04:34 +0200
+Subject: [PATCH 1/4] Remove use of get_filename_component() if no .git found
+
+Fixes #234
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 350bb89..40241b0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,7 +62,9 @@ execute_process(
+ OUTPUT_VARIABLE GITDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+-get_filename_component(GITDIR "${GITDIR}" ABSOLUTE)
++if (GITDIR)
++ get_filename_component(GITDIR "${GITDIR}" ABSOLUTE)
++endif()
+
+ # config.h checks
+ include(ConfigureChecks.cmake)
+--
+2.30.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 9cb2d22dcf6c..0eb76113cb23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,28 @@
# Maintainer: Frédéric Nadeau <fred.nadeau@gmail.com>
+
pkgname="cgreen"
pkgver="1.3.0"
pkgrel=1
-pkgdesc="A modern, portable, cross-language unit testing and mocking framework for C and C++"
+pkgdesc="Unit Tests, Stubbing and Mocking for C and C++"
arch=('x86_64')
-url="https://github.com/cgreen-devs/cgreen/releases/tag/${pkgver}"
+url="https://cgreen-devs.github.io/"
license=('ISC')
-makedepends=('cmake>=2.8.5' 'gcc' 'git')
+makedepends=('cmake>=2.8.5')
provides=('libcgreen.so')
-source=("${pkgname}::git+https://github.com/cgreen-devs/cgreen.git#tag=${pkgver}")
+source=("https://github.com/cgreen-devs/cgreen/archive/refs/tags/${pkgver}.tar.gz"
+ "0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch")
+
+sha256sums=('57ebad149a8b2e1c331bf576132306eb0bc7c2bac1ee55c47eafae1657a38b2d'
+ '128eae71a5df2c477a76b6afcea02977bf53ecadc59bd25f8af92a4e5c87672e')
-sha256sums=('SKIP')
+prepare() {
+ cd cgreen-${pkgver}
+ patch -p1 < ../0001-Remove-use-of-get_filename_component-if-no-.git-foun.patch
+}
build() {
- cd "$srcdir/${pkgname}"
+ export GIT_CEILING_DIRECTORIES="${PWD}"
+ cd cgreen-${pkgver}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
@@ -23,12 +32,12 @@ build() {
}
check() {
- cd "$srcdir/${pkgname}/build"
+ cd cgreen-${pkgver}/build
make test
}
package() {
- cd "$srcdir/${pkgname}/build"
+ cd cgreen-${pkgver}/build
make DESTDIR="$pkgdir/" install
install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 ..//contrib/completion/cgreen_bash_completion "${pkgdir}/usr/share/bash-completion/completions/cgreen"