lorax/Makefile

36 lines
967 B
Makefile
Raw Normal View History

2010-02-23 13:20:05 +00:00
PYTHON ?= /usr/bin/env python
2010-12-02 12:36:22 +00:00
PKGNAME = lorax
VERSION = $(shell awk '/Version:/ { print $$2 }' $(PKGNAME).spec)
RELEASE = $(shell awk '/Release:/ { print $$2 }' $(PKGNAME).spec | sed -e 's|%.*$$||g')
TAG = r$(VERSION)-$(RELEASE)
default: all
all:
$(PYTHON) setup.py build
2010-12-02 12:36:22 +00:00
install: all
$(PYTHON) setup.py install --root=$(DESTDIR)
clean:
-rm -rf build
2010-10-12 16:23:29 +00:00
2010-12-02 12:36:22 +00:00
tag:
git tag -f $(TAG)
archive: tag
@git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
@bzip2 $(PKGNAME)-$(VERSION).tar
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.bz2"
2010-10-19 15:35:50 +00:00
2010-12-02 12:36:22 +00:00
local:
@rm -rf $(PKGNAME)-$(VERSION).tar.bz2
@rm -rf /tmp/$(PKGNAME)-$(VERSION) /tmp/$(PKGNAME)
@dir=$$PWD; cp -a $$dir /tmp/$(PKGNAME)-$(VERSION)
@rm -rf /tmp/$(PKGNAME)-$(VERSION)/.git
@dir=$$PWD; cd /tmp; tar --bzip2 -cSpf $$dir/$(PKGNAME)-$(VERSION).tar.bz2 $(PKGNAME)-$(VERSION)
@rm -rf /tmp/$(PKGNAME)-$(VERSION)
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.bz2"