]>
Commit | Line | Data |
---|---|---|
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: ${DEBS} | |
50 | tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist bullseye --arch ${DEB_BUILD_ARCH} | |
51 | tar cf - ${DEB_ACME_PLUGS}|ssh -X repoman@repo.proxmox.com -- upload --product pbs --dist bullseye --arch ${DEB_BUILD_ARCH} |