From bb272dd311e39cd0d76a01d28c600363e95bc731 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 3 Mar 2014 09:40:04 +0100 Subject: [PATCH] assemble debian package --- Makefile | 55 ++++++++++++++++++++++++++++++++++++ debian/changelog | 6 ++++ debian/compat | 1 + debian/control | 12 ++++++++ debian/copyright | 16 +++++++++++ debian/docs | 1 + debian/rules | 13 +++++++++ src/Makefile | 29 +++++++++++++++++++ {PVE => src/PVE}/Firewall.pm | 0 pvefw => src/pvefw | 0 10 files changed, 133 insertions(+) create mode 100644 Makefile create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 src/Makefile rename {PVE => src/PVE}/Firewall.pm (100%) rename pvefw => src/pvefw (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7477d96 --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +RELEASE=3.3 + +VERSION=1.0 +PKGREL=1 + +PACKAGE=pve-firewall + +PREFIX=/usr +BINDIR=${PREFIX}/bin +SBINDIR=${PREFIX}/sbin +MANDIR=${PREFIX}/share/man +DOCDIR=${PREFIX}/share/doc +MAN1DIR=${MANDIR}/man1/ +PERLDIR=${PREFIX}/share/perl5 + +ARCH=all +GITVERSION:=$(shell cat .git/refs/heads/master) + +DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb + +all: ${DEB} + +.PHONY: dinstall +dinstall: deb + dpkg -i ${DEB} + + +.PHONY: deb +deb ${DEB}: + rm -rf build + rsync -a src/ build + rsync -a debian/ build/debian + echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE + # install + cd build; dpkg-buildpackage -rfakeroot -b -us -uc + lintian ${DEB} + +.PHONY: clean +clean: + rm -rf *~ debian/*~ src/*~ *.deb *.changes build ${PACKAGE}-*.tar.gz + +.PHONY: distclean +distclean: clean + + +.PHONY: upload +upload: ${DEB} + umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw + mkdir -p /pve/${RELEASE}/extra + rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb + rm -f /pve/${RELEASE}/extra/Packages* + cp ${DEB} /pve/${RELEASE}/extra + cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz + umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0c99eaf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +pve-firewall (1.0-1) unstable; urgency=low + + * initial package + + -- Proxmox Support Team Mon, 03 Mar 2014 08:37:06 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..1387783 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: pve-firewall +Section: admin +Priority: extra +Maintainer: Proxmox Support Team +Build-Depends: debhelper (>= 7.0.50~) +Standards-Version: 3.8.4 + +Package: pve-firewall +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libpve-common-perl, qemu-server +Description: Proxmox VE Firewall + This package contains the Proxmox VE Firewall. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..af9303c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2014 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +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 Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..8696672 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +debian/SOURCE diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b760bee --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..3a578cd --- /dev/null +++ b/src/Makefile @@ -0,0 +1,29 @@ + +PREFIX=/usr +BINDIR=${PREFIX}/bin +SBINDIR=${PREFIX}/bin +MANDIR=${PREFIX}/share/man +DOCDIR=${PREFIX}/share/doc +MAN1DIR=${MANDIR}/man1/ +PERLDIR=${PREFIX}/share/perl5 + +LIB_SOURCES= \ + Firewall.pm + +all: + +.PHONY: install +install: + install -d -m 0755 ${DESTDIR}/${SBINDIR} + install -m 0755 pvefw ${DESTDIR}/${SBINDIR} + install -d -m 0755 ${DESTDIR}${PERLDIR}/PVE + for i in ${LIB_SOURCES}; do install -D -m 0644 PVE/$$i ${DESTDIR}${PERLDIR}/PVE/$$i; done + + +.PHONY: clean +clean: + rm -rf *~ + +.PHONY: distclean +distclean: clean + diff --git a/PVE/Firewall.pm b/src/PVE/Firewall.pm similarity index 100% rename from PVE/Firewall.pm rename to src/PVE/Firewall.pm diff --git a/pvefw b/src/pvefw similarity index 100% rename from pvefw rename to src/pvefw -- 2.39.2