linux-firmware/Makefile
Emil Velikov 515022675f make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.

In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.

Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.

To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.

In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-16 15:52:59 +00:00

49 lines
1.1 KiB
Makefile

# This file implements the GNOME Build API:
# http://people.gnome.org/~walters/docs/build-api.txt
FIRMWAREDIR = /lib/firmware
all:
check:
@if ! command -v pre-commit >/dev/null; then \
echo "Install pre-commit to check files"; \
exit 1; \
fi
@pre-commit run --all-files
dist:
@mkdir -p release dist
./copy-firmware.sh release
@TARGET=linux-firmware_`git describe`.tar.gz; \
cd release && tar -czf ../dist/$${TARGET} *; \
echo "Created dist/$${TARGET}"
@rm -rf release
deb:
./build_packages.py --deb
rpm:
./build_packages.py --rpm
dedup:
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
install:
install -d $(DESTDIR)$(FIRMWAREDIR)
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
install-xz:
install -d $(DESTDIR)$(FIRMWAREDIR)
./copy-firmware.sh --xz $(DESTDIR)$(FIRMWAREDIR)
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
install-zst:
install -d $(DESTDIR)$(FIRMWAREDIR)
./copy-firmware.sh --zstd $(DESTDIR)$(FIRMWAREDIR)
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
clean:
rm -rf release dist