summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMarcell Meszaros2022-07-08 21:57:53 +0200
committerMarcell Meszaros2022-07-08 21:57:53 +0200
commita39f489ee593a1bfb1d9248cb19c759d17877822 (patch)
treeee4572698197d7056bad310a5b477587ed86b374 /PKGBUILD
parentf19f56f9e61fc33977a1119d35256a86158694c1 (diff)
downloadaur-python2-pyxdg.tar.gz
0.28-5: remove legacy pyxdg subpackage, improve hashbang fix
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 14 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ef0b05fdf96f..12bdeacdd395 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,18 @@
-# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
+# Maintainer: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: qlonik <volodin.n at gmail dot com>
# Contributor: Mario A. Vazquez <mario_vazq@hotmail.com>
pkgbase='python2-pyxdg'
-pkgname=('python2-pyxdg' 'pyxdg' 'python2-xdg')
+pkgname=('python2-pyxdg' 'python2-xdg')
_name="${pkgbase#python2-}"
pkgver=0.28
-pkgrel=4
-pkgdesc='Official freedesktop.org XDG specifications support library'
+pkgrel=5
+pkgdesc='Official freedesktop.org XDG specifications support library (for Python 2)'
arch=('any')
url="https://pypi.org/project/${_name}/${pkgver}/"
license=('LGPL')
-depends=('python2')
makedepends=('python2-setuptools')
# checkdepends=('python2-pytest') # Test are not self-contained and not deterministic; results depend on system setup
@@ -22,18 +21,17 @@ __tarname_git="${_name}-rel-${pkgver}" # Gitlab/GitHub tarball name
__source_pypi_tar="https://pypi.python.org/packages/source/${_name::1}/${_name}/${__tarname_pypi}.tar.gz"
__source_git_tar="https://gitlab.freedesktop.org/xdg/${_name}/-/archive/rel-${pkgver}/${__tarname_git}.tar.bz2"
-# PyXDG's PyPI sources tend to have screwed-up test files.
-# Using Gitlab/GitHub tarballs seem much more reliable.
+# PyXDG's PyPI sources tend to have wrong or missing test files.
+# Using Gitlab/GitHub tarballs to keep open the possibility of testing.
_tarname="${__tarname_git}" # tar name to use
source=("${__source_git_tar}") # tar source to use
sha256sums=('2de0dc8bd40e5b2ea3fdb2197e5cf9e929a7c7260f4a5fbdbdb5c73fd3db45b5')
prepare() {
- echo 'Changing hashbangs in *.py files to refer to python2'
- sed -e 's|#![ ]*/usr/bin/python[^2]\?|#!/usr/bin/python2|' \
- -e 's|#![ ]*/usr/bin/env python[^2]\?|#!/usr/bin/env python2|' \
- -e 's|#![ ]*/bin/env python[^2]\?|#!/usr/bin/env python2|' \
- -i $(find . -name '*.py')
+ printf "Changing hashbangs in *.py files to refer to 'python2'... "
+ sed -e '1s|#![ ]*/[a-zA-Z0-9./_ ]*python.*|#!/usr/bin/env python2|' \
+ -i $(find . -name '*.py')
+ echo 'done'
}
build() {
@@ -55,13 +53,11 @@ build() {
# }
package_python2-pyxdg() {
- cd "${_tarname}"
- python2 setup.py install --prefix='/usr' --root="${pkgdir}" --skip-build --optimize=1
-}
+ depends=('python2')
+ conflicts=('pyxdg') # legacy Arch package name, before 2012
-package_pyxdg() {
- depends=('python2-pyxdg')
- pkgdesc='[meta-pkg] Old, deprecated package name. Whatever depends on this should depend on python2-pyxdg instead.'
+ cd "${_tarname}"
+ python2 setup.py install --root="${pkgdir}" --prefix='/usr' --optimize=1 --skip-build
}
package_python2-xdg() {