summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..38639cff44cf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+
+pkgname=pacman-offline-git
+pkgver=0.r1.gf212c9e
+pkgrel=1
+pkgdesc='offline system update with pacman - git checkout'
+arch=('any')
+url='https://github.com/eworm-de/pacman-offline'
+license=('GPL')
+depends=('systemd' 'pacman')
+makedepends=('git' 'markdown')
+conflicts=('pacman-offline')
+provides=('pacman-offline')
+source=('git://github.com/eworm-de/pacman-offline.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd pacman-offline/
+
+ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
+ printf '%s.r%s.g%s' \
+ "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
+ "$(git rev-list --count ${GITTAG}..)" \
+ "$(git log -1 --format='%h')"
+ else
+ printf '0.r%s.g%s' \
+ "$(git rev-list --count master)" \
+ "$(git log -1 --format='%h')"
+ fi
+}
+
+package() {
+ cd pacman-offline/
+
+ make DESTDIR=${pkgdir} install
+}
+