]>
Commit | Line | Data |
---|---|---|
5366f438 | 1 | include /usr/share/dpkg/pkg-info.mk |
de416bd6 | 2 | |
40718fe1 | 3 | PACKAGE=proxmox-mailgateway |
de416bd6 | 4 | |
5366f438 TL |
5 | GITVERSION:=$(shell git rev-parse HEAD) |
6 | ||
7 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
8 | CT_DEB=${PACKAGE}-container_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
49a2b3c9 TL |
9 | |
10 | DEBS=${DEB} ${CT_DEB} | |
de416bd6 | 11 | |
44653194 | 12 | BUILD_DIR=build |
de416bd6 | 13 | |
95dcef8f DM |
14 | ARCH=amd64 |
15 | DIST=stretch | |
95dcef8f | 16 | |
de416bd6 DM |
17 | all: ${DEB} |
18 | ||
49a2b3c9 TL |
19 | .PHONY: deb |
20 | deb ${CT_DEB}: ${DEB} | |
44653194 DM |
21 | ${DEB}: debian |
22 | rm -rf ${BUILD_DIR} | |
23 | mkdir -p ${BUILD_DIR}/debian | |
24 | cp -ar debian/* ${BUILD_DIR}/debian/ | |
5366f438 | 25 | echo "git clone git://git.proxmox.com/git/proxmox-mailgateway.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE |
44653194 | 26 | cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us |
49a2b3c9 | 27 | lintian ${DEBS} |
de416bd6 | 28 | |
b2771293 | 29 | .PHONY: upload |
49a2b3c9 TL |
30 | upload: ${DEBS} |
31 | tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH} | |
de416bd6 DM |
32 | |
33 | clean: | |
44653194 | 34 | rm -rf ${BUILD_DIR} *.deb *.buildinfo *.changes |
de416bd6 | 35 | find . -name '*~' -exec rm {} ';' |