mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
synced 2024-12-17 20:55:27 +00:00
ee8c336ab3
Flesh out the de-duplication logic in separate script. The copy-firmware.sh is already complex enough and de-duplication doesn't really fit in there. In the process we migrate away from the open-coded `ln --relative`. We also avoid touching symlinks, which are not created by rdfind. Otherwise we end up "fixing" the folder to folder symlinks (created earlier in the process) and things explode. As result we also get a few bonuses: - the COPYOPTS shell injection is gone - the variable was never used - people can dedup as separate step if/when they choose to do so Aside: based on the noise in git log and around distros ... I'm wondering if having the de-duplication as opt-in, would have been better. Is it too late to change or the ship has sailed? Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
48 lines
1.0 KiB
Makefile
48 lines
1.0 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
|
|
|
|
install: install-nodedup
|
|
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
install-nodedup:
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
|
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
install-xz:
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
|
./copy-firmware.sh --xz $(DESTDIR)$(FIRMWAREDIR)
|
|
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
install-zst:
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
|
./copy-firmware.sh --zstd $(DESTDIR)$(FIRMWAREDIR)
|
|
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
clean:
|
|
rm -rf release dist
|