]> git.proxmox.com Git - pmg-api.git/blame - Makefile
buildsys: expand clean target
[pmg-api.git] / Makefile
CommitLineData
05466a9d 1include /usr/share/dpkg/pkg-info.mk
6a672919 2
05466a9d 3PACKAGE=pmg-api
6a672919 4
0d7181b2 5BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
07cb898d 6
1d825e5f 7DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
9beff9f6 8
05466a9d 9REPOID = $(shell git rev-parse --short=8 HEAD)
6a672919 10
05466a9d
TL
11export PACKAGE
12export REPOID
1d825e5f 13export PMGVERSION = $(DEB_VERSION_UPSTREAM_REVISION)
750e1872 14export PMGRELEASE = $(shell echo $(DEB_VERSION_UPSTREAM) | cut -c 1-3)
b68dfb61 15
0d7181b2
TL
16$(BUILDDIR): src debian
17 rm -rf $@ $@.tmp
18 cp -a src $@.tmp
19 cp -a debian $@.tmp/
20 mv $@.tmp $@
21
b68dfb61 22.PHONY: deb
0d7181b2
TL
23deb: $(DEB)
24$(DEB): $(BUILDDIR)
1d825e5f
TL
25 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
26 lintian $(DEB)
b68dfb61 27
b68dfb61 28.PHONY: upload
750e1872 29upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
1d825e5f 30upload: $(DEB)
750e1872 31 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST)
b68dfb61 32
291abd89
DM
33.PHONY: check
34check:
3f324565 35 $(MAKE) -C src/tests check
291abd89 36
05466a9d 37.PHONY: clean distclean
b68dfb61 38distclean: clean
b68dfb61 39clean:
f823e22d
TL
40 rm -rf $(PACKAGE)-[0-9]*/
41 rm -rf *.deb *.changes *.build *.buildinfo $(PACKAGE)*tar* *.dsc
b68dfb61
DM
42
43.PHONY: dinstall
1d825e5f
TL
44dinstall: $(DEB)
45 dpkg -i $(DEB)