diff options
author | 2012-12-08 03:41:21 -0800 | |
---|---|---|
committer | 2012-12-08 03:41:21 -0800 | |
commit | 16e67eceb59974d7d12c0bd6c25e7c05bd8565a6 (patch) | |
tree | b74c284aada2a6c7da2186e7d3e018e6f42b73cf /Makefile | |
parent | Update. (diff) | |
download | hwids-16e67eceb59974d7d12c0bd6c25e7c05bd8565a6.tar.gz hwids-16e67eceb59974d7d12c0bd6c25e7c05bd8565a6.tar.bz2 hwids-16e67eceb59974d7d12c0bd6c25e7c05bd8565a6.zip |
Move compress/install logic to Makefile.hwids-20121208.2
This basically moves the logic from the ebuild into the hwids package
itself, since that should be shareable by other distributions as well.
Now that udev has more complex installs, it's worth doing it.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -6,6 +6,18 @@ else Q= endif +ifeq "$(UDEV)" "yes" + ALL_TARGETS="compress udev-hwdb" + INSTALL_TARGETS="install-base install-hwdb" +else + ALL_TARGETS="compress" + INSTALL_TARGETS="install-base" +endif + +all: $(ALL_TARGETS) + +install: $(INSTALL_TARGETS) + fetch: $(Q)curl -z pci.ids -o pci.ids -R http://pci-ids.ucw.cz/v2.2/pci.ids $(Q)curl -z usb.ids -o usb.ids -R http://www.linux-usb.org/usb.ids @@ -23,3 +35,26 @@ tag: udev-hwdb: perl ./udev-hwdb-update.pl && mv *.hwdb udev/ + +compress: pci.ids.gz usb.ids.gz + +%.gz: % + gzip -c $< > $@ + +MISCDIR=/usr/share/misc +HWDBDIR=/usr/lib/udev/hwdb.d +DOCDIR=/usr/share/doc/hwids + +install-base: compress + mkdir -p $(DESTDIR)$(DOCDIR) + install -p README.md $(DESTDIR)$(DOCDIR) + mkdir -p $(DESTDIR)$(MISCDIR) + for file in {usb,pci}.ids{,.gz} {oui,iab}.txt; do \ + install -p $$file $(DESTDIR)$(MISCDIR) + done + +install-udev: + mkdir -p $(DESTDIR)$(HWDBDIR) + for file in udev/*.hwdb; do \ + install -p $$file $(DESTDIR)$(HWDBDIR) + done |