RELEASE=5.0
-PKGREL=8
+PKGREL=9
PACKAGE=proxmox-mailgateway
DEB=${PACKAGE}_${RELEASE}-${PKGREL}_all.deb
-KERNEL_VER=4.13.13
-KREL=6
-
-EXTRAVERSION=-${KREL}-pve
-KVNAME=${KERNEL_VER}${EXTRAVERSION}
+BUILD_DIR=build
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}
+${DEB}: debian
+ rm -rf ${BUILD_DIR}
+ mkdir -p ${BUILD_DIR}/debian
+ cp -ar debian/* ${BUILD_DIR}/debian/
+ cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
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 -X repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH}
clean:
- rm -rf build control postinst postrm *.deb
+ rm -rf ${BUILD_DIR} *.deb *.buildinfo *.changes
find . -name '*~' -exec rm {} ';'
+++ /dev/null
-proxmox-mailgateway (5.0-8) unstable; urgency=medium
-
- * depend on new kernel 4.13.13-6
-
- -- Proxmox Support Team <support@proxmox.com> Mon, 26 Feb 2018 10:24:29 +0100
-
-proxmox-mailgateway (5.0-7) unstable; urgency=medium
-
- * depend on new kernel 4.13.13-5
-
- -- Proxmox Support Team <support@proxmox.com> Tue, 16 Jan 2018 12:12:56 +0100
-
-proxmox-mailgateway (5.0-6) unstable; urgency=medium
-
- * depend on new kernel 4.13.13-4
-
- -- Proxmox Support Team <support@proxmox.com> Tue, 09 Jan 2018 11:56:15 +0100
-
-proxmox-mailgateway (5.0-5) unstable; urgency=medium
-
- * depend on new kernel 4.13.13-2
-
- -- Proxmox Support Team <support@proxmox.com> Thu, 21 Dec 2017 13:00:40 +0100
-
-proxmox-mailgateway (5.0-4) unstable; urgency=medium
-
- * control.in: depend on new kernel 4.13.13-1
-
- * remove unneeded depends: openssh-client, openssh-server, apt,
- vncterm (pmg-api already depends on this).
-
- -- Proxmox Support Team <support@proxmox.com> Tue, 12 Dec 2017 10:49:23 +0100
-
-proxmox-mailgateway (5.0-3) unstable; urgency=medium
-
- * install /etc/default/grub.d/proxmox-mailgateway.cfg
-
- -- Proxmox Support Team <support@proxmox.com> Wed, 15 Nov 2017 11:52:28 +0100
-
-proxmox-mailgateway (5.0-2) unstable; urgency=medium
-
- * rename package to proxmox-mailgateway
-
- -- Proxmox Support Team <support@proxmox.com> Tue, 14 Nov 2017 12:03:12 +0100
-
-proxmox-pmg (5.0-1) unstable; urgency=medium
-
- * first public release
-
- -- Proxmox Support Team <support@proxmox.com> Tue, 14 Nov 2017 09:11:38 +0100
+++ /dev/null
-/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
-/etc/default/grub.d/proxmox-mailgateway.cfg
+++ /dev/null
-Package: proxmox-mailgateway
-Version: @RELEASE@-@PKGREL@
-Architecture: all
-Section: admin
-Priority: optional
-Depends: libc6 (>= 2.7-18), pve-kernel-@KVNAME@, pve-firmware, pmg-api
-Maintainer: Proxmox Support Team <support@proxmox.com>
-Description: Proxmox Mail Gateway
- The Proxmox Mail Gateway is an easy to use Open Source SMTP proxy,
- including efficient Spam and virus filters. This is a meta package
- which will install everything needed. This package also depends on
- the latest available Proxmox kernel from the @KERNEL_VER@ series.
+++ /dev/null
-Copyright (C) 2017 Proxmox Server Solutions GmbH
-
-This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 dated June, 1991.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301 USA
-
-The complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL-2'.
--- /dev/null
+proxmox-mailgateway (5.0-9) unstable; urgency=medium
+
+ * switch build to dpkg-buildpackage
+
+ * depend on pve-kernel-4.13 meta package
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 21 Mar 2018 10:58:19 +0100
+
+proxmox-mailgateway (5.0-8) unstable; urgency=medium
+
+ * depend on new kernel 4.13.13-6
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 26 Feb 2018 10:24:29 +0100
+
+proxmox-mailgateway (5.0-7) unstable; urgency=medium
+
+ * depend on new kernel 4.13.13-5
+
+ -- Proxmox Support Team <support@proxmox.com> Tue, 16 Jan 2018 12:12:56 +0100
+
+proxmox-mailgateway (5.0-6) unstable; urgency=medium
+
+ * depend on new kernel 4.13.13-4
+
+ -- Proxmox Support Team <support@proxmox.com> Tue, 09 Jan 2018 11:56:15 +0100
+
+proxmox-mailgateway (5.0-5) unstable; urgency=medium
+
+ * depend on new kernel 4.13.13-2
+
+ -- Proxmox Support Team <support@proxmox.com> Thu, 21 Dec 2017 13:00:40 +0100
+
+proxmox-mailgateway (5.0-4) unstable; urgency=medium
+
+ * control.in: depend on new kernel 4.13.13-1
+
+ * remove unneeded depends: openssh-client, openssh-server, apt,
+ vncterm (pmg-api already depends on this).
+
+ -- Proxmox Support Team <support@proxmox.com> Tue, 12 Dec 2017 10:49:23 +0100
+
+proxmox-mailgateway (5.0-3) unstable; urgency=medium
+
+ * install /etc/default/grub.d/proxmox-mailgateway.cfg
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 15 Nov 2017 11:52:28 +0100
+
+proxmox-mailgateway (5.0-2) unstable; urgency=medium
+
+ * rename package to proxmox-mailgateway
+
+ -- Proxmox Support Team <support@proxmox.com> Tue, 14 Nov 2017 12:03:12 +0100
+
+proxmox-pmg (5.0-1) unstable; urgency=medium
+
+ * first public release
+
+ -- Proxmox Support Team <support@proxmox.com> Tue, 14 Nov 2017 09:11:38 +0100
--- /dev/null
+Source: proxmox-mailgateway
+Section: admin
+Priority: optional
+Build-Depends: debhelper (>=10~),
+ lintian
+Maintainer: Proxmox Support Team <support@proxmox.com>
+
+Package: proxmox-mailgateway
+Architecture: all
+Depends: libc6 (>= 2.7-18),
+ pve-kernel-4.13,
+ pmg-api
+Description: Proxmox Mail Gateway
+ The Proxmox Mail Gateway is an easy to use Open Source SMTP proxy,
+ including efficient Spam and virus filters. This is a meta package
+ which will install everything needed. This package also depends on
+ the latest available Proxmox kernel.
--- /dev/null
+Copyright (C) 2017 Proxmox Server Solutions GmbH
+
+This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
+
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 dated June, 1991.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301 USA
+
+The complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
--- /dev/null
+GRUB_DISTRIBUTOR="Proxmox Mail Gateway"
--- /dev/null
+#!/bin/sh
+
+# Abort if any command returns an error value
+set -e
+
+case "$1" in
+ configure)
+ # setup kernel links for installation CD (rescue boot)
+ mkdir -p /boot/pve
+ ln -sf /boot/pve/vmlinuz-4.13 /boot/pve/vmlinuz
+ ln -sf /boot/pve/initrd.img-4.13 /boot/pve/initrd.img
+ ;;
+esac
+
+exit 0
--- /dev/null
+#! /bin/sh
+
+# Abort if any command returns an error value
+set -e
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ # remove kernel symlinks
+ rm -f /boot/pve/vmlinuz
+ rm -f /boot/pve/initrd.img
+ rmdir --ignore-fail-on-non-empty /boot/pve/ || true
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
--- /dev/null
+debian/proxmox-ve-release-5.x.gpg etc/apt/trusted.gpg.d/
+debian/grub/proxmox-mailgateway.cfg etc/default/grub.d/
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+install:
+ dh_install
+ dh_installdocs
+ dh_installchangelogs
+ dh_installman
+ dh_strip_nondeterminism
+ dh_compress
+ dh_fixperms
+
+binary: install
+ dh_strip
+ dh_makeshlibs
+ dh_shlibdeps
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+.PHONY: build clean
+build clean:
+++ /dev/null
-GRUB_DISTRIBUTOR="Proxmox Mail Gateway"
+++ /dev/null
-#! /bin/sh
-
-# Abort if any command returns an error value
-set -e
-
-# This script is called as the last step of the installation of the
-# package. All the package's files are in place, dpkg has already
-# done its automatic conffile handling, and all the packages we depend
-# of are already fully installed and configured.
-
-# The following idempotent stuff doesn't generally need protecting
-# against being run in the abort-* cases.
-
-case "$1" in
- configure)
- # Configure this package. If the package must prompt the user for
- # information, do it here.
-
- # setup kernel links for installation CD (rescue boot)
- mkdir -p /boot/pve
- ln -sf /boot/vmlinuz-@KVNAME@ /boot/pve/vmlinuz
- ln -sf /boot/initrd.img-@KVNAME@ /boot/pve/initrd.img
-
- # There are three sub-cases:
- if test "${2+set}" != set; then
- # We're being installed by an ancient dpkg which doesn't remember
- # which version was most recently configured, or even whether
- # there is a most recently configured version.
- :
-
- elif test -z "$2" -o "$2" = "<unknown>"; then
- # The package has not ever been configured on this system, or was
- # purged since it was last configured.
- :
-
- else
- # Version $2 is the most recently configured version of this
- # package.
- :
-
- fi ;;
- abort-upgrade)
- # Back out of an attempt to upgrade this package FROM THIS VERSION
- # to version $2. Undo the effects of "prerm upgrade $2".
- :
-
- ;;
- abort-remove)
- if test "$2" != in-favour; then
- echo "$0: undocumented call to \`postinst $*'" 1>&2
- exit 0
- fi
- # Back out of an attempt to remove this package, which was due to
- # a conflict with package $3 (version $4). Undo the effects of
- # "prerm remove in-favour $3 $4".
- :
-
- ;;
- abort-deconfigure)
- if test "$2" != in-favour -o "$5" != removing; then
- echo "$0: undocumented call to \`postinst $*'" 1>&2
- exit 0
- fi
- # Back out of an attempt to deconfigure this package, which was
- # due to package $6 (version $7) which we depend on being removed
- # to make way for package $3 (version $4). Undo the effects of
- # "prerm deconfigure in-favour $3 $4 removing $6 $7".
- :
-
- ;;
- *) echo "$0: didn't understand being called with \`$1'" 1>&2
- exit 0;;
-esac
-
-exit 0
+++ /dev/null
-#! /bin/sh
-
-# Abort if any command returns an error value
-set -e
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- # remove kernel symlinks
- rm -f /boot/pve/vmlinuz
- rm -f /boot/pve/initrd.img
- rmdir --ignore-fail-on-non-empty /boot/pve/ || true
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-