include /usr/share/dpkg/pkg-info.mk
-FW_DEB=pve-firmware_$(DEB_VERSION)_all.deb
+PACKAGE = pve-firmware
-GITVERSION:=$(shell git rev-parse HEAD)
-
-export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
+BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
+ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
+DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
+FW_DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
DEBS=$(FW_DEB)
-BUILDDIR=fwdata
.PHONY: deb
deb: $(DEBS)
$(FW_DEB): $(BUILDDIR)
- cp -a debian $(BUILDDIR)
- echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $(GITVERSION)" >$(BUILDDIR)/debian/SOURCE
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
+.PHONY: dsc
+dsc:
+ $(MAKE) clean
+ $(MAKE) $(DSC)
+ lintian $(DSC)
+
+$(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
+sbuild: $(DSC)
+ sbuild $(DSC)
+
# NOTE: when collapsing FW lists keep major.minor still separated, so we can sunset the older ones
# without user impact safely. The last oldstable list needs to be kept avoid breakage on upgrade
.PHONY: fw.list
-fw.list: fwlist-5.4.86-1-pve
-fw.list: fwlist-5.11.x-y-pve
-fw.list: fwlist-5.13.x-y-pve
-fw.list: fwlist-5.15.5-1-pve
-fw.list: fwlist-5.15.19-1-pve
-fw.list: fwlist-5.15.27-1-pve
-fw.list: fwlist-5.15.35-1-pve
-fw.list: fwlist-5.15.53-1-pve
-fw.list: fwlist-5.19.0-1-pve
-fw.list: fwlist-5.19-iwlwifi-extra
-fw.list: fwlist-6.1.0-1-pve
-fw.list: fwlist-6.1.10-1-pve
+fw.list: fwlist-5.15.x.y-pve
+fw.list: fwlist-iwlwifi-extra
fw.list: fwlist-6.2.2-1-pve
fw.list: fwlist-6.2.6-1-pve
rm -f $@.tmp $@
sort -u $^ > $@.tmp
mv $@.tmp $@
+$(ORIG_SRC_TAR): $(BUILDDIR)
+ tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
+
$(BUILDDIR): linux-firmware.git/WHENCE dvb-firmware.git/README fw.list
rm -rf $@ $@.tmp
mkdir -p $@.tmp/lib/firmware
+ cp -a debian $@.tmp
+ echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $$(git rev-parse HEAD)" >$@.tmp/debian/SOURCE
cd linux-firmware.git; ./copy-firmware.sh -v ../$@.tmp/lib/firmware/
./assemble-firmware.pl fw.list $@.tmp/lib/firmware
find $@.tmp/lib/firmware -empty -type d -delete
test -f "linux-firmware.git/WHENCE" || git submodule update --init
.PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
- tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye
+ tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
.PHONY: clean
clean:
- rm -rf $(BUILDDIR) $(BUILDDIR).tmp fw.list *.deb *.buildinfo *.dsc *.changes
+ rm -rf $(PACKAGE)-[0-9]*/
+ rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.dsc *.buildinfo *.build