Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=hotplug2
  9. PKG_REV:=201
  10. PKG_VERSION:=$(PKG_REV)
  11. PKG_RELEASE:=4
  12. PKG_SOURCE_PROTO:=svn
  13. PKG_SOURCE_VERSION:=$(PKG_REV)
  14. PKG_SOURCE_SUBDIR:=hotplug2-$(PKG_VERSION)
  15. PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2
  16. PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
  17. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  18. #PKG_SOURCE_URL:=http://isteve.bofh.cz/~isteve/hotplug2
  19. #PKG_MD5SUM:=ea2c01d027b4002e4e6b0ff266f51a51
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/hotplug2
  22. SECTION:=base
  23. CATEGORY:=Base system
  24. VERSION:=1.0-beta-$(PKG_RELEASE)
  25. TITLE:=Version 1.0 Dynamic device management subsystem for embedded systems
  26. URL:=http://isteve.bofh.cz/~isteve/hotplug2/
  27. DEPENDS:=+!(USE_UCLIBC||USE_MUSL):libbsd
  28. endef
  29. define Package/hotplug2/description
  30. Hotplug2 is a trivial replacement of some of the UDev functionality
  31. in a tiny pack, intended for Linux early userspace: Init RAM FS and InitRD.
  32. This is an implementation of Hotplug2-1.0-beta
  33. endef
  34. define Package/hotplug2/conffiles
  35. /etc/hotplug2.rules
  36. endef
  37. MAKE_FLAGS += \
  38. COPTS="$(TARGET_CFLAGS)" \
  39. STATIC_WORKER="fork"
  40. ifneq ($(CONFIG_USE_EGLIBC),)
  41. TARGET_LDFLAGS += -lbsd
  42. endif
  43. define Build/Compile
  44. $(call Build/Compile/Default)
  45. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/udevtrigger src/udevtrigger.c
  46. endef
  47. define Package/hotplug2/install
  48. $(INSTALL_DIR) $(1)/etc
  49. $(INSTALL_DATA) ./files/hotplug2.rules $(1)/etc/
  50. $(INSTALL_DIR) $(1)/sbin
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/udevtrigger $(1)/sbin/
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hotplug2 $(1)/sbin/
  53. endef
  54. $(eval $(call BuildPackage,hotplug2))