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)
|
2008-04-01 18:58:05 +00:00
|
|
|
GITTAG=${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:
|
2008-04-01 18:58:05 +00:00
|
|
|
@git tag -a -m "Tag as $(GITTAG)" -f $(GITTAG)
|
|
|
|
@echo "Tagged as $(GITTAG)"
|
2006-11-08 22:52:04 +00:00
|
|
|
# @hg push
|
|
|
|
|
2008-04-01 18:58:05 +00:00
|
|
|
Changelog:
|
2009-03-09 22:22:44 +00:00
|
|
|
(GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp Changelog; rm -f .changelog.tmp) || (touch Changelog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
2008-04-01 18:58:05 +00:00
|
|
|
|
2007-02-13 22:12:39 +00:00
|
|
|
archive:
|
2008-04-01 18:58:05 +00:00
|
|
|
@rm -f Changelog
|
2009-03-09 22:34:59 +00:00
|
|
|
@rm -f MANIFEST
|
2008-04-01 18:58:05 +00:00
|
|
|
@make Changelog
|
2006-11-08 22:52:04 +00:00
|
|
|
@rm -rf ${PKGNAME}-$(VERSION)/
|
2008-01-02 22:41:54 +00:00
|
|
|
@python setup.py sdist --formats=bztar > /dev/null
|
2008-04-01 18:58:38 +00:00
|
|
|
@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.bz2"
|
2006-11-08 22:52:04 +00:00
|
|
|
|
|
|
|
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-15 23:19:20 +00:00
|
|
|
rpm: archive
|
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-15 23:19:20 +00:00
|
|
|
release: tag srpm
|
|
|
|
|
2007-06-11 18:37:35 +00:00
|
|
|
install:
|
|
|
|
@python setup.py install
|
|
|
|
|
2007-02-12 21:50:02 +00:00
|
|
|
clean:
|
2007-08-09 01:03:11 +00:00
|
|
|
@rm -vf *.rpm
|
|
|
|
@rm -vrf noarch
|
|
|
|
@rm -vf *.tar.gz
|
|
|
|
@rm -vrf dist
|
|
|
|
@rm -vf MANIFEST
|
2008-04-01 18:58:05 +00:00
|
|
|
@rm -vf Changelog
|