summaryrefslogtreecommitdiffstats
path: root/testcorpus/git-sourced
diff options
context:
space:
mode:
Diffstat (limited to 'testcorpus/git-sourced')
-rw-r--r--testcorpus/git-sourced/PKGBUILD19
-rw-r--r--testcorpus/git-sourced/manifest.json31
2 files changed, 50 insertions, 0 deletions
diff --git a/testcorpus/git-sourced/PKGBUILD b/testcorpus/git-sourced/PKGBUILD
new file mode 100644
index 0000000..ba9ae33
--- /dev/null
+++ b/testcorpus/git-sourced/PKGBUILD
@@ -0,0 +1,19 @@
+pkgbase=git-sourced
+pkgver=r1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/git-sourced"
+license=(MIT)
+arch=(x86_64)
+source=("git+file://@UPSTREAM_DIR@")
+sha256sums=("SKIP")
+build() {
+ echo building git-sourced
+}
+package_git-sourced() {
+ echo packaging git-sourced
+}
+pkgver() {
+ cd "$srcdir/upstream" 2>/dev/null || cd @UPSTREAM_DIR@
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
diff --git a/testcorpus/git-sourced/manifest.json b/testcorpus/git-sourced/manifest.json
new file mode 100644
index 0000000..01a781f
--- /dev/null
+++ b/testcorpus/git-sourced/manifest.json
@@ -0,0 +1,31 @@
+{
+ "name": "git-sourced",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "vercheck": "r1.0-1",
+ "expect": {
+ "notes": "pkgver() derives from upstream HEAD"
+ }
+}