Hiya,
I'm attaching a small patch here, that adds some new make targets to the
makefile. making it easier to modify the code and test.
Not sure if this is the right place to send it to, if its not, please
correct me.
Cheers,
Essien
diff -r 7c7ab95a2d6e Makefile
--- a/Makefile Mon Feb 12 12:15:48 2007 +0100
+++ b/Makefile Mon Feb 12 12:15:30 2007 +0100
@@ -2,7 +2,11 @@ VERSION=$(shell rpm -q --qf "%{VERSION}\
VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec)
RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec)
HGTAG=${PKGNAME}-$(VERSION)-$(RELEASE)
-PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}"
+PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}"
+
+RPM="noarch/${PKGNAME}-$(VERSION)-$(RELEASE).noarch.rpm"
+SRPM="${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm"
+
default: all
@@ -19,7 +23,20 @@ archive: tag
@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.gz"
srpm: archive
- @rm -f ${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm
+ @rm -f $(SRPM)
@rpmbuild -bs ${PKGRPMFLAGS} ${PKGNAME}.spec
- @echo "The srpm is in ${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm"
+ @echo "The srpm is in $(SRPM)"
+rpm: archive
+ @rpmbuild --clean -bb ${PKGRPMFLAGS} ${PKGNAME}.spec
+ @echo "The rpm is in $(RPM)"
+
+rpminstall: rpm
+ @rpm -ivh --force $(RPM)
+
+clean:
+ @rm -f *.rpm
+ @rm -rf noarch
+ @rm -f *.tar.gz
+ @rm -rf dist
+ @rm -f MANIFEST
--
Fedora-buildsys-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list