summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-11-27 17:41:10 +0100
committerDavid Sommerseth <davids@redhat.com>2009-11-27 17:41:10 +0100
commit82116c58f68e9c80cd0334417f3430d6239450a1 (patch)
tree16e150964e9f6a164300673b702f4416df96b114
parentc029d7c17185c6550d008e50f0b8b9e4029acb2e (diff)
downloadpython-dmidecode-82116c58f68e9c80cd0334417f3430d6239450a1.tar.gz
python-dmidecode-82116c58f68e9c80cd0334417f3430d6239450a1.tar.xz
python-dmidecode-82116c58f68e9c80cd0334417f3430d6239450a1.zip
Added rpm-md5 Make target
This is to build src.rpms which can be built on RHEL distribution. In Fedora 11, RPM changed the file hashing from MD5 to SHA1. The rpm-md5 will use rpmbuild-md5 on these distributions, which then uses the old MD5 hashing.
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 107dbdb..98e6df7 100644
--- a/Makefile
+++ b/Makefile
@@ -47,12 +47,17 @@ tarball:
cp -r contrib doc examples Makefile man README src dmidecode.py $(PACKAGE)-$(VERSION)
tar -czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
-rpm: tarball
+rpm-prep:
mkdir -p rpm/{BUILD,RPMS,SRPMS,SPECS,SOURCES}
cp contrib/$(PACKAGE).spec rpm/SPECS
cp $(PACKAGE)-$(VERSION).tar.gz rpm/SOURCES
+
+rpm: tarball rpm-prep
rpmbuild -ba --define "_topdir $(shell pwd)/rpm" rpm/SPECS/$(PACKAGE).spec
+rpm-md5: tarball rpm-prep
+ rpmbuild-md5 -ba --define "_topdir $(shell pwd)/rpm" rpm/SPECS/$(PACKAGE).spec
+
unit:
$(MAKE) -C unit-tests