From d7d85a5f746e49c3b57034b8a98709a8db163cfc Mon Sep 17 00:00:00 2001 From: Joost Bremmer Date: Mon, 7 Oct 2019 00:48:30 +0200 Subject: [PATCH 1/2] Update PKGBUILD: patch and use distutils Signed-off-by: Joost Bremmer --- .SRCINFO | 9 ++++----- PKGBUILD | 29 ++++++++++++++++++++--------- python2-pyifbabel.patch | 11 +++++++++++ 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 python2-pyifbabel.patch diff --git a/.SRCINFO b/.SRCINFO index 35d6f7c..4858411 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,16 +1,15 @@ -# Generated by makepkg 4.2.0 -# Sun Jan 18 16:54:38 UTC 2015 pkgbase = python2-pyifbabel pkgdesc = A pure-Python implementation of the Treaty of Babel for interactive fiction pkgver = 0.4 - pkgrel = 1 + pkgrel = 2 url = http://pyifbabel.invergo.net arch = any license = GPL depends = python2 - options = !emptydirs source = http://pyifbabel.invergo.net/download/pyifbabel-0.4.tar.gz - md5sums = 1c7af09e4a2ae451fc74aff46037d425 + source = python2-pyifbabel.patch + sha256sums = 38c7f1b3163b6ddd6591b1f8fce028ea983637a9dec8c3626aac21c3c536c30e + sha256sums = 964e0d395ad8232ba8ca3e017cc5e01817e14a01ffaa5a9db24ff42ebfa099ba pkgname = python2-pyifbabel diff --git a/PKGBUILD b/PKGBUILD index 49df5b8..e1d68d3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,21 +1,32 @@ -# Maintainer: Brandon Invergo +# Maintainer: Joost Bremmer +# Contributor: Brandon Invergo pkgname=python2-pyifbabel -_pythonname=pyifbabel pkgver=0.4 -pkgrel=1 +pkgrel=2 pkgdesc="A pure-Python implementation of the Treaty of Babel for interactive fiction" arch=('any') url="http://pyifbabel.invergo.net" license=('GPL') depends=('python2') -options=(!emptydirs) -source=("http://pyifbabel.invergo.net/download/${_pythonname}-$pkgver.tar.gz") -md5sums=('1c7af09e4a2ae451fc74aff46037d425') +source=("http://pyifbabel.invergo.net/download/${pkgname##python2-}-$pkgver.tar.gz" + "$pkgname.patch") +sha256sums=('38c7f1b3163b6ddd6591b1f8fce028ea983637a9dec8c3626aac21c3c536c30e' + '964e0d395ad8232ba8ca3e017cc5e01817e14a01ffaa5a9db24ff42ebfa099ba') + + +prepare() { + cd "$srcdir" + patch -Np1 -i "$pkgname.patch" "${pkgname#python2-}-$pkgver/setup.py" +} +build() { + cd "$srcdir/${pkgname##python2-}-$pkgver" + python2 setup.py build +} + package() { - cd "$srcdir/${_pythonname}-$pkgver" - ./configure --prefix="$pkgdir/" PYTHON=/usr/bin/python2 - make install + cd "$srcdir/${pkgname##python2-}-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build } # vim:set ts=2 sw=2 et: diff --git a/python2-pyifbabel.patch b/python2-pyifbabel.patch new file mode 100644 index 0000000..346902b --- /dev/null +++ b/python2-pyifbabel.patch @@ -0,0 +1,11 @@ +--- pyifbabel-0.4/setup.py 2014-10-26 22:03:54.000000000 +0100 ++++ pyifbabel-0.4/setup.py.new 2019-10-07 00:30:12.965982013 +0200 +@@ -24,7 +24,7 @@ + import os.path + + if platform.system() == 'Linux': +- doc_dir = '/usr/local/share/doc/pyifbabel' ++ doc_dir = '/usr/share/doc/pyifbabel' + else: + try: + from win32com.shell import shellcon, shell From e671894bfc7461518b6b17d10f01aacaf6230a7b Mon Sep 17 00:00:00 2001 From: Joost Bremmer Date: Mon, 7 Oct 2019 02:48:38 +0200 Subject: [PATCH 2/2] Update patch file Signed-off-by: Joost Bremmer --- .SRCINFO | 4 ++-- PKGBUILD | 4 ++-- python2-pyifbabel.patch | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 4858411..da9a6ec 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = python2-pyifbabel pkgdesc = A pure-Python implementation of the Treaty of Babel for interactive fiction pkgver = 0.4 - pkgrel = 2 + pkgrel = 3 url = http://pyifbabel.invergo.net arch = any license = GPL @@ -9,7 +9,7 @@ pkgbase = python2-pyifbabel source = http://pyifbabel.invergo.net/download/pyifbabel-0.4.tar.gz source = python2-pyifbabel.patch sha256sums = 38c7f1b3163b6ddd6591b1f8fce028ea983637a9dec8c3626aac21c3c536c30e - sha256sums = 964e0d395ad8232ba8ca3e017cc5e01817e14a01ffaa5a9db24ff42ebfa099ba + sha256sums = 3616feaa0adddb21df2dea165f3f5c2dbedabbf043a30f7b2b5b68058f8e0def pkgname = python2-pyifbabel diff --git a/PKGBUILD b/PKGBUILD index e1d68d3..06b3bc3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Brandon Invergo pkgname=python2-pyifbabel pkgver=0.4 -pkgrel=2 +pkgrel=3 pkgdesc="A pure-Python implementation of the Treaty of Babel for interactive fiction" arch=('any') url="http://pyifbabel.invergo.net" @@ -11,7 +11,7 @@ depends=('python2') source=("http://pyifbabel.invergo.net/download/${pkgname##python2-}-$pkgver.tar.gz" "$pkgname.patch") sha256sums=('38c7f1b3163b6ddd6591b1f8fce028ea983637a9dec8c3626aac21c3c536c30e' - '964e0d395ad8232ba8ca3e017cc5e01817e14a01ffaa5a9db24ff42ebfa099ba') + '3616feaa0adddb21df2dea165f3f5c2dbedabbf043a30f7b2b5b68058f8e0def') prepare() { diff --git a/python2-pyifbabel.patch b/python2-pyifbabel.patch index 346902b..1824c63 100644 --- a/python2-pyifbabel.patch +++ b/python2-pyifbabel.patch @@ -1,5 +1,5 @@ ---- pyifbabel-0.4/setup.py 2014-10-26 22:03:54.000000000 +0100 -+++ pyifbabel-0.4/setup.py.new 2019-10-07 00:30:12.965982013 +0200 +--- old/pyifbabel-0.4/setup.py 2014-10-26 22:03:54.000000000 +0100 ++++ new/pyifbabel-0.4/setup.py 2019-10-07 02:39:54.987665154 +0200 @@ -24,7 +24,7 @@ import os.path