-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (20 loc) · 917 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name = virt-whom
version = 0.1
.PHONY: pack check install srpm rpm rpmlint upload
$(name)-$(version).tar.gz:
git archive --format=tar --prefix=$(name)-$(version)/ master | gzip > $(name)-$(version).tar.gz
pack: $(name)-$(version).tar.gz
check:
pyflakes *.py
install:
install -d $(DESTDIR)/usr/share/$(name)/ $(DESTDIR)/usr/bin
install -pm 0644 *.py $(DESTDIR)/usr/share/$(name)/
install virt-whom $(DESTDIR)/usr/bin/
srpm: pack
rpmbuild --define "_sourcedir $(PWD)" --define "_specdir $(PWD)" --define "_srcrpmdir $(PWD)" -bs $(name).spec
rpm: pack
rpmbuild --define "_sourcedir $(PWD)" --define "_specdir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)" -bb $(name).spec
rpmlint: srpm rpm
rpmlint $(name).spec $(shell rpmspec -q $(name).spec | sed 's/.noarch//').src.rpm noarch/$(shell rpmspec -q $(name).spec).rpm
upload: pack
scp $(name)-$(version).tar.gz fedorahosted.org:$(name)