summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThore Bödecker2020-02-11 15:50:43 +0100
committerThore Bödecker2020-02-11 15:51:52 +0100
commita7a8f75a1fecb9b68522fe115897dcd07c77bf94 (patch)
tree1177eff5bdef77b09599e817aa542482b21fac85
downloadaur-a7a8f75a1fecb9b68522fe115897dcd07c77bf94.tar.gz
add updated and correctly named py2 variant
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD39
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4b4986ce0cc2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+# Generated by mksrcinfo v8
+# Tue Feb 11 14:51:45 UTC 2020
+pkgbase = python2-diff-match-patch
+ pkgdesc = The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text
+ pkgver = 20181111
+ pkgrel = 1
+ url = https://github.com/google/diff-match-patch
+ arch = any
+ license = Apache
+ makedepends = python2
+ makedepends = python2-setuptools
+ depends = python2
+ source = https://files.pythonhosted.org/packages/source/d/diff-match-patch/diff-match-patch-20181111.tar.gz
+ sha256sums = a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb
+
+pkgname = python2-diff-match-patch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3fb6935a2614
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Thore Bödecker <me [at] foxxx0.de>
+# Contributor: Michał Sałaban <michal@salaban.info>
+
+pkgname=python2-diff-match-patch
+_pkgbase="${pkgname#python2-}"
+pkgver=20181111
+pkgrel=1
+pkgdesc='The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text'
+arch=('any')
+url='https://github.com/google/diff-match-patch'
+license=('Apache')
+depends=('python2')
+makedepends=('python2' 'python2-setuptools')
+source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz")
+sha256sums=('a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb')
+
+prepare() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ while read -r FILE; do
+ sed -i 's|^#!/usr/bin/python2.4|#!/usr/bin/python2|1' "$FILE"
+ done < <(find . -iname '*.py')
+}
+
+build() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python2 setup.py build
+}
+
+check() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python2 setup.py test
+}
+
+package() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ python2 setup.py install --prefix=/usr --root="$pkgdir/"
+}
+
+# vim: set ft=sh ts=2 sw=2 et: