]> git.proxmox.com Git - proxmox-mailgateway.git/commitdiff
switch build to dpkg-buildpackage, depend on pve-kernel-4.13 meta package
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Mar 2018 10:29:19 +0000 (11:29 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Mar 2018 10:32:10 +0000 (11:32 +0100)
18 files changed:
Makefile
changelog.Debian [deleted file]
conffiles [deleted file]
control.in [deleted file]
copyright [deleted file]
debian/changelog [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/grub/proxmox-mailgateway.cfg [new file with mode: 0644]
debian/postinst [new file with mode: 0755]
debian/postrm [new file with mode: 0755]
debian/proxmox-mailgateway.install [new file with mode: 0644]
debian/proxmox-ve-release-5.x.gpg [new file with mode: 0644]
debian/rules [new file with mode: 0644]
grub-defaults.cfg [deleted file]
postinst.in [deleted file]
postrm.in [deleted file]
proxmox-release-5.x.pubkey [deleted file]

index da5b846904224b03f938e43a6614e2b34a3c0315..6b2941d52b7f37519ddd975494c5b170d8ca6db4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,49 +1,28 @@
 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 {} ';'
diff --git a/changelog.Debian b/changelog.Debian
deleted file mode 100644 (file)
index 4fba7df..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-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
diff --git a/conffiles b/conffiles
deleted file mode 100644 (file)
index d2cfe33..0000000
--- a/conffiles
+++ /dev/null
@@ -1,2 +0,0 @@
-/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
-/etc/default/grub.d/proxmox-mailgateway.cfg
diff --git a/control.in b/control.in
deleted file mode 100644 (file)
index b72b782..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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.
diff --git a/copyright b/copyright
deleted file mode 100644 (file)
index ceb2633..0000000
--- a/copyright
+++ /dev/null
@@ -1,21 +0,0 @@
-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'.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..59fbace
--- /dev/null
@@ -0,0 +1,58 @@
+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
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..c6690e9
--- /dev/null
@@ -0,0 +1,17 @@
+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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..ceb2633
--- /dev/null
@@ -0,0 +1,21 @@
+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'.
diff --git a/debian/grub/proxmox-mailgateway.cfg b/debian/grub/proxmox-mailgateway.cfg
new file mode 100644 (file)
index 0000000..8862739
--- /dev/null
@@ -0,0 +1 @@
+GRUB_DISTRIBUTOR="Proxmox Mail Gateway"
diff --git a/debian/postinst b/debian/postinst
new file mode 100755 (executable)
index 0000000..aa17f0b
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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
diff --git a/debian/postrm b/debian/postrm
new file mode 100755 (executable)
index 0000000..2ee5c14
--- /dev/null
@@ -0,0 +1,19 @@
+#! /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
+
diff --git a/debian/proxmox-mailgateway.install b/debian/proxmox-mailgateway.install
new file mode 100644 (file)
index 0000000..4be6882
--- /dev/null
@@ -0,0 +1,2 @@
+debian/proxmox-ve-release-5.x.gpg etc/apt/trusted.gpg.d/
+debian/grub/proxmox-mailgateway.cfg etc/default/grub.d/
diff --git a/debian/proxmox-ve-release-5.x.gpg b/debian/proxmox-ve-release-5.x.gpg
new file mode 100644 (file)
index 0000000..8488f45
Binary files /dev/null and b/debian/proxmox-ve-release-5.x.gpg differ
diff --git a/debian/rules b/debian/rules
new file mode 100644 (file)
index 0000000..91ab708
--- /dev/null
@@ -0,0 +1,27 @@
+#!/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:
diff --git a/grub-defaults.cfg b/grub-defaults.cfg
deleted file mode 100644 (file)
index 8862739..0000000
+++ /dev/null
@@ -1 +0,0 @@
-GRUB_DISTRIBUTOR="Proxmox Mail Gateway"
diff --git a/postinst.in b/postinst.in
deleted file mode 100755 (executable)
index 2e260bb..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /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
diff --git a/postrm.in b/postrm.in
deleted file mode 100755 (executable)
index 2ee5c14..0000000
--- a/postrm.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /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
-
diff --git a/proxmox-release-5.x.pubkey b/proxmox-release-5.x.pubkey
deleted file mode 100644 (file)
index 8488f45..0000000
Binary files a/proxmox-release-5.x.pubkey and /dev/null differ