[pve-devel] [PATCH 2/3] buildsys: move to dpkg-buildpackage

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jul 17 15:17:18 CEST 2017


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Makefile                               | 15 +++++++--------
 changelog.firmware => debian/changelog |  0
 debian/compat                          |  1 +
 control.firmware => debian/control     |  8 +++++---
 debian/install                         |  2 ++
 debian/rules                           | 13 +++++++++++++
 6 files changed, 28 insertions(+), 11 deletions(-)
 rename changelog.firmware => debian/changelog (100%)
 create mode 100644 debian/compat
 rename control.firmware => debian/control (94%)
 create mode 100644 debian/install
 create mode 100755 debian/rules

diff --git a/Makefile b/Makefile
index 645afd4..d6d386c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,16 @@ FW_DEB=pve-firmware_${FW_VER}-${FW_REL}_all.deb
 
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
-export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp -lchangelog.firmware)
+export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
 
 DEBS=${FW_DEB}
 
-${FW_DEB} fw: control.firmware linux-firmware.git/WHENCE dvb-firmware.git/README changelog.firmware fwlist-2.6.18-2-pve fwlist-2.6.24-12-pve fwlist-2.6.32-3-pve fwlist-2.6.32-4-pve fwlist-2.6.32-6-pve fwlist-2.6.32-13-pve fwlist-2.6.32-14-pve fwlist-2.6.32-20-pve fwlist-2.6.32-21-pve fwlist-3.10.0-3-pve fwlist-3.10.0-7-pve fwlist-3.10.0-8-pve fwlist-3.19.8-1-pve fwlist-4.2.8-1-pve fwlist-4.4.13-2-pve fwlist-4.4.16-1-pve fwlist-4.4.21-1-pve fwlist-4.4.44-1-pve fwlist-4.10.5-1-pve
+${FW_DEB}: fwdata
+	cp -a debian fwdata
+	echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout ${GITVERSION}" >fwdata/debian/SOURCE
+	cd fwdata; dpkg-buildpackage -b -us -uc
+
+fwdata: linux-firmware.git/WHENCE dvb-firmware.git/README fwlist-2.6.18-2-pve fwlist-2.6.24-12-pve fwlist-2.6.32-3-pve fwlist-2.6.32-4-pve fwlist-2.6.32-6-pve fwlist-2.6.32-13-pve fwlist-2.6.32-14-pve fwlist-2.6.32-20-pve fwlist-2.6.32-21-pve fwlist-3.10.0-3-pve fwlist-3.10.0-7-pve fwlist-3.10.0-8-pve fwlist-3.19.8-1-pve fwlist-4.2.8-1-pve fwlist-4.4.13-2-pve fwlist-4.4.16-1-pve fwlist-4.4.21-1-pve fwlist-4.4.44-1-pve fwlist-4.10.5-1-pve
 	rm -rf fwdata
 	mkdir -p fwdata/lib/firmware
 	./assemble-firmware.pl fwlist-4.10.5-1-pve fwdata/lib/firmware
@@ -35,12 +40,6 @@ ${FW_DEB} fw: control.firmware linux-firmware.git/WHENCE dvb-firmware.git/README
 	cp linux-firmware.git/WHENCE fwdata/usr/share/doc/pve-firmware/README
 	install -d fwdata/usr/share/doc/pve-firmware/licenses
 	cp linux-firmware.git/LICEN[CS]E* fwdata/usr/share/doc/pve-firmware/licenses
-	install -D -m 0644 changelog.firmware fwdata/usr/share/doc/pve-firmware/changelog.Debian
-	gzip -n -9 fwdata/usr/share/doc/pve-firmware/changelog.Debian
-	echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout ${GITVERSION}" >fwdata/usr/share/doc/pve-firmware/SOURCE
-	install -d fwdata/DEBIAN
-	sed -e 's/@VERSION@/${FW_VER}-${FW_REL}/' <control.firmware >fwdata/DEBIAN/control
-	dpkg-deb --build fwdata ${FW_DEB}
 
 # upgrade to current master
 .PHONY: update_modules
diff --git a/changelog.firmware b/debian/changelog
similarity index 100%
rename from changelog.firmware
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/control.firmware b/debian/control
similarity index 94%
rename from control.firmware
rename to debian/control
index 8d6ea1e..2a9bc79 100644
--- a/control.firmware
+++ b/debian/control
@@ -1,12 +1,14 @@
-Package: pve-firmware
-Version: @VERSION@
+Source: pve-firmware
 Section: misc
 Priority: optional
+Maintainer: Proxmox Support Team <support at proxmox.com>
+Homepage: http://www.proxmox.com
+
+Package: pve-firmware
 Architecture: all
 Suggests: linux-image
 Conflicts: firmware-linux-free, firmware-linux-nonfree, firmware-atheros, firmware-bnx2, firmware-bnx2x, firmware-intelwimax, firmware-ipw2x00, firmware-iwlwifi, firmware-netxen, firmware-qlogic, firmware-ralink, firmware-realtek, firmware-libertas, firmware-myricom, firmware-brcm80211, firmware-ivtv
 Replaces: firmware-linux-free, firmware-linux-nonfree, firmware-atheros, firmware-bnx2, firmware-bnx2x, firmware-intelwimax, firmware-ipw2x00, firmware-iwlwifi, firmware-netxen, firmware-qlogic, firmware-ralink, firmware-realtek, firmware-libertas, firmware-myricom, firmware-brcm80211, firmware-ivtv
-Maintainer: Proxmox Support Team <support at proxmox.com>
 Description: Binary firmware code for the pve-kernel
  This package contains the binary firmware for various modules used in
  the pve-kernel.
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..304efaa
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+lib
+usr
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..955dd78
--- /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 $@
-- 
2.11.0





More information about the pve-devel mailing list