]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/default.mk | |
2 | ||
3 | PACKAGE=libpve-apiclient-perl | |
4 | ||
5 | BUILDSRC := $(PACKAGE)-$(DEB_VERSION) | |
6 | DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb | |
7 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc | |
8 | ||
9 | DESTDIR= | |
10 | PERL5DIR=$(DESTDIR)/usr/share/perl5 | |
11 | DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE) | |
12 | ||
13 | GITVERSION:=$(shell git rev-parse HEAD) | |
14 | ||
15 | all: $(DEB) | |
16 | ||
17 | $(BUILDSRC): | |
18 | rm -rf $@ $@.tmp | |
19 | cp -a src $@.tmp | |
20 | cp -a debian $@.tmp/ | |
21 | echo "git clone git://git.proxmox.com/git/pve-apiclient.git\\ngit checkout $(GITVERSION)" >$@.tmp/debian/SOURCE | |
22 | mv $@.tmp $@ | |
23 | ||
24 | .PHONY: deb | |
25 | deb $(DEB): $(BUILDSRC) | |
26 | cd $(BUILDSRC); dpkg-buildpackage -b -us -uc | |
27 | lintian $(DEB) | |
28 | ||
29 | .PHONY: dsc | |
30 | dsc: $(DSC) | |
31 | $(DSC): $(BUILDSRC) | |
32 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d | |
33 | lintian $(DSC) | |
34 | ||
35 | sbuild: $(DSC) | |
36 | sbuild $(DSC) | |
37 | ||
38 | .PHONY: upload | |
39 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) | |
40 | upload: $(DEB) | |
41 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist $(UPLOAD_DIST) | |
42 | ||
43 | distclean: clean | |
44 | clean: | |
45 | rm -rf $(PACKAGE)-[0-9]*/ *.deb *.changes *.buildinfo *.build *.dsc *.tar.* | |
46 | ||
47 | .PHONY: dinstall | |
48 | dinstall: $(DEB) | |
49 | dpkg -i $(DEB) |