ubox: update to latest git - fixes error reporting
[openwrt/svn-archive/archive.git] / package / system / ubox / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ubox
4 PKG_VERSION:=2013-01-12
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:=c907116d6c4f471f693717f055e54a0f06db35d4
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:=+libubox +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 +libubox +libuci
36 endef
37
38 define Package/ubox/install
39 $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/
40
41 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,kmodloader,logd,logread,validate_data} $(1)/sbin/
42 $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
43 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
44 ln -s /sbin/mount_root $(1)/sbin/switch2jffs
45 ln -s /sbin/mount_root $(1)/sbin/jffs2reset
46 ln -s /sbin/mount_root $(1)/sbin/jffs2mark
47 ln -s /sbin/kmodloader $(1)/usr/sbin/rmmod
48 ln -s /sbin/kmodloader $(1)/usr/sbin/insmod
49 ln -s /sbin/kmodloader $(1)/usr/sbin/lsmod
50 ln -s /sbin/kmodloader $(1)/usr/sbin/modinfo
51 ln -s /sbin/kmodloader $(1)/usr/sbin/modprobe
52 endef
53
54 define Package/block-mount/install
55 $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/ $(1)/etc/uci-defaults/
56
57 $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
58 $(INSTALL_DATA) ./files/fstab.default $(1)/etc/uci-defaults/10-fstab
59 $(INSTALL_DATA) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount
60
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/
62 ln -s /sbin/block $(1)/usr/sbin/swapon
63 ln -s /sbin/block $(1)/usr/sbin/swapoff
64
65 endef
66
67 $(eval $(call BuildPackage,ubox))
68 $(eval $(call BuildPackage,block-mount))