summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChocobo12018-03-24 16:27:06 +0800
committerChocobo12018-03-24 16:37:18 +0800
commitc59e7042ead14c319d90356a7f8834d963074ee8 (patch)
tree64fdd4aa97eacc454acf442a35ed3cd967cc7cb2 /PKGBUILD
parent1cd2ba1e46f4e4c53a53d1f26eff117573fddc6e (diff)
downloadaur-c59e7042ead14c319d90356a7f8834d963074ee8.tar.gz
upgpkg: diff-so-fancy-git 1.2.0.r7.g63568e8-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 32 insertions, 25 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ed6aaf5ae096..21b9e3ac8a17 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}