]> git.proxmox.com Git - pve-firmware.git/blame - Makefile
buildsys: expand clean target
[pve-firmware.git] / Makefile
CommitLineData
60dfdcbf
TL
1include /usr/share/dpkg/pkg-info.mk
2
5b1835e3
TL
3PACKAGE = pve-firmware
4
5BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
6
7FW_DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
920e0f55 8DEBS=$(FW_DEB)
7bbca2e6 9
d6dee2a6 10.PHONY: deb
920e0f55 11deb: $(DEBS)
d6dee2a6 12
920e0f55 13$(FW_DEB): $(BUILDDIR)
920e0f55 14 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
cf48ed1e 15
54156f4c
TL
16# NOTE: when collapsing FW lists keep major.minor still separated, so we can sunset the older ones
17# without user impact safely. The last oldstable list needs to be kept avoid breakage on upgrade
782f51b7 18.PHONY: fw.list
d88aaa91 19fw.list: fwlist-5.4.86-1-pve
54156f4c 20fw.list: fwlist-5.11.x-y-pve
7ee41469 21fw.list: fwlist-5.13.x-y-pve
7dff192c 22fw.list: fwlist-5.15.5-1-pve
a9f83c55 23fw.list: fwlist-5.15.19-1-pve
7d7a1dd4 24fw.list: fwlist-5.15.27-1-pve
0c3bcd17 25fw.list: fwlist-5.15.35-1-pve
3c1331ce 26fw.list: fwlist-5.15.53-1-pve
807de5be 27fw.list: fwlist-5.19.0-1-pve
62c51579 28fw.list: fwlist-5.19-iwlwifi-extra
c366a5cf 29fw.list: fwlist-6.1.0-1-pve
7205e1cc 30fw.list: fwlist-6.1.10-1-pve
01507c9b 31fw.list: fwlist-6.2.2-1-pve
c9aa35f2 32fw.list: fwlist-6.2.6-1-pve
be53606e
TL
33 rm -f $@.tmp $@
34 sort -u $^ > $@.tmp
35 mv $@.tmp $@
782f51b7 36
920e0f55 37$(BUILDDIR): linux-firmware.git/WHENCE dvb-firmware.git/README fw.list
bdd992a8
TL
38 rm -rf $@ $@.tmp
39 mkdir -p $@.tmp/lib/firmware
1ad230ff 40 cp -a debian $@.tmp
0548190c 41 echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $$(git rev-parse HEAD)" >$@.tmp/debian/SOURCE
bdd992a8
TL
42 cd linux-firmware.git; ./copy-firmware.sh -v ../$@.tmp/lib/firmware/
43 ./assemble-firmware.pl fw.list $@.tmp/lib/firmware
44 find $@.tmp/lib/firmware -empty -type d -delete
45 install -d $@.tmp/usr/share/doc/pve-firmware
46 cp linux-firmware.git/WHENCE $@.tmp/usr/share/doc/pve-firmware/README
47 install -d $@.tmp/usr/share/doc/pve-firmware/licenses
48 cp linux-firmware.git/LICEN[CS]E* $@.tmp/usr/share/doc/pve-firmware/licenses
d3674cb7
TL
49 # we only compress big ones that almost definitively ain't required in the initrd
50 # or are so big and unbuyable (netronome...)
bdd992a8
TL
51 cd $@.tmp/lib/firmware; find . -type f \( -name 'i[wb][lt]*' -o -path '*/netronome/*' \) -print0 | xargs -0 -n1 -P0 -- xz -C crc32
52 cd $@.tmp/lib/firmware; find . -xtype l -print0 | xargs -0 -n1 -P0 -- sh -c 'ln -sf "$$(readlink "$$0").xz" "$$0"; mv "$$0" "$$0.xz"'
53 mv $@.tmp $@
349bb95e
FG
54
55# upgrade to current master
56.PHONY: update_modules
01a072c6 57update_modules: submodule
349bb95e
FG
58 git submodule foreach 'git pull --ff-only origin master'
59
60# make sure submodules were initialized
01a072c6
FG
61.PHONY: submodule
62submodule dvb-firmware.git/README linux-firmware.git/WHENCE:
349bb95e 63 test -f "linux-firmware.git/WHENCE" || git submodule update --init
ff43d65f 64
46d7ecd0 65.PHONY: upload
920e0f55
TL
66upload: $(DEBS)
67 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye
46d7ecd0 68
ff43d65f
FG
69.PHONY: clean
70clean:
67a3629c
TL
71 rm -rf $(PACKAGE)-[0-9]*/
72 rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.dsc *.buildinfo *.build