summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Javorski2022-10-27 10:51:17 -0700
committerMike Javorski2022-10-27 10:51:17 -0700
commit69024913bbb37d0d8db8c2837f9e6f2ef693865e (patch)
tree0792964beca049046f5feff4f12390d7a5f99e8e
parent617c7c7f0d53194974288410b01f6873675b0f94 (diff)
downloadaur-69024913bbb37d0d8db8c2837f9e6f2ef693865e.tar.gz
R4 - Add patch for python-pyxdg compatibility
Debian includes a compatibility layer in their python3-xdg package, but given the usage in dput, it did not warrant packaging a conflicting python-xdg, or trying to get the python-pyxdg maintainers to add the same compatibility.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD19
-rw-r--r--pyxdg-compatibility.patch34
3 files changed, 51 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fcd592a60ae8..3618f167f810 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dput
pkgdesc = Debian package upload tool
pkgver = 1.1.2
- pkgrel = 3
+ pkgrel = 4
url = http://packages.qa.debian.org/dput
arch = any
license = GPL
@@ -11,6 +11,8 @@ pkgbase = dput
depends = python-gpgme
depends = python-pyxdg
source = http://http.debian.net/debian/pool/main/d/dput/dput_1.1.2.tar.xz
- md5sums = 21d77e7607cce37a42f7be38e5df8335
+ source = pyxdg-compatibility.patch
+ sha256sums = cfdf60ab70806095b90dd6b266c9e397b30b2a8ac69e3660e4cb70db18636432
+ sha256sums = 2e19cb96d405f25b42ff2e4b1ac4651e4c6a6f96693d200170a8f69f55b33117
pkgname = dput
diff --git a/PKGBUILD b/PKGBUILD
index 573fc2823507..2847e7efac19 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,29 @@
# Contributor: Andre Klitzing <andre () incubo () de>
pkgname=dput
pkgver=1.1.2
-pkgrel=3
+pkgrel=4
pkgdesc="Debian package upload tool"
arch=('any')
url="http://packages.qa.debian.org/dput"
license=('GPL')
makedepends=('python-setuptools')
depends=('python' 'python-debian' 'python-gpgme' 'python-pyxdg')
-source=(http://http.debian.net/debian/pool/main/d/${pkgname}/${pkgname}_${pkgver}.tar.xz)
-md5sums=('21d77e7607cce37a42f7be38e5df8335')
+source=(
+ http://http.debian.net/debian/pool/main/d/${pkgname}/${pkgname}_${pkgver}.tar.xz
+ pyxdg-compatibility.patch
+)
+sha256sums=('cfdf60ab70806095b90dd6b266c9e397b30b2a8ac69e3660e4cb70db18636432'
+ '2e19cb96d405f25b42ff2e4b1ac4651e4c6a6f96693d200170a8f69f55b33117')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -p1 -i "$srcdir/pyxdg-compatibility.patch"
+}
build() {
cd "$pkgname-$pkgver"
- # Adjust requirement, so that pyxdg is used when dput verifies dependencies (Debian overrrides the name of the pyxdg package instead)
- sed -ri -e 's/"xdg"/"pyxdg"/' setup.py
-
python setup.py build
}
diff --git a/pyxdg-compatibility.patch b/pyxdg-compatibility.patch
new file mode 100644
index 000000000000..d64f96bea5be
--- /dev/null
+++ b/pyxdg-compatibility.patch
@@ -0,0 +1,34 @@
+diff -rU2 dput.orig/dput/configfile.py dput/dput/configfile.py
+--- dput.orig/dput/configfile.py 2022-07-01 15:15:28.000000000 -0700
++++ dput/dput/configfile.py 2022-10-27 10:42:36.104653583 -0700
+@@ -12,5 +12,5 @@
+ import sys
+
+-import xdg
++from xdg import BaseDirectory
+
+
+@@ -44,5 +44,5 @@
+ ('global', os.path.join(os.path.sep, 'etc', 'dput.cf')),
+ ('user_xdg', os.path.join(
+- xdg.xdg_config_home(), 'dput', 'dput.cf')),
++ BaseDirectory.xdg_config_home, 'dput', 'dput.cf')),
+ ('user_home', os.path.join(
+ os.path.expanduser('~'), '.dput.cf')),
+diff -rU2 dput.orig/setup.py dput/setup.py
+--- dput.orig/setup.py 2022-07-01 15:15:28.000000000 -0700
++++ dput/setup.py 2022-10-27 10:36:34.862581758 -0700
+@@ -75,5 +75,5 @@
+ "python-debian",
+ "gpg",
+- "xdg",
++ "pyxdg",
+ ],
+ install_requires=[
+@@ -83,5 +83,5 @@
+ "python-debian",
+ "gpg",
+- "xdg",
++ "pyxdg",
+ ],
+ entry_points={