From 61b8223f3c04eee545146d31f701df004af168d3 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 13 Sep 2017 08:37:37 +0200 Subject: [PATCH] create debian package --- Makefile | 29 +++++++++++++++++++++++++++-- debian/changelog | 10 ++++++++++ debian/compat | 1 + debian/control | 14 ++++++++++++++ debian/copyright | 16 ++++++++++++++++ debian/install | 1 + debian/rules | 8 ++++++++ 7 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/install create mode 100755 debian/rules diff --git a/Makefile b/Makefile index 2cbee46..209a2b3 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,41 @@ +PACKAGE=pmg-log-tracker +PKGVER=1.0 +PKGREL=1 + +ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +GITVERSION:=$(shell cat .git/refs/heads/master) + +DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb + LIBS=$(shell pkg-config --libs glib-2.0) -lz CFLAGS=$(shell pkg-config --cflags glib-2.0) -O2 -Wpedantic -all: pmg-log-tracker +all: ${DEB} pmg-log-tracker: pmg-log-tracker.c gcc $< -o $@ ${CFLAGS} ${LIBS} +.PHONY: deb +deb ${DEB}: pmg-log-tracker + rm -f *.deb + rm -rf build + install -D -m 0755 pmg-log-tracker build/usr/bin/pmg-log-tracker + cp -a debian build/debian + cd build; dpkg-buildpackage -rfakeroot -b -us -uc + lintian ${DEB} + +.PHONY: dinstall +dinstall: ${DEB} + dpkg -i ${DEB} + +.PHONY: upload +upload: ${DEB} ${DBG_DEB} + tar cf - ${DEB} ${DBG_DEB}| ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH} .PHONY: distclean distclean: clean .PHONY: clean clean: - rm pmg-log-tracker + rm -rf build *.deb pmg-log-tracker *.buildinfo *.changes find . -name '*~' -exec rm {} ';' diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..13c3c8d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,10 @@ +pmg-log-tracker (1.0-1) unstable; urgency=medium + + * imported from private repository + + * compile with -Wpedantic + + * create separate debian package + + -- Proxmox Support Team Wed, 13 Sep 2017 08:18:15 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..169a0ad --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: pmg-log-tracker +Section: admin +Priority: optional +Maintainer: Proxmox Support Team +Build-Depends: debhelper (>= 9), + libglib2.0-dev (>= 2.42.1-1) +Standards-Version: 3.9.5 +Homepage: http://www.proxmox.com + +Package: pmg-log-tracker +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Proxmox Mailgateway Log Tracker + Tools to scan mail logs. \ No newline at end of file diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..22c3a5e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2010-2017 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/install b/debian/install new file mode 100644 index 0000000..d50c85b --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +/usr/bin/pmg-log-tracker \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..a7521b6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + + +%: + dh $@ -- 2.39.2