[pve-devel] [RFC PATCH 1/4] fixup debian packagin/Makefile

Dominik Csapak d.csapak at proxmox.com
Mon May 22 18:14:55 CEST 2017


this patch cleans up the debian packaging and Makefile
(modeled after our spiceterm package)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 Makefile                               | 24 ++++++++----------------
 debian/{changelog.Debian => changelog} |  0
 debian/compat                          |  1 +
 debian/conffiles                       |  0
 debian/control                         | 15 ++++++++++++---
 debian/docs                            |  1 +
 debian/rules                           |  4 ++++
 7 files changed, 26 insertions(+), 19 deletions(-)
 rename debian/{changelog.Debian => changelog} (100%)
 create mode 100644 debian/compat
 delete mode 100644 debian/conffiles
 create mode 100644 debian/docs
 create mode 100755 debian/rules

diff --git a/Makefile b/Makefile
index 5d7a65e..792b5bd 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ PACKAGE=vncterm
 VERSION=1.4
 PACKAGERELEASE=2
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+GITVERSION:=$(shell cat .git/refs/heads/master)
 CDATE:=$(shell date +%F)
 
 VNCVER=0.9.11
@@ -39,7 +40,9 @@ vncterm: vncterm.c glyphs.h ${VNCLIB}
 .PHONY: install
 install: vncterm vncterm.1
 	mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
+	install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE}
 	mkdir -p ${DESTDIR}/usr/share/man/man1
+	install -m 0644 vncterm.1 ${DESTDIR}/usr/share/man/man1
 	mkdir -p ${DESTDIR}/usr/bin
 	install -s -m 0755 vncterm ${DESTDIR}/usr/bin
 
@@ -55,21 +58,10 @@ vncterm.1: vncterm.pod
 deb: $(DEB)
 ${DEB}:
 	make clean
-	rm -rf dest
-	mkdir dest
-	make DESTDIR=`pwd`/dest install
-	install -d -m 0755 dest/DEBIAN
-	install -m 0644 debian/control dest/DEBIAN
-	echo "Architecture: ${ARCH}" >>dest/DEBIAN/control
-	install -m 0644 debian/conffiles dest/DEBIAN
-	install -m 0644 copyright dest/usr/share/doc/${PACKAGE}
-	install -m 0644 vncterm.1 dest/usr/share/man/man1
-	install -m 0644 debian/changelog.Debian dest/usr/share/doc/${PACKAGE}
-	gzip -n --best dest/usr/share/man/*/*
-	gzip -n --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
-	fakeroot dpkg-deb --build dest
-	mv dest.deb ${DEB}
-	rm -rf dest
+	rsync -a . --exclude build build
+	echo "Architecture: ${ARCH}" >> build/debian/control
+	echo "git clone git://git.proxmox.com/git/vncterm.git\\ngit checkout ${GIVERSION}" > build/debian/SOURCE
+	cd build; dpkg-buildpackage -rfakeroot -b -us -uc
 	lintian ${DEB}	
 
 .PHONY: upload
@@ -78,7 +70,7 @@ upload: ${DEB}
 
 .PHONY: clean
 clean:
-	rm -rf vncterm vncterm.1 vncterm_*.deb genfont *~ ${VNCDIR} vncterm-*.tar.gz glyph.h.tmp
+	rm -rf vncterm vncterm.1 vncterm_*.deb genfont *~ ${VNCDIR} vncterm-*.tar.gz glyph.h.tmp build *.changes
 
 .PHONY: distclean
 distclean: clean
diff --git a/debian/changelog.Debian b/debian/changelog
similarity index 100%
rename from debian/changelog.Debian
rename to debian/changelog
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/conffiles b/debian/conffiles
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/control b/debian/control
index 9d9c2c9..d5e9830 100644
--- a/debian/control
+++ b/debian/control
@@ -1,9 +1,18 @@
+Source: vncterm
+Maintainer: Proxmox Support Team <support at proxmox.com>
+Build-Depends:
+    debhelper (>= 8.0.0),
+    zlib1g-dev,
+    libjpeg-dev,
+    libpng-dev,
+    libglib2.0-dev,
+    libgnutls28-dev,
+Standards-Version: 3.9.3
+
 Package: vncterm
-Version: 1.4-1
 Section: x11
 Priority: optional
-Depends: libc6 (>= 2.7-18), libjpeg62, zlib1g (>= 1:1.2.1), libgnutls-deb0-28 | libgnutls30, libpng16-16
-Maintainer: Proxmox Support Team <support at proxmox.com>
+Depends: libc6 (>= 2.7-18), libjpeg62, zlib1g (>= 1:1.2.1), libgnutls-deb0-28 | libgnutls30, libpng16-16, ${shlibs:Depends}
 Description: VNC Terminal Emulator
  With vncterm you can start commands and export its standard input and
  output to any VNC client (simulating a xterm Terminal).
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..2d33f6a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@
-- 
2.11.0





More information about the pve-devel mailing list