diff options
author | tcely <tcely@users.noreply.github.com> | 2018-03-27 12:46:54 -0400 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-04-13 05:55:49 +0000 |
commit | 228a7af4a5f9814dad4ac638df9a1842ab091535 (patch) | |
tree | 488c5d8ea5c249c12c8c645766decec6c346e882 /community/xkcdpass | |
parent | a74372b2a9c8e4d441c0af10448e986ac134c634 (diff) | |
download | aports-228a7af4a5f9814dad4ac638df9a1842ab091535.tar.bz2 aports-228a7af4a5f9814dad4ac638df9a1842ab091535.tar.xz |
community/xkcdpass: use patch not sed
Diffstat (limited to 'community/xkcdpass')
-rw-r--r-- | community/xkcdpass/APKBUILD | 16 | ||||
-rw-r--r-- | community/xkcdpass/python-to-python3.patch | 42 |
2 files changed, 49 insertions, 9 deletions
diff --git a/community/xkcdpass/APKBUILD b/community/xkcdpass/APKBUILD index f2de7a05cf..120d32ce64 100644 --- a/community/xkcdpass/APKBUILD +++ b/community/xkcdpass/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=xkcdpass pkgver=1.16.3 -pkgrel=0 +pkgrel=1 pkgdesc="Generate secure multiword passwords/passphrases" url="https://github.com/redacted/XKCD-password-generator" arch="noarch" @@ -10,13 +10,9 @@ license="BSD-3-Clause" depends="py3-xkcdpass" makedepends="python3-dev py3-setuptools" subpackages="py3-$pkgname:py3" -source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz" -builddir="$srcdir"/$pkgname-$pkgver - -prepare() { - cd "$builddir" - sed -i 's/python/python3/g' tests/test_xkcdpass.py -} +source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz + python-to-python3.patch" +builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" @@ -36,8 +32,10 @@ package() { py3() { pkgdesc="Python library for $pkgname" depends="python3" + mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } -sha512sums="cc216244bc1fa75e286369432c9d3dd92ad150a752d8d58bcf461bf2f1eaf535054b8c92259b66217fad0ec1030e53b52429721c8d2b920a23813e9737955fe3 xkcdpass-1.16.3.tar.gz" +sha512sums="cc216244bc1fa75e286369432c9d3dd92ad150a752d8d58bcf461bf2f1eaf535054b8c92259b66217fad0ec1030e53b52429721c8d2b920a23813e9737955fe3 xkcdpass-1.16.3.tar.gz +ad0e4973c5622405f4002181c1678e9c71b03fb2833256423007fa2cd7a2068591124c31ff1e091411fe029646bb01c2a4c3b6b2a068e3530e6db57671df9968 python-to-python3.patch" diff --git a/community/xkcdpass/python-to-python3.patch b/community/xkcdpass/python-to-python3.patch new file mode 100644 index 0000000000..6f7ca186e7 --- /dev/null +++ b/community/xkcdpass/python-to-python3.patch @@ -0,0 +1,42 @@ +diff --git a/examples/example_postprocess.py b/examples/example_postprocess.py +index 069fb6e..057ea30 100755 +--- a/examples/example_postprocess.py ++++ b/examples/example_postprocess.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import fileinput + import random + import sys +diff --git a/tests/test_xkcdpass.py b/tests/test_xkcdpass.py +index 88579fd..6821d1f 100755 +--- a/tests/test_xkcdpass.py ++++ b/tests/test_xkcdpass.py +@@ -50,7 +50,7 @@ class XkcdPasswordTests(unittest.TestCase): + def test_separator(self): + count = 3 + result = subprocess.check_output( +- ["python", "xkcdpass/xkcd_password.py", ++ ["python3", "xkcdpass/xkcd_password.py", + "--count", str(count), + "--delimiter", "|", + "--separator", " "]) +@@ -60,7 +60,7 @@ class XkcdPasswordTests(unittest.TestCase): + "Pipe output to other program. e.g. `xkcdpass -c 1 -s "" | xsel -b`" + count = 1 + result = subprocess.check_output( +- ["python", "xkcdpass/xkcd_password.py", ++ ["python3", "xkcdpass/xkcd_password.py", + "--count", str(count), + "--separator", ""]) + self.assertEqual(result.find(b"\n"), -1) +diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py +index 78b0b69..07cc7b6 100755 +--- a/xkcdpass/xkcd_password.py ++++ b/xkcdpass/xkcd_password.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # encoding: utf-8 + + from __future__ import print_function |