summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2016-07-10 17:55:02 -0400
committerJames An2016-07-10 17:55:02 -0400
commit4f9993dc9bc27e9dd63846418c4a024f9c99fc55 (patch)
tree7af1fd54bc9a06833d9675febbd85889854a3484
downloadaur-4f9993dc9bc27e9dd63846418c4a024f9c99fc55.tar.gz
Initial commit with working spec.
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore27
-rw-r--r--PKGBUILD43
-rw-r--r--make-destdir.patch24
4 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65b98244fb78
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = git-subrepo-git
+ pkgdesc = Git command is an improvement from git-submodule and git-subtree.
+ pkgver = 0.3.0.r72.g1e79595
+ pkgrel = 1
+ url = https://github.com/ingydotnet/git-subrepo
+ arch = any
+ license = GPL
+ provides = git-subrepo=0.3.0.r72.g1e79595
+ conflicts = git-subrepo
+ source = git-subrepo::git+https://github.com/ingydotnet/git-subrepo.git
+ source = make-destdir.patch
+ md5sums = SKIP
+ md5sums = ee9d7137bb4fe4b0cc7da8f669e26ddf
+
+pkgname = git-subrepo-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..e6a42dd8b686
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: James An <james@jamesan.ca>
+
+pkgname=git-subrepo-git
+_pkgname=${pkgname%-git}
+pkgver=0.3.0.r72.g1e79595
+pkgrel=1
+pkgdesc="Git command is an improvement from git-submodule and git-subtree."
+arch=('any')
+url="https://github.com/ingydotnet/$_pkgname"
+license=('GPL')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+source=("$_pkgname"::"git+$url.git"
+ make-destdir.patch)
+md5sums=('SKIP'
+ 'ee9d7137bb4fe4b0cc7da8f669e26ddf')
+
+pkgver() {
+ cd "$_pkgname"
+ (
+ set -o pipefail
+ git describe --long --tag | 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 < ../make-destdir.patch
+}
+
+check() {
+ cd "$_pkgname"
+
+ make test
+}
+
+package() {
+ cd "$_pkgname"
+
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+}
diff --git a/make-destdir.patch b/make-destdir.patch
new file mode 100644
index 000000000000..3109f866bb4c
--- /dev/null
+++ b/make-destdir.patch
@@ -0,0 +1,24 @@
+diff --git a/Makefile b/Makefile
+index 1239b9f..764bd65 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,9 +15,9 @@ SHARE = share
+
+ # Install variables:
+ PREFIX ?= /usr/local
+-INSTALL_LIB ?= $(shell git --exec-path)
++INSTALL_LIB ?= $(DESTDIR)$(shell git --exec-path)
+ INSTALL_EXT ?= $(INSTALL_LIB)/$(NAME).d
+-INSTALL_MAN1 ?= $(PREFIX)/share/man/man1
++INSTALL_MAN1 ?= $(DESTDIR)$(PREFIX)/share/man/man1
+
+ # Basic targets:
+ default: help
+@@ -36,6 +36,7 @@ test:
+
+ # Install support:
+ install:
++ install -C -d -m 0755 $(INSTALL_LIB)/
+ install -C -m 0755 $(LIB) $(INSTALL_LIB)/
+ install -C -d -m 0755 $(INSTALL_EXT)/
+ install -C -m 0755 $(EXTS) $(INSTALL_EXT)/