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