]>
Commit | Line | Data |
---|---|---|
de416bd6 | 1 | RELEASE=5.0 |
d6a42a49 | 2 | PKGREL=7 |
de416bd6 | 3 | |
40718fe1 | 4 | PACKAGE=proxmox-mailgateway |
de416bd6 DM |
5 | |
6 | DEB=${PACKAGE}_${RELEASE}-${PKGREL}_all.deb | |
7 | ||
d2274daa | 8 | KERNEL_VER=4.13.13 |
d6a42a49 | 9 | KREL=5 |
de416bd6 DM |
10 | |
11 | EXTRAVERSION=-${KREL}-pve | |
12 | KVNAME=${KERNEL_VER}${EXTRAVERSION} | |
13 | ||
95dcef8f DM |
14 | ARCH=amd64 |
15 | DIST=stretch | |
16 | STAGING_REPO=/pve/repoman/staging/pmg/dists/${DIST}/pmg-${RELEASE}/binary-${ARCH}/ | |
17 | ||
18 | KERNEL:=$(shell find ${STAGING_REPO} -name "pve-kernel-${KVNAME}_*deb") | |
19 | ||
de416bd6 DM |
20 | all: ${DEB} |
21 | ||
22 | ${DEB}: control copyright changelog.Debian postinst postrm proxmox-release-5.x.pubkey | |
23 | rm -rf build | |
079272b0 | 24 | test -n "${KERNEL}" || false "kernel ${KERNEL} not found" |
de416bd6 DM |
25 | mkdir -p build/DEBIAN |
26 | mkdir -p build/usr/share/doc/${PACKAGE} | |
27 | mkdir -p build/etc/apt/trusted.gpg.d | |
28 | install -m 0644 proxmox-release-5.x.pubkey build/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg | |
24dcac1a | 29 | install -m 0644 conffiles build/DEBIAN/conffiles |
de416bd6 DM |
30 | install -m 0644 control build/DEBIAN/control |
31 | install -m 0755 postinst build/DEBIAN/postinst | |
32 | install -m 0755 postrm build/DEBIAN/postrm | |
33 | install -m 0644 copyright build/usr/share/doc/${PACKAGE} | |
34 | install -m 0644 changelog.Debian build/usr/share/doc/${PACKAGE} | |
24dcac1a | 35 | install -D -m 0644 grub-defaults.cfg build/etc/default/grub.d/proxmox-mailgateway.cfg |
de416bd6 DM |
36 | gzip -n --best build/usr/share/doc/${PACKAGE}/changelog.Debian |
37 | dpkg-deb --build build ${DEB} | |
38 | lintian ${DEB} | |
39 | ||
40 | %: %.in | |
41 | sed -e 's/@KVNAME@/${KVNAME}/' -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@RELEASE@/${RELEASE}/' -e 's/@PKGREL@/${PKGREL}/' <$< >$@ | |
42 | ||
b2771293 DM |
43 | .PHONY: upload |
44 | upload: ${DEB} | |
45 | tar cf - ${DEB}|ssh repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH} | |
de416bd6 DM |
46 | |
47 | clean: | |
48 | rm -rf build control postinst postrm *.deb | |
49 | find . -name '*~' -exec rm {} ';' |