]> git.proxmox.com Git - proxmox-acme.git/blob - Makefile
buildsys: automatically dervice upload dist
[proxmox-acme.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 SRC=libproxmox-acme
4
5 BUILDDIR ?= $(SRC)-$(DEB_VERSION_UPSTREAM)
6 GITVERSION:=$(shell git rev-parse HEAD)
7
8 DEB_PERL=libproxmox-acme-perl_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
9 DEB_ACME_PLUGS=libproxmox-acme-plugins_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
10 DEBS=$(DEB_PERL) $(DEB_ACME_PLUGS)
11
12 DSC=$(SRC)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
13
14 ACME_SUBMODULE="src/acme.sh"
15
16 all: $(DEB)
17
18 .PHONY: submodule
19 submodule:
20 test -d $(ACME_SUBMODULE)/README.md || git submodule update --init --recursive
21
22 $(BUILDDIR): src debian submodule
23 rm -rf $(BUILDDIR).tmp
24 cp -a src $(BUILDDIR).tmp
25 cp -a debian $(BUILDDIR).tmp/
26 echo "git clone git://git.proxmox.com/git/proxmox-acme\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
27 mv $(BUILDDIR).tmp $(BUILDDIR)
28
29 .PHONY: deb
30 deb: $(DEBS)
31 $(DEBS): $(BUILDDIR)
32 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
33 lintian $(DEBS)
34
35 .PHONY: dsc
36 dsc: $(DSC)
37 $(DSC): $(BUILDDIR)
38 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
39 lintian $(DSC)
40
41 dinstall: $(DEBS)
42 dpkg -i $(DEBS)
43
44 .PHONY: clean
45 clean:
46 rm -rf $(SRC)-*/ $(BUILDDIR).tmp *.deb *.buildinfo *.changes *.dsc *.tar.?z
47
48 .PHONY: upload
49 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
50 upload: $(DEBS)
51 tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist $(UPLOAD_DIST)
52 tar cf - $(DEB_ACME_PLUGS)|ssh -X repoman@repo.proxmox.com -- upload --product pbs --dist $(UPLOAD_DIST)