Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_VERSION:=2013-06-29
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=git://nbd.name/luci2/ubox.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=0a4e3d257da46a7c0232362ac82a01a8c15ae6d5
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  10. CMAKE_INSTALL:=1
  11. PKG_LICENSE:=GPLv2
  12. PKG_LICENSE_FILES:=
  13. PKG_MAINTAINER:=John Crispin <[email protected]>
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. TARGET_LDFLAGS += $(if $(CONFIG_USE_EGLIBC),-lrt)
  17. define Package/ubox
  18. SECTION:=base
  19. CATEGORY:=Base system
  20. DEPENDS:=+libubox +ubusd +ubus +libuci +USE_EGLIBC:librt
  21. TITLE:=OpenWrt system helper toolbox
  22. endef
  23. define Package/block-mount
  24. SECTION:=base
  25. CATEGORY:=Base system
  26. TITLE:=Block device mounting and checking
  27. DEPENDS:=+ubox
  28. MENU:=1
  29. endef
  30. define Package/ubox/install
  31. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin
  32. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,kmodloader,lsbloader,board} $(1)/sbin/
  33. ln -s /sbin/mount_root $(1)/sbin/switch2jffs
  34. ln -s /sbin/mount_root $(1)/sbin/jffs2reset
  35. ln -s /sbin/mount_root $(1)/sbin/jffs2mark
  36. ln -s /sbin/kmodloader $(1)/usr/sbin/lsmod
  37. ln -s /sbin/kmodloader $(1)/usr/sbin/modinfo
  38. endef
  39. define Package/block-mount/install
  40. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/
  41. $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
  42. $(INSTALL_DATA) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/
  44. ln -s /sbin/block $(1)/usr/sbin/swapon
  45. ln -s /sbin/block $(1)/usr/sbin/swapoff
  46. endef
  47. $(eval $(call BuildPackage,ubox))
  48. $(eval $(call BuildPackage,block-mount))