blob: 1bbe1578871d03dbf803eead9fb94bdad06064d1 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#
# generate rpm package source from current git branch
#
# location of rpm source files. We use dist automatically
# created by python distutils command
DISTDIR = ./dist
GITVERSION = $(shell git describe --tags --dirty --always)
PREFIX = $(shell echo $(GITVERSION) | cut -d '-' -f 1)
SPECFILE = $(DISTDIR)/python-$(PREFIX).spec
VERSION = $(shell python3 setup.py --version)
TARFILE = $(DISTDIR)/$(VERSION).tar.bz2
.PHONY : clean
python = /usr/bin/python3
.PHONY: all test clean
all: $(SPECFILE)
info:
echo $(TARFILE)
clean:
rm -f $(DISTDIR)/*.tar.bz2
rm -f $(SPECFILE)
changelog:
git log > ChangeLog
$(TARFILE): changelog
$(python) setup.py sdist --formats=bztar
$(SPECFILE): $(TARFILE)
cat ./spec/python-obsapi.spec.tmpl | sed "s/__version__/$(VERSION)/g" > $(SPECFILE)
install:
$(python) setup.py install --verbose
uninstall:
$(python) setup.py uninstall --verbose
test:
$(python) setup.py test
|