RELEASE=5.0 PKGREL=7 PACKAGE=proxmox-mailgateway DEB=${PACKAGE}_${RELEASE}-${PKGREL}_all.deb KERNEL_VER=4.13.13 KREL=5 EXTRAVERSION=-${KREL}-pve KVNAME=${KERNEL_VER}${EXTRAVERSION} ARCH=amd64 DIST=stretch STAGING_REPO=/pve/repoman/staging/pmg/dists/${DIST}/pmg-${RELEASE}/binary-${ARCH}/ KERNEL:=$(shell find ${STAGING_REPO} -name "pve-kernel-${KVNAME}_*deb") all: ${DEB} ${DEB}: control copyright changelog.Debian postinst postrm proxmox-release-5.x.pubkey rm -rf build test -n "${KERNEL}" || false "kernel ${KERNEL} not found" mkdir -p build/DEBIAN mkdir -p build/usr/share/doc/${PACKAGE} mkdir -p build/etc/apt/trusted.gpg.d install -m 0644 proxmox-release-5.x.pubkey build/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg install -m 0644 conffiles build/DEBIAN/conffiles install -m 0644 control build/DEBIAN/control install -m 0755 postinst build/DEBIAN/postinst install -m 0755 postrm build/DEBIAN/postrm install -m 0644 copyright build/usr/share/doc/${PACKAGE} install -m 0644 changelog.Debian build/usr/share/doc/${PACKAGE} install -D -m 0644 grub-defaults.cfg build/etc/default/grub.d/proxmox-mailgateway.cfg gzip -n --best build/usr/share/doc/${PACKAGE}/changelog.Debian dpkg-deb --build build ${DEB} lintian ${DEB} %: %.in sed -e 's/@KVNAME@/${KVNAME}/' -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@RELEASE@/${RELEASE}/' -e 's/@PKGREL@/${PKGREL}/' <$< >$@ .PHONY: upload upload: ${DEB} tar cf - ${DEB}|ssh repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH} clean: rm -rf build control postinst postrm *.deb find . -name '*~' -exec rm {} ';'