diff options
-rw-r--r-- | 0001-Makefile-Sanitize-the-install-and-uninstall-targets.patch | 49 | ||||
-rw-r--r-- | 0002-Correct-the-order-of-git-am-arguments.patch | 25 | ||||
-rw-r--r-- | PKGBUILD | 22 |
3 files changed, 93 insertions, 3 deletions
diff --git a/0001-Makefile-Sanitize-the-install-and-uninstall-targets.patch b/0001-Makefile-Sanitize-the-install-and-uninstall-targets.patch new file mode 100644 index 000000000000..94444cfb76a2 --- /dev/null +++ b/0001-Makefile-Sanitize-the-install-and-uninstall-targets.patch @@ -0,0 +1,49 @@ +From 7761604bd39ff77356a9142caef1577f2046bde5 Mon Sep 17 00:00:00 2001 +From: Mike Swanson <mikeonthecomputer@gmail.com> +Date: Wed, 5 Aug 2015 00:56:30 -0700 +Subject: [PATCH 1/2] Makefile: Sanitize the install and uninstall targets + +install shouldn't really depend on uninstall; it interferes with +packaging (especially when doing things as a non-root user). Also, +give it a little bit more flexibility for choice of installation +location as well as defaulting to /usr/local which is a place for +manually installed software, not /usr directly. +--- + Makefile | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 87c023c..00ec1ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,15 +19,21 @@ all: git-debubble.1 + clean: + rm -f *~ *.1 *.html rm -f docbook-xsl.css MANIFEST + +-install: git-debubble.1 uninstall +- install -m 0755 -d $(DESTDIR)/usr/bin +- install -m 0755 -d $(DESTDIR)/usr/share/man/man1 +- install -m 0755 git-debubble $(DESTDIR)/usr/bin/ +- install -m 0644 git-debubble.1 $(DESTDIR)/usr/share/man/man1/ ++prefix?=/usr/local ++mandir?=share/man ++target=$(DESTDIR)$(prefix) + ++install: git-debubble.1 ++ install -d $(target)/bin ++ install -d $(target)/$(mandir)/man1 ++ install -m 755 git-debubble $(target)/bin/ ++ install -m 644 git-debubble.1 $(target)/$(mandir)/man1/ + + uninstall: +- rm -f /usr/bin/git-debubble /usr/share/man/man1/git-debubble.1 ++ rm $(target)/$(mandir)/man1/git-debubble.1 ++ rm $(target)/bin/git-debubble ++ -rmdir -p $(target)/$(mandir)/man1 ++ -rmdir -p $(target)/bin + + version: + @echo $(VERS) +-- +2.5.0 + diff --git a/0002-Correct-the-order-of-git-am-arguments.patch b/0002-Correct-the-order-of-git-am-arguments.patch new file mode 100644 index 000000000000..4c123b0c9ce0 --- /dev/null +++ b/0002-Correct-the-order-of-git-am-arguments.patch @@ -0,0 +1,25 @@ +From 70e4efe848724d88d87973535ac5cc4969ad868e Mon Sep 17 00:00:00 2001 +From: Mike Swanson <mikeonthecomputer@gmail.com> +Date: Wed, 5 Aug 2015 00:59:09 -0700 +Subject: [PATCH 2/2] Correct the order of git-am arguments + +--- + git-debubble | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/git-debubble b/git-debubble +index 26c3537..6d836a6 100755 +--- a/git-debubble ++++ b/git-debubble +@@ -38,7 +38,7 @@ case $mode in + if git branch $debubbled; then + git checkout master + git checkout $debubbled +- if git --committer-date-is-author-date am 0*; then ++ if git am --committer-date-is-author-date 0*; then + rm 0* + if git branch --move $head $bubbled; then + if git branch --move $debubbled $head; then +-- +2.5.0 + @@ -2,15 +2,31 @@ pkgname=git-debubble pkgver=1.1 -pkgrel=1 +pkgrel=2 pkgdesc="Clean up merge bubbles in a Git repository" arch=('any') depends=('git') makedepends=('asciidoc') url="http://www.catb.org/esr/$pkgname/" license=('GPL2') -source=("http://www.catb.org/esr/$pkgname/$pkgname-$pkgver.tar.gz") -sha256sums=('6b2cd99cea708a06b96068eedaa402ce61a50870cd734e446055312da031b6ef') +source=("http://www.catb.org/esr/$pkgname/$pkgname-$pkgver.tar.gz" + 0001-Makefile-Sanitize-the-install-and-uninstall-targets.patch + 0002-Correct-the-order-of-git-am-arguments.patch) +sha256sums=('6b2cd99cea708a06b96068eedaa402ce61a50870cd734e446055312da031b6ef' + '2f9440937cb6fa2b4a2b19c2b2964dfe3569bd05560023ff02d5e678890b025f' + '528aa930db8bf9864a2c320a5cd9a8ac212128652946fa2cea90916b0ac1b8d7') + +prepare() { + cd "$pkgname-$pkgver" + + for patch in ../*.patch; do + if [ ! -f "$patch" ]; then + break; + else + patch -p1 -i "$patch" + fi + done +} build() { cd "$pkgname-$pkgver" |