diff options
author | Narrat | 2016-09-09 00:39:34 +0200 |
---|---|---|
committer | Narrat | 2016-09-09 00:39:34 +0200 |
commit | 1cd2ba1e46f4e4c53a53d1f26eff117573fddc6e (patch) | |
tree | b69549645270b0506e409a31794f9d4567b432df | |
parent | e260f2db2c95ac966c2ac408d52f1cd0e1e9f151 (diff) | |
download | aur-1cd2ba1e46f4e4c53a53d1f26eff117573fddc6e.tar.gz |
diff-so-fancy: Bring it on par with the repo PKGBUILD
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | system-diff_highlight.patch | 22 |
3 files changed, 58 insertions, 13 deletions
@@ -1,17 +1,20 @@ # Generated by mksrcinfo v8 -# Thu Feb 11 01:05:34 UTC 2016 +# Thu Sep 8 22:39:22 UTC 2016 pkgbase = diff-so-fancy-git pkgdesc = Good-looking diffs with diff-highlight and more (git version) - pkgver = v0.1.2.r27.g1544df3 + pkgver = 0.11.1.r5.g3dd2580 pkgrel = 1 url = https://github.com/stevemao/diff-so-fancy install = diff-so-fancy-git.install arch = any license = MIT + depends = git provides = diff-so-fancy conflicts = diff-so-fancy source = git+https://github.com/stevemao/diff-so-fancy.git - sha384sums = SKIP + source = system-diff_highlight.patch + sha1sums = SKIP + sha1sums = dc36f4fe31891e2b802668877a4b26868a6931c5 pkgname = diff-so-fancy-git @@ -1,26 +1,46 @@ -# Maintainer icasdri <icasdri at gmail dot com> +# Contributor: Lex Black <autumn-wind at web dot de> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: icasdri <icasdri at gmail dot com> _pkgname=diff-so-fancy -pkgname=diff-so-fancy-git -pkgver=v0.1.2.r27.g1544df3 +pkgname=${_pkgname}-git +pkgver=0.11.1.r5.g3dd2580 pkgrel=1 pkgdesc="Good-looking diffs with diff-highlight and more (git version)" arch=(any) url="https://github.com/stevemao/diff-so-fancy" license=('MIT') +depends=('git') provides=('diff-so-fancy') conflicts=('diff-so-fancy') install="${pkgname}.install" -source=("git+${url}.git") -sha384sums=('SKIP') +source=("git+${url}.git" + "system-diff_highlight.patch") +sha1sums=('SKIP' + 'dc36f4fe31891e2b802668877a4b26868a6931c5') + pkgver() { - cd "${srcdir}/${_pkgname}" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + cd "${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +} + +prepare() { + cd "${_pkgname}" + + sed -i 's/libexec/lib/g' diff-so-fancy readme.md + mv libexec lib + + patch -p1 -i ${srcdir}/system-diff_highlight.patch + + sed -i 's|$(get_script_dir)/lib/diff-so-fancy.pl|/usr/share/diff-so-fancy/diff-so-fancy.pl|' diff-so-fancy } package() { - cd "${srcdir}/${_pkgname}" - install -Dm755 'diff-so-fancy' "${pkgdir}/usr/bin/diff-so-fancy" - install -Dm755 'third_party/diff-highlight/diff-highlight' "${pkgdir}/usr/bin/diff-highlight" + cd "${_pkgname}" + + install -Dm755 'diff-so-fancy' "$pkgdir"/usr/bin/diff-so-fancy + install -Dm755 'lib/diff-so-fancy.pl' "$pkgdir"/usr/share/diff-so-fancy/diff-so-fancy.pl + + install -Dm644 readme.md "$pkgdir"/usr/share/doc/diff-so-fancy/readme.md } diff --git a/system-diff_highlight.patch b/system-diff_highlight.patch new file mode 100644 index 000000000000..eab058f8d649 --- /dev/null +++ b/system-diff_highlight.patch @@ -0,0 +1,22 @@ +From 10175a16b762282acd90ee624a73b55a362fbbca Mon Sep 17 00:00:00 2001 +From: Felix Yan <felixonmars@archlinux.org> +Date: Sun, 14 Feb 2016 17:07:07 +0800 +Subject: [PATCH] Use system git's diff_highlight + +--- + diff-so-fancy | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/diff-so-fancy b/diff-so-fancy +index b17cf29..9f62e72 100755 +--- a/diff-so-fancy ++++ b/diff-so-fancy +@@ -19,7 +19,7 @@ hash gsed 2> /dev/null && SED=gsed || SED=sed + if hash diff-highlight 2> /dev/null; then + diff_highlight=diff-highlight + else +- diff_highlight="$(get_script_dir)/third_party/diff-highlight/diff-highlight" ++ diff_highlight="/usr/share/git/diff-highlight/diff-highlight" + fi + + CSI=$'\x1b\[' |