Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= hwids
  5. PKG_VERSION:= 20150129
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 33a7f4dbf14704076b0fe1d0052e86bb618e386a1ff18107097311df44f979d7
  8. PKG_DESCR:= combined repository of pci.ids and usb.ids
  9. PKG_SECTION:= sys/hw
  10. PKG_URL:= https://github.com/gentoo/hwids
  11. PKG_SITES:= https://github.com/gentoo/hwids/archive/
  12. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. # typical problem of having tags like '<name>-<version>' in github
  14. WRKDIST= $(WRKDIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SUBPKGS:= HWIDS_NET HWIDS_PCI HWIDS_USB
  16. PKGSD_HWIDS_NET:= HWIDS files oui.txt and iab.txt
  17. PKGSD_HWIDS_PCI:= HWIDS file pci.ids
  18. PKGSD_HWIDS_USB:= HWIDS file usb.ids
  19. PKG_FLAVOURS_HWIDS:= WITH_GZIP
  20. PKGFD_WITH_GZIP:= gzip pci.ids and usb.ids before installation
  21. include $(ADK_TOPDIR)/mk/package.mk
  22. $(eval $(call PKG_template,HWIDS_NET,hwids-net,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_HWIDS_NET),$(PKG_SECTION)))
  23. $(eval $(call PKG_template,HWIDS_PCI,hwids-pci,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_HWIDS_PCI),$(PKG_SECTION)))
  24. $(eval $(call PKG_template,HWIDS_USB,hwids-usb,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_HWIDS_USB),$(PKG_SECTION)))
  25. CONFIG_STYLE:= manual
  26. XAKE_FLAGS+= NET=yes \
  27. PCI=yes \
  28. UDEV=no \
  29. USB=yes
  30. # note: Can't pass GZIP=yes to make, as this will turn it
  31. # into an env var automatically which makes gzip trip.
  32. # Therefore assume here that GZIP=yes is the default.
  33. ifneq ($(ADK_PACKAGE_HWIDS_WITH_GZIP),y)
  34. XAKE_FLAGS+= GZIP=no
  35. endif
  36. define HWIDS_INSTALL_template
  37. $(2)-install:
  38. $$(INSTALL_DIR) $$(IDIR_$(1))/usr/share/misc
  39. $$(INSTALL_DATA) $$(patsubst %,$$(WRKINST)/usr/share/misc/%,$(3)) \
  40. $$(IDIR_$(1))/usr/share/misc/
  41. endef
  42. $(eval $(call HWIDS_INSTALL_template,HWIDS_NET,hwids-net,oui.txt iab.txt))
  43. ifeq ($(ADK_PACKAGE_HWIDS_WITH_GZIP),y)
  44. $(eval $(call HWIDS_INSTALL_template,HWIDS_PCI,hwids-pci,pci.ids.gz))
  45. $(eval $(call HWIDS_INSTALL_template,HWIDS_USB,hwids-usb,usb.ids.gz))
  46. else
  47. $(eval $(call HWIDS_INSTALL_template,HWIDS_PCI,hwids-pci,pci.ids))
  48. $(eval $(call HWIDS_INSTALL_template,HWIDS_USB,hwids-usb,usb.ids))
  49. endif
  50. include $(ADK_TOPDIR)/mk/pkg-bottom.mk