--- /dev/null
+RELEASE=5.1
+PKGREL=42
+
+export KERNEL_VER=4.13
+export KERNEL_ABI=4.13.13-6-pve
+
+PACKAGE=pve-kernel-${KERNEL_VER}
+
+GITVERSION:=$(shell git rev-parse HEAD)
+
+KERNEL_DEB=pve-kernel-${KERNEL_VER}_${RELEASE}-${PKGREL}_all.deb
+HEADERS_DEB=pve-headers-${KERNEL_VER}_${RELEASE}-${PKGREL}_all.deb
+
+BUILD_DIR=build
+
+DEBS=${KERNEL_DEB} ${HEADERS_DEB}
+
+all: deb
+deb: ${DEBS}
+
+${HEADERS_DEB}: ${KERNEL_DEB}
+${KERNEL_DEB}: debian
+ rm -rf ${BUILD_DIR}
+ mkdir -p ${BUILD_DIR}/debian
+ cp -ar debian/* ${BUILD_DIR}/debian/
+ cd ${BUILD_DIR}; debian/rules debian/control
+ echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
+ cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
+ lintian ${KERNEL_DEB}
+ lintian ${HEADERS_DEB}
+
+.PHONY: upload
+upload: ${DEBS}
+ tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch --arch ${ARCH}
+
+.PHONY: distclean
+distclean: clean
+
+.PHONY: clean
+clean:
+ rm -rf *~ ${BUILD_DIR} *.deb *.dsc *.changes *.buildinfo
--- /dev/null
+pve-kernel-4.13 (5.1-42) unstable; urgency=medium
+
+ * add new meta packages pve-kernel-4.13 and pve-headers-4.13
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 5 Mar 2018 15:05:49 +0100
--- /dev/null
+Source: pve-kernel-@KERNEL_VER@
+Section: admin
+Priority: optional
+Build-Depends: debhelper (>=10~),
+ lintian,
+ sed,
+Maintainer: Proxmox Support Team <support@proxmox.com>
+
+Package: pve-headers-@KERNEL_VER@
+Architecture: all
+Section: admin
+Priority: optional
+Depends: pve-headers-@KERNEL_ABI@,
+Description: Latest Proxmox VE Kernel Headers
+ This is a virtual package which will install the kernel headers
+ for the latest available proxmox kernel from the @KERNEL_VER@
+ series.
+
+Package: pve-kernel-@KERNEL_VER@
+Architecture: all
+Section: admin
+Priority: optional
+Depends: pve-firmware,
+ pve-kernel-@KERNEL_ABI@,
+Description: Latest Proxmox VE Kernel Image
+ This is a virtual package which will install the latest available
+ proxmox kernel from the @KERNEL_VER@ series.
--- /dev/null
+Copyright (C) 2016 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
+#! /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/vmlinuz-@KERNEL_ABI@ /boot/pve/vmlinuz-@KERNEL_VER@
+ ln -sf /boot/initrd.img-@KERNEL_ABI@ /boot/pve/initrd.img-@KERNEL_VER@
+ ;;
+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-@KERNEL_ABI@
+ rm -f /boot/pve/initrd.img-@KERNEL_ABI@
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+debian/control: $(wildcard debian/*.in)
+ sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' < debian/postrm.in > debian/pve-kernel-${KERNEL_VER}.postrm
+ sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' -e 's/@KERNEL_VER@/${KERNEL_VER}/g' < debian/postinst.in > debian/pve-kernel-${KERNEL_VER}.postinst
+ sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' -e 's/@KERNEL_VER@/${KERNEL_VER}/g' < debian/control.in > debian/control
+
+
+install:
+ dh_installdocs -A debian/SOURCE debian/copyright
+ dh_installchangelogs
+ dh_strip_nondeterminism
+ dh_compress
+ dh_fixperms
+
+binary: install
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+.PHONY: build clean
+build clean: