2015-05-08 23:52:18 +00:00
|
|
|
PYTHON ?= /usr/bin/python3
|
2010-12-08 13:16:13 +00:00
|
|
|
DESTDIR ?= /
|
2008-10-05 05:51:17 +00:00
|
|
|
|
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')
|
2013-02-28 19:53:34 +00:00
|
|
|
TAG = lorax-$(VERSION)-$(RELEASE)
|
2010-12-02 12:36:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
default: all
|
2008-10-05 05:51:17 +00:00
|
|
|
|
2011-10-24 22:49:39 +00:00
|
|
|
src/pylorax/version.py: lorax.spec
|
|
|
|
echo "num = '$(VERSION)-$(RELEASE)'" > src/pylorax/version.py
|
|
|
|
|
|
|
|
all: src/pylorax/version.py
|
2008-10-05 05:51:17 +00:00
|
|
|
$(PYTHON) setup.py build
|
|
|
|
|
2010-12-02 12:36:22 +00:00
|
|
|
install: all
|
|
|
|
$(PYTHON) setup.py install --root=$(DESTDIR)
|
2013-07-26 22:01:14 +00:00
|
|
|
mkdir -p $(DESTDIR)/$(mandir)/man1
|
2013-07-26 22:38:29 +00:00
|
|
|
install -m 644 docs/lorax.1 $(DESTDIR)/$(mandir)/man1
|
2013-07-26 22:01:14 +00:00
|
|
|
install -m 644 docs/livemedia-creator.1 $(DESTDIR)/$(mandir)/man1
|
2008-10-05 05:51:17 +00:00
|
|
|
|
2014-05-08 18:43:00 +00:00
|
|
|
check:
|
|
|
|
@echo "*** Running pylint ***"
|
2015-05-08 23:20:39 +00:00
|
|
|
PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py
|
2014-05-08 18:43:00 +00:00
|
|
|
|
2008-10-05 05:51:17 +00:00
|
|
|
clean:
|
2011-10-24 22:49:39 +00:00
|
|
|
-rm -rf build src/pylorax/version.py
|
2010-10-12 16:23:29 +00:00
|
|
|
|
2010-12-02 12:36:22 +00:00
|
|
|
tag:
|
|
|
|
git tag -f $(TAG)
|
|
|
|
|
2015-04-08 21:02:26 +00:00
|
|
|
docs:
|
|
|
|
$(MAKE) -C docs apidoc
|
|
|
|
|
2013-08-01 16:48:28 +00:00
|
|
|
archive:
|
2010-12-02 12:36:22 +00:00
|
|
|
@git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
|
2013-02-28 20:11:05 +00:00
|
|
|
@gzip $(PKGNAME)-$(VERSION).tar
|
|
|
|
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
|
2010-10-19 15:35:50 +00:00
|
|
|
|
2013-08-01 16:48:28 +00:00
|
|
|
dist: tag archive
|
|
|
|
scp $(PKGNAME)-$(VERSION).tar.gz fedorahosted.org:lorax
|
|
|
|
|
2010-12-02 12:36:22 +00:00
|
|
|
local:
|
2013-02-28 20:11:05 +00:00
|
|
|
@rm -rf $(PKGNAME)-$(VERSION).tar.gz
|
|
|
|
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION)
|
|
|
|
@dir=$$PWD; cp -a $$dir /var/tmp/$(PKGNAME)-$(VERSION)
|
|
|
|
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION)/.git
|
|
|
|
@dir=$$PWD; cd /var/tmp; tar --gzip -cSpf $$dir/$(PKGNAME)-$(VERSION).tar.gz $(PKGNAME)-$(VERSION)
|
|
|
|
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION)
|
|
|
|
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
|