]> git.proxmox.com Git - proxmox-mailgateway.git/blame - Makefile
add test if we have correct kernel on staging
[proxmox-mailgateway.git] / Makefile
CommitLineData
de416bd6
DM
1RELEASE=5.0
2PKGREL=1
3
4PACKAGE=proxmox-pmg
5
6DEB=${PACKAGE}_${RELEASE}-${PKGREL}_all.deb
7
8KERNEL_VER=4.13.4
9KREL=1
10
11EXTRAVERSION=-${KREL}-pve
12KVNAME=${KERNEL_VER}${EXTRAVERSION}
13
95dcef8f
DM
14ARCH=amd64
15DIST=stretch
16STAGING_REPO=/pve/repoman/staging/pmg/dists/${DIST}/pmg-${RELEASE}/binary-${ARCH}/
17
18KERNEL:=$(shell find ${STAGING_REPO} -name "pve-kernel-${KVNAME}_*deb")
19
de416bd6
DM
20all: ${DEB}
21
22${DEB}: control copyright changelog.Debian postinst postrm proxmox-release-5.x.pubkey
23 rm -rf build
95dcef8f 24 test -n "${KERNEL}" || false "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
29 echo "/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg" > build/DEBIAN/conffiles
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}
35 gzip -n --best build/usr/share/doc/${PACKAGE}/changelog.Debian
36 dpkg-deb --build build ${DEB}
37 lintian ${DEB}
38
39%: %.in
40 sed -e 's/@KVNAME@/${KVNAME}/' -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@RELEASE@/${RELEASE}/' -e 's/@PKGREL@/${PKGREL}/' <$< >$@
41
42
43clean:
44 rm -rf build control postinst postrm *.deb
45 find . -name '*~' -exec rm {} ';'