[arch-commits] Commit in diff-so-fancy/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sun Jan 7 07:10:08 UTC 2018


    Date: Sunday, January 7, 2018 @ 07:10:07
  Author: felixonmars
Revision: 279788

archrelease: copy trunk to community-testing-any

Added:
  diff-so-fancy/repos/community-testing-any/
  diff-so-fancy/repos/community-testing-any/PKGBUILD
    (from rev 279787, diff-so-fancy/trunk/PKGBUILD)

----------+
 PKGBUILD |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Copied: diff-so-fancy/repos/community-testing-any/PKGBUILD (from rev 279787, diff-so-fancy/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-01-07 07:10:07 UTC (rev 279788)
@@ -0,0 +1,44 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: icasdri <icasdri at gmail dot com>
+
+pkgname=diff-so-fancy
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="Good-looking diffs with diff-highlight and more"
+arch=('any')
+url="https://github.com/so-fancy/diff-so-fancy"
+license=('MIT')
+depends=('perl')
+makedepends=('git')
+checkdepends=('bash-bats-assert' 'bash-bats-support')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/so-fancy/diff-so-fancy/archive/v$pkgver.tar.gz")
+sha384sums=('77aa73a0fb1f76bbfe79348df11fb805ebcba6c0f7b34102dd4c071afa01a04e2e66533fb893fabdb88b5e5fc60de4d5')
+
+prepare() {
+  cd "$srcdir"/$pkgname-$pkgver
+
+  rm -r third_party # lib
+
+  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
+}
+
+check() {
+  cd "$srcdir"/$pkgname-$pkgver
+  git init
+  bats test/*.bats
+}
+
+package() {
+  cd "$srcdir"/$pkgname-$pkgver
+
+  sed -i 's|^use lib .*$|use lib "/usr/share/diff-so-fancy";|' diff-so-fancy
+
+  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 README.md "$pkgdir"/usr/share/doc/diff-so-fancy/README.md
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list