Make sure the F11 handler gets used for "partition" and "part" (#501020).
[pykickstart.git] / Makefile
blob39a7ac7a38449d2cffddc8fcf3eab48a1b8af7b7
1 PKGNAME=pykickstart
2 VERSION=$(shell awk '/Version:/ { print $$2 }' $(PKGNAME).spec)
3 RELEASE=$(shell awk '/Release:/ { print $$2 }' $(PKGNAME).spec | sed -e 's|%.*$$||g')
4 TAG=r$(VERSION)-$(RELEASE)
6 MANDIR=/usr/share/man
7 PREFIX=/usr
9 TESTSUITE:=tests/baseclass.py
11 PYCHECKEROPTS=--no-argsused --no-miximport --maxargs 0 --no-local -\# 0 --only -Q
13 default: all
15 all:
16 $(MAKE) -C po
18 docs:
19 curl -A "pykickstart-build" -o docs/kickstart-docs.txt "http://fedoraproject.org/wiki/Anaconda/Kickstart?action=raw"
21 check:
22 @echo "*** Running pychecker to verify source ***"
23 PYTHONPATH=. pychecker $(PYCHECKEROPTS) pykickstart/*.py pykickstart/commands/*.py pykickstart/handlers/*.py
25 test:
26 @echo "*** Running unittests ***"
27 PYTHONPATH=. python $(TESTSUITE) -v
29 clean:
30 -rm *.tar.gz pykickstart/*.pyc pykickstart/commands/*.pyc pykickstart/handlers/*.pyc tests/*.pyc tests/commands/*.pyc docs/kickstart-docs.txt ChangeLog
31 $(MAKE) -C po clean
32 python setup.py -q clean --all
34 install: all
35 python setup.py install --root=$(DESTDIR)
36 $(MAKE) -C po install
38 ChangeLog:
39 (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)
41 tag:
42 git tag -a -m "Tag as $(TAG)" -f $(TAG)
43 @echo "Tagged as $(TAG)"
45 archive: check tag docs
46 @rm -f ChangeLog
47 @make ChangeLog
48 git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
49 mkdir -p $(PKGNAME)-$(VERSION)/docs/
50 cp docs/kickstart-docs.txt $(PKGNAME)-$(VERSION)/docs/
51 cp ChangeLog $(PKGNAME)-$(VERSION)/
52 tar -rf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
53 gzip -9 $(PKGNAME)-$(VERSION).tar
54 rm -rf $(PKGNAME)-$(VERSION)
55 @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
57 local: docs
58 @rm -f ChangeLog
59 @make ChangeLog
60 @rm -rf $(PKGNAME)-$(VERSION).tar.gz
61 @rm -rf /tmp/$(PKGNAME)-$(VERSION) /tmp/$(PKGNAME)
62 @dir=$$PWD; cp -a $$dir /tmp/$(PKGNAME)-$(VERSION)
63 @cd /tmp/$(PKGNAME)-$(VERSION) ; python setup.py -q sdist
64 @cp /tmp/$(PKGNAME)-$(VERSION)/dist/$(PKGNAME)-$(VERSION).tar.gz .
65 @rm -rf /tmp/$(PKGNAME)-$(VERSION)
66 @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
68 rpmlog:
69 @git log --pretty="format:- %s (%ae)" $(TAG).. |sed -e 's/@.*)/)/'
70 @echo
72 bumpver:
73 @NEWSUBVER=$$((`echo $(VERSION) |cut -d . -f 2` + 1)) ; \
74 NEWVERSION=`echo $(VERSION).$$NEWSUBVER |cut -d . -f 1,3` ; \
75 DATELINE="* `date "+%a %b %d %Y"` `git config user.name` <`git config user.email`> - $$NEWVERSION-1" ; \
76 cl=`grep -n %changelog pykickstart.spec |cut -d : -f 1` ; \
77 tail --lines=+$$(($$cl + 1)) pykickstart.spec > speclog ; \
78 (head -n $$cl pykickstart.spec ; echo "$$DATELINE" ; make --quiet rpmlog 2>/dev/null ; echo ""; cat speclog) > pykickstart.spec.new ; \
79 mv pykickstart.spec.new pykickstart.spec ; rm -f speclog ; \
80 sed -i "s/Version: $(VERSION)/Version: $$NEWVERSION/" pykickstart.spec ; \
81 sed -i "s/version='$(VERSION)'/version='$$NEWVERSION'/" setup.py
83 .PHONY: check clean install tag archive local docs