diff options
author | Chocobo1 | 2018-03-24 16:27:06 +0800 |
---|---|---|
committer | Chocobo1 | 2018-03-24 16:37:18 +0800 |
commit | c59e7042ead14c319d90356a7f8834d963074ee8 (patch) | |
tree | 64fdd4aa97eacc454acf442a35ed3cd967cc7cb2 | |
parent | 1cd2ba1e46f4e4c53a53d1f26eff117573fddc6e (diff) | |
download | aur-c59e7042ead14c319d90356a7f8834d963074ee8.tar.gz |
upgpkg: diff-so-fancy-git 1.2.0.r7.g63568e8-1
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | diff-so-fancy-git.install | 9 | ||||
-rw-r--r-- | system-diff_highlight.patch | 22 |
4 files changed, 41 insertions, 67 deletions
@@ -1,20 +1,18 @@ -# Generated by mksrcinfo v8 -# 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 = 0.11.1.r5.g3dd2580 + pkgdesc = Make your diff's human readable instead of machine readable + pkgver = 1.2.0.r7.g63568e8 pkgrel = 1 - url = https://github.com/stevemao/diff-so-fancy - install = diff-so-fancy-git.install + url = https://github.com/so-fancy/diff-so-fancy arch = any license = MIT - depends = git + checkdepends = bash-bats-assert + checkdepends = bash-bats-support + makedepends = git + depends = perl provides = diff-so-fancy conflicts = diff-so-fancy - source = git+https://github.com/stevemao/diff-so-fancy.git - source = system-diff_highlight.patch - sha1sums = SKIP - sha1sums = dc36f4fe31891e2b802668877a4b26868a6931c5 + source = git+https://github.com/so-fancy/diff-so-fancy.git + sha256sums = SKIP pkgname = diff-so-fancy-git @@ -1,46 +1,53 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> # 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=${_pkgname}-git -pkgver=0.11.1.r5.g3dd2580 +pkgname=diff-so-fancy-git +pkgver=1.2.0.r7.g63568e8 pkgrel=1 -pkgdesc="Good-looking diffs with diff-highlight and more (git version)" -arch=(any) -url="https://github.com/stevemao/diff-so-fancy" +pkgdesc="Make your diff's human readable instead of machine readable" +arch=('any') +url="https://github.com/so-fancy/diff-so-fancy" license=('MIT') -depends=('git') +depends=('perl') +makedepends=('git') +checkdepends=('bash-bats-assert' 'bash-bats-support') provides=('diff-so-fancy') conflicts=('diff-so-fancy') -install="${pkgname}.install" -source=("git+${url}.git" - "system-diff_highlight.patch") -sha1sums=('SKIP' - 'dc36f4fe31891e2b802668877a4b26868a6931c5') +source=("git+https://github.com/so-fancy/diff-so-fancy.git") +sha256sums=('SKIP') -pkgver() { - cd "${_pkgname}" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +prepare() { + cd "diff-so-fancy" + + sed -e 's|test_helper/bats-support|/usr/lib/bats-support|' \ + -e 's|test_helper/bats-assert|/usr/lib/bats-assert|' \ + -e "s|load'$|load.bash'|" \ + -i test/*.bats } -prepare() { - cd "${_pkgname}" +pkgver() { + cd "diff-so-fancy" - sed -i 's/libexec/lib/g' diff-so-fancy readme.md - mv libexec lib + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} - patch -p1 -i ${srcdir}/system-diff_highlight.patch +check() { + cd "diff-so-fancy" - sed -i 's|$(get_script_dir)/lib/diff-so-fancy.pl|/usr/share/diff-so-fancy/diff-so-fancy.pl|' diff-so-fancy + bats test/*.bats } package() { - cd "${_pkgname}" + cd "diff-so-fancy" - 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 + sed -i 's|^use lib .*$|use lib "/usr/share/diff-so-fancy";|' diff-so-fancy - install -Dm644 readme.md "$pkgdir"/usr/share/doc/diff-so-fancy/readme.md + install -Dm755 "diff-so-fancy" "$pkgdir/usr/bin/diff-so-fancy" + install -Dm755 "lib/DiffHighlight.pm" "$pkgdir/usr/share/diff-so-fancy/DiffHighlight.pm" + + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "README.md" "$pkgdir/usr/share/doc/diff-so-fancy/README.md" } diff --git a/diff-so-fancy-git.install b/diff-so-fancy-git.install deleted file mode 100644 index 870d5ff39f89..000000000000 --- a/diff-so-fancy-git.install +++ /dev/null @@ -1,9 +0,0 @@ -post_install() { - echo - echo "==> If you desire git-diff to use diff-so-fancy by default," - echo "==> set diff-so-fancy as your global pager with the following:" - echo "==> git config --global core.pager 'diff-so-fancy | less --tabs=1,5 -R'" - echo "==> Or for one-off usage, use:" - echo "==> git diff --color | diff-so-fancy" - echo -} diff --git a/system-diff_highlight.patch b/system-diff_highlight.patch deleted file mode 100644 index eab058f8d649..000000000000 --- a/system-diff_highlight.patch +++ /dev/null @@ -1,22 +0,0 @@ -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\[' |