diff options
author | 0x9fff00 | 2020-03-22 14:54:26 +0100 |
---|---|---|
committer | 0x9fff00 | 2020-03-22 14:54:26 +0100 |
commit | b4b9b0a831046ba4b6abcf4fc0dab6624a66eef9 (patch) | |
tree | 2872e0129a78e5d47894c1e890be545aba3075d1 | |
download | aur-b4b9b0a831046ba4b6abcf4fc0dab6624a66eef9.tar.gz |
Import from [community]
Based on https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/python-jsonpatch&id=e36bbaabd9d912ca64cd4a834575eadf93a73eff
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 27 | ||||
-rw-r--r-- | .gitignore_append | 1 | ||||
-rw-r--r-- | PKGBUILD | 46 |
4 files changed, 90 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..644694ef4e47 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = python2-jsonpatch + pkgdesc = An implementation of the JSON Patch format + pkgver = 1.25 + pkgrel = 2 + url = https://github.com/stefankoegl/python-json-patch + arch = any + license = BSD + checkdepends = python2-coverage + makedepends = python2-setuptools + makedepends = python2-pypandoc + depends = python2-jsonpointer + source = python2-jsonpatch-1.25.tar.gz::https://github.com/stefankoegl/python-json-patch/archive/v1.25.tar.gz + sha512sums = 5e1d5b6dcb6ee847ddd561400fe2d00e07aa1827a63ab98a38cd5e91fa0e52d8635eba1192edbccf9c7b9ce9c7ce0a414d580665c427c87a820e533d26092ad6 + +pkgname = python2-jsonpatch + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f12030797c07 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +*.tar +*.tar.* +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +pkg/ +src/ +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +# archlinuxpackages linux diff --git a/.gitignore_append b/.gitignore_append new file mode 100644 index 000000000000..a92184e5a9bf --- /dev/null +++ b/.gitignore_append @@ -0,0 +1 @@ +# archlinuxpackages linux diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d659d40514da --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: 0x9fff00 <0x9fff00+git@protonmail.ch> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> +# Contributor: Limao Luo <luolimao+AUR@gmail.com> + +# Based on python-jsonpatch in [community] + +_urlname=python-json-patch +pkgname=python2-jsonpatch +pkgver=1.25 +pkgrel=2 +pkgdesc='An implementation of the JSON Patch format' +arch=('any') +url="https://github.com/stefankoegl/$_urlname" +license=('BSD') +depends=('python2-jsonpointer') +makedepends=('python2-setuptools' 'python2-pypandoc') +checkdepends=('python2-coverage') +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") +sha512sums=('5e1d5b6dcb6ee847ddd561400fe2d00e07aa1827a63ab98a38cd5e91fa0e52d8635eba1192edbccf9c7b9ce9c7ce0a414d580665c427c87a820e533d26092ad6') + +prepare(){ + find $_urlname-$pkgver -name \*.py -exec sed -i '1s/python$/&2/' {} + +} + +build() { + cd $_urlname-$pkgver + + python2 setup.py build +} + +check() { + cd $_urlname-$pkgver + + coverage2 run --source=jsonpatch tests.py +} + +package() { + cd $_urlname-$pkgver + + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build + for _bin in "$pkgdir"/usr/bin/*; do + mv "$_bin"{,2} + done +} |