From 133cf6aad3e36ec1c36db943d0f76d4a6d44ec88 Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Thu, 12 Dec 2024 16:50:10 +0100 Subject: [PATCH] fix: Building of archive and RPM should work * It wasn't possible to build .tar.gz archive nor RPM using Makefile --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e774245..1ba21be 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -PKGNAME = iniparse -SPECVERSION=$(shell awk '/Version:/ { print $$2 }' python-${PKGNAME}.spec) -SETUPVERSION=$(shell awk -F\' '/VERSION =/ { print $$2 }' setup.py) +PKG_NAME=iniparse +SPEC_VERSION=$(shell awk '/Version:/ { print $$2 }' python-${PKG_NAME}.spec) +SETUP_VERSION=$(shell awk '/VERSION =/ { print $$3 }' setup.py) clean: rm -f *.pyc *.pyo *~ *.bak @@ -10,10 +10,11 @@ clean: archive: python setup.py sdist -d . - @echo "The archive is in ${PKGNAME}-$(SETUPVERSION).tar.gz" + mv ${PKG_NAME}-${SETUP_VERSION}.tar.gz python-${PKG_NAME}-${SETUP_VERSION}.tar.gz + @echo "The archive is in python-${PKG_NAME}-${SETUP_VERSION}.tar.gz" rpmbuild: archive - rpmbuild -ta ${PKGNAME}-$(SPECVERSION).tar.gz + rpmbuild -ta python-${PKG_NAME}-$(SPEC_VERSION).tar.gz pychecker: pychecker --stdlib iniparse/*py tests/*py