summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2017-04-25 01:52:25 -0400
committerJames An2017-04-25 01:52:25 -0400
commit268ee198bfee7a3293a35ec227cc4add30fd65c7 (patch)
tree681a695066c8acd9f037ebde23a8864ee90742bd
downloadaur-git-subsplit-git.tar.gz
Initial commit with working PKGBUILD.
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore27
-rw-r--r--PKGBUILD39
-rw-r--r--install-with-DESTDIR.patch8
4 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b3b5fec5c7ea
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = git-subsplit-git
+ pkgdesc = Automate and simplify the process of managing one-way read-only subtree splits.
+ pkgver = r30.2cde593
+ pkgrel = 1
+ url = https://github.com/dflydev/git-subsplit
+ arch = any
+ license = MIT
+ depends = git
+ provides = git-subsplit=r30.2cde593
+ conflicts = git-subsplit
+ source = git-subsplit::git+https://github.com/dflydev/git-subsplit.git
+ source = install-with-DESTDIR.patch
+ md5sums = SKIP
+ md5sums = 54079a630b700001111591a6b4b82269
+
+pkgname = git-subsplit-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..43316bc3c124
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+
+*.tar
+*.tar.*
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+# makepkg working folders
+pkg
+src
+
+#
+# Additional ignore patterns:
+#
+
+# Source files
+*.deb
+*.gem
+*.out
+*.rpm
+*.html
+
+# Ignore package source folders
+*/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..39c9ad18a6f8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: James An <james@jamesan.ca>
+
+pkgname=git-subsplit-git
+_pkgname=${pkgname%-git}
+pkgver=r30.2cde593
+pkgrel=1
+pkgdesc="Automate and simplify the process of managing one-way read-only subtree splits."
+arch=('any')
+url="https://github.com/dflydev/$_pkgname"
+license=('MIT')
+depends=('git')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+source=("$_pkgname"::"git+https://github.com/dflydev/$_pkgname.git"
+ install-with-DESTDIR.patch)
+md5sums=('SKIP'
+ '54079a630b700001111591a6b4b82269')
+
+pkgver() {
+ cd "$_pkgname"
+ (
+ set -o pipefail
+ git describe --long --tag 2>/dev/null | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+prepare() {
+ cd "$_pkgname"
+
+ patch -p1 -i $srcdir/install-with-DESTDIR.patch
+}
+
+package() {
+ cd "$_pkgname"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -m755 -d "$pkgdir/$(git --exec-path)"
+ DESTDIR="$pkgdir" ./install.sh
+}
diff --git a/install-with-DESTDIR.patch b/install-with-DESTDIR.patch
new file mode 100644
index 000000000000..0268261d80ad
--- /dev/null
+++ b/install-with-DESTDIR.patch
@@ -0,0 +1,8 @@
+diff --git a/install.sh b/install.sh
+index 9644838..9d3fe1b 100755
+--- a/install.sh
++++ b/install.sh
+@@ -1,2 +1,2 @@
+ # Copy subsplit to where the Git scripts belong.
+-cp git-subsplit.sh "$(git --exec-path)"/git-subsplit
++cp git-subsplit.sh "$DESTDIR/$(git --exec-path)"/git-subsplit