summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302023-05-28 12:45:52 +0200
committerM0Rf302023-05-28 12:45:52 +0200
commit2c22d4c76d37c894da8a47d18c3c62be7e9ba9c7 (patch)
tree4c3f9ee5485436d17d1cbf29dd67977aad0b47b8
parent9e9f05f825916697bffc8a3684187bc66895c5f3 (diff)
downloadaur-2c22d4c76d37c894da8a47d18c3c62be7e9ba9c7.tar.gz
python-dmidecode: 3.12.3
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD23
-rw-r--r--makefile.patch18
3 files changed, 36 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 060b8cfec4ac..2e64010db17d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -13,6 +13,8 @@ pkgbase = python-dmidecode
depends = libxml2
depends = python-lxml
source = https://github.com/nima/python-dmidecode/archive/v3.12.3.tar.gz
+ source = makefile.patch
sha256sums = 44d45d7d8344290c259c989d3af3f614c7837cbd85052d486adfa46a1c777164
+ sha256sums = 5d1a97117e586cb36932518e69393cd6b99671a471145ad28bb39e790f59e31b
pkgname = python-dmidecode
diff --git a/PKGBUILD b/PKGBUILD
index f4aed1f53bc6..5da784c4433b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,22 +2,31 @@
pkgname=python-dmidecode
pkgver=3.12.3
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
-url="https://git.fedorahosted.org/cgit/python-dmidecode.git"
+url="https://github.com/nima/python-dmidecode"
pkgdesc="Python module to access DMI data"
license=('GPL2')
depends=('python' 'dmidecode' 'libxml2' 'python-lxml')
makedepends=('python' 'libxml2')
-source=("https://github.com/nima/python-dmidecode/archive/v$pkgver.tar.gz")
+source=("${url}/archive/v$pkgver.tar.gz"
+ makefile.patch)
-package() {
+prepare() {
+ cd $srcdir/$pkgbase-${pkgver}
+ patch -Np1 -i ../makefile.patch
+}
+
+build() {
cd $srcdir/$pkgbase-${pkgver}
- sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
export CFLAGS+=" -std=gnu89"
make build
- python src/setup.py install --root=$pkgdir
+}
+package() {
+ cd $srcdir/$pkgbase-${pkgver}
+ python src/setup.py install --root=$pkgdir
}
-sha256sums=('44d45d7d8344290c259c989d3af3f614c7837cbd85052d486adfa46a1c777164')
+sha256sums=('44d45d7d8344290c259c989d3af3f614c7837cbd85052d486adfa46a1c777164'
+ '46413b661e5394b65a4be50bd46102aaa4214e3d6e993613f53e58e98e2f602c')
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 000000000000..7046d32db24f
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,18 @@
+diff '--color=auto' -Naur a/Makefile b/Makefile
+--- a/Makefile 2023-05-28 11:54:23.329023318 +0200
++++ b/Makefile 2023-05-28 12:44:49.660643732 +0200
+@@ -41,10 +41,11 @@
+ PY_BIN := python3
+ VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *; print(get_version());")
+ PACKAGE := python-dmidecode
+-PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
++PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d%d"%sys.version_info[0:2])')
++PYTH_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
+ PY_MV := $(shell echo $(PY_VER) | cut -b 1)
+-PY := python$(PY_VER)
+-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
++PY := python$(PYTH_VER)
++SO_PATH := build/lib.linux-$(shell uname -m)-cpython-$(PY_VER)
+ ifeq ($(PY_MV),2)
+ SO := $(SO_PATH)/dmidecodemod.so
+ else