]>
Commit | Line | Data |
---|---|---|
60dfdcbf TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | ||
5b1835e3 TL |
3 | PACKAGE = pve-firmware |
4 | ||
5 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) | |
b0256f55 | 6 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz |
5b1835e3 | 7 | |
b0256f55 | 8 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc |
5b1835e3 | 9 | FW_DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb |
920e0f55 | 10 | DEBS=$(FW_DEB) |
7bbca2e6 | 11 | |
d6dee2a6 | 12 | .PHONY: deb |
920e0f55 | 13 | deb: $(DEBS) |
d6dee2a6 | 14 | |
920e0f55 | 15 | $(FW_DEB): $(BUILDDIR) |
920e0f55 | 16 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc |
cf48ed1e | 17 | |
b0256f55 TL |
18 | .PHONY: dsc |
19 | dsc: | |
20 | $(MAKE) clean | |
21 | $(MAKE) $(DSC) | |
22 | lintian $(DSC) | |
23 | ||
24 | $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR) | |
25 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
26 | ||
27 | sbuild: $(DSC) | |
28 | sbuild $(DSC) | |
29 | ||
54156f4c TL |
30 | # NOTE: when collapsing FW lists keep major.minor still separated, so we can sunset the older ones |
31 | # without user impact safely. The last oldstable list needs to be kept avoid breakage on upgrade | |
782f51b7 | 32 | .PHONY: fw.list |
cb24a330 | 33 | fw.list: fwlist-5.15.x.y-pve |
17ac59c7 | 34 | fw.list: fwlist-iwlwifi-extra |
01507c9b | 35 | fw.list: fwlist-6.2.2-1-pve |
c9aa35f2 | 36 | fw.list: fwlist-6.2.6-1-pve |
29999a29 | 37 | fw.list: fwlist-6.2.16-11-pve |
71951f07 | 38 | fw.list: fwlist-6.5.3-1-pve |
051db5f7 | 39 | fw.list: fwlist-6.8.1-1-pve |
be53606e TL |
40 | rm -f $@.tmp $@ |
41 | sort -u $^ > $@.tmp | |
42 | mv $@.tmp $@ | |
782f51b7 | 43 | |
b0256f55 TL |
44 | $(ORIG_SRC_TAR): $(BUILDDIR) |
45 | tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR) | |
46 | ||
920e0f55 | 47 | $(BUILDDIR): linux-firmware.git/WHENCE dvb-firmware.git/README fw.list |
bdd992a8 TL |
48 | rm -rf $@ $@.tmp |
49 | mkdir -p $@.tmp/lib/firmware | |
1ad230ff | 50 | cp -a debian $@.tmp |
0548190c | 51 | echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $$(git rev-parse HEAD)" >$@.tmp/debian/SOURCE |
74986de0 | 52 | cd linux-firmware.git; ./copy-firmware.sh -v ../$@.tmp/lib/firmware/ |
bdd992a8 TL |
53 | ./assemble-firmware.pl fw.list $@.tmp/lib/firmware |
54 | find $@.tmp/lib/firmware -empty -type d -delete | |
55 | install -d $@.tmp/usr/share/doc/pve-firmware | |
56 | cp linux-firmware.git/WHENCE $@.tmp/usr/share/doc/pve-firmware/README | |
57 | install -d $@.tmp/usr/share/doc/pve-firmware/licenses | |
58 | cp linux-firmware.git/LICEN[CS]E* $@.tmp/usr/share/doc/pve-firmware/licenses | |
d3674cb7 TL |
59 | # we only compress big ones that almost definitively ain't required in the initrd |
60 | # or are so big and unbuyable (netronome...) | |
bdd992a8 TL |
61 | cd $@.tmp/lib/firmware; find . -type f \( -name 'i[wb][lt]*' -o -path '*/netronome/*' \) -print0 | xargs -0 -n1 -P0 -- xz -C crc32 |
62 | cd $@.tmp/lib/firmware; find . -xtype l -print0 | xargs -0 -n1 -P0 -- sh -c 'ln -sf "$$(readlink "$$0").xz" "$$0"; mv "$$0" "$$0.xz"' | |
63 | mv $@.tmp $@ | |
349bb95e FG |
64 | |
65 | # upgrade to current master | |
66 | .PHONY: update_modules | |
01a072c6 | 67 | update_modules: submodule |
349bb95e FG |
68 | git submodule foreach 'git pull --ff-only origin master' |
69 | ||
70 | # make sure submodules were initialized | |
01a072c6 FG |
71 | .PHONY: submodule |
72 | submodule dvb-firmware.git/README linux-firmware.git/WHENCE: | |
349bb95e | 73 | test -f "linux-firmware.git/WHENCE" || git submodule update --init |
ff43d65f | 74 | |
46d7ecd0 | 75 | .PHONY: upload |
4ce909f6 | 76 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
920e0f55 | 77 | upload: $(DEBS) |
4ce909f6 | 78 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST) |
46d7ecd0 | 79 | |
ff43d65f FG |
80 | .PHONY: clean |
81 | clean: | |
67a3629c TL |
82 | rm -rf $(PACKAGE)-[0-9]*/ |
83 | rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.dsc *.buildinfo *.build |