]> git.proxmox.com Git - pmg-log-tracker.git/commitdiff
create debian package
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 13 Sep 2017 06:37:37 +0000 (08:37 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 13 Sep 2017 06:37:37 +0000 (08:37 +0200)
Makefile
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/install [new file with mode: 0644]
debian/rules [new file with mode: 0755]

index 2cbee461bdcf52811295e340fa71b4a7998e8fa1..209a2b3b4ab5198c1089fdce4d7509a5f9becf4c 100644 (file)
--- 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 (file)
index 0000000..13c3c8d
--- /dev/null
@@ -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 <support@proxmox.com>  Wed, 13 Sep 2017 08:18:15 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..169a0ad
--- /dev/null
@@ -0,0 +1,14 @@
+Source: pmg-log-tracker
+Section: admin
+Priority: optional
+Maintainer: Proxmox Support Team <support@proxmox.com>
+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 (file)
index 0000000..22c3a5e
--- /dev/null
@@ -0,0 +1,16 @@
+Copyright (C) 2010-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 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 <http://www.gnu.org/licenses/>.
diff --git a/debian/install b/debian/install
new file mode 100644 (file)
index 0000000..d50c85b
--- /dev/null
@@ -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 (executable)
index 0000000..a7521b6
--- /dev/null
@@ -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 $@