aboutsummaryrefslogtreecommitdiffstats
path: root/community/gitg/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/gitg/APKBUILD')
-rw-r--r--community/gitg/APKBUILD34
1 files changed, 26 insertions, 8 deletions
diff --git a/community/gitg/APKBUILD b/community/gitg/APKBUILD
index 0fcc0d939de..3d9f4e345b2 100644
--- a/community/gitg/APKBUILD
+++ b/community/gitg/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gitg
pkgver=41
-pkgrel=0
+pkgrel=6
pkgdesc="gitg is the GNOME GUI client to view git repositories"
url="https://wiki.gnome.org/Apps/Gitg"
arch="all"
@@ -21,25 +21,43 @@ makedepends="
libgit2-glib-dev
libpeas-dev
libsecret-dev
- libsoup-dev
libxml2-dev
meson
vala
"
-subpackages="$pkgname-doc $pkgname-lang"
+checkdepends="bash xvfb-run"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/gitg/${pkgver%.*}/gitg-$pkgver.tar.xz
meson-fix-build.patch
"
-# requires being in a git repo, and the aports one is too big (takes forever)
-options="!check"
+
+prepare() {
+ default_prepare
+
+ if want_check; then
+ # the test needs a git repository, so we make one here
+ # (we can't run this on aports since it's too large)
+ mkdir "$builddir"/tmprepo
+ cd "$builddir"/tmprepo
+ git init
+ # sometimes git fails to guess the email which would cause a failed
+ # build, this fixes it
+ git config --local user.name "test commiter"
+ git config --local user.email "test@example.com"
+ echo "test" > README.md
+ git add "README.md"
+ git commit -m "test commit"
+ fi
+}
build() {
abuild-meson . output
- meson compile ${JOBS:+-j ${JOBS}} -C output
+ meson compile -C output
}
check() {
- meson test --no-rebuild -v -C output
+ cd "$builddir/tmprepo"
+ xvfb-run -a meson test --no-rebuild --print-errorlogs -C ../output
}
package() {