2006-11-08 22:52:04 +00:00
|
|
|
PKGNAME=pungi
|
|
|
|
VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec)
|
|
|
|
RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec)
|
|
|
|
HGTAG=${PKGNAME}-$(VERSION)-$(RELEASE)
|
2007-02-12 21:50:02 +00:00
|
|
|
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"
|
|
|
|
|
2006-11-08 22:52:04 +00:00
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
all:
|
|
|
|
@echo "Nothing to do"
|
|
|
|
|
|
|
|
tag:
|
|
|
|
@hg tag -m "$(HGTAG)" $(HGTAG)
|
|
|
|
# @hg push
|
|
|
|
|
2007-02-13 22:12:39 +00:00
|
|
|
archive:
|
2006-11-08 22:52:04 +00:00
|
|
|
@rm -rf ${PKGNAME}-$(VERSION)/
|
|
|
|
@python setup.py sdist > /dev/null
|
|
|
|
@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.gz"
|
|
|
|
|
|
|
|
srpm: archive
|
2007-02-12 21:50:02 +00:00
|
|
|
@rm -f $(SRPM)
|
2006-11-08 22:52:04 +00:00
|
|
|
@rpmbuild -bs ${PKGRPMFLAGS} ${PKGNAME}.spec
|
2007-02-12 21:50:02 +00:00
|
|
|
@echo "The srpm is in $(SRPM)"
|
|
|
|
|
2007-02-13 22:12:39 +00:00
|
|
|
rpm: archive tag
|
2007-02-12 21:50:02 +00:00
|
|
|
@rpmbuild --clean -bb ${PKGRPMFLAGS} ${PKGNAME}.spec
|
|
|
|
@echo "The rpm is in $(RPM)"
|
|
|
|
|
|
|
|
rpminstall: rpm
|
|
|
|
@rpm -ivh --force $(RPM)
|
2006-11-08 22:52:04 +00:00
|
|
|
|
2007-02-12 21:50:02 +00:00
|
|
|
clean:
|
|
|
|
@rm -f *.rpm
|
|
|
|
@rm -rf noarch
|
|
|
|
@rm -f *.tar.gz
|
|
|
|
@rm -rf dist
|
|
|
|
@rm -f MANIFEST
|