| 1 | include $(TOPDIR)/rules.mk |
| 2 | |
| 3 | PKG_NAME:=libubox |
| 4 | PKG_VERSION:=2012-07-08 |
| 5 | PKG_RELEASE=$(PKG_SOURCE_VERSION) |
| 6 | |
| 7 | PKG_SOURCE_PROTO:=git |
| 8 | PKG_SOURCE_URL:=git://nbd.name/luci2/libubox.git |
| 9 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
| 10 | PKG_SOURCE_VERSION:=cca2ed6c8cdb3555fea43ff63ba1c9905dd7a164 |
| 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz |
| 12 | PKG_MIRROR_MD5SUM:=dfd44c10b4aeccbdab9ae22774fb02e3 |
| 13 | CMAKE_INSTALL:=1 |
| 14 | |
| 15 | PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> |
| 16 | |
| 17 | include $(INCLUDE_DIR)/package.mk |
| 18 | include $(INCLUDE_DIR)/cmake.mk |
| 19 | |
| 20 | define Package/libubox |
| 21 | SECTION:=libs |
| 22 | CATEGORY:=Libraries |
| 23 | TITLE:=Basic utility library |
| 24 | DEPENDS:= |
| 25 | endef |
| 26 | |
| 27 | define Package/libblobmsg-json |
| 28 | SECTION:=libs |
| 29 | CATEGORY:=Libraries |
| 30 | TITLE:=blobmsg <-> json conversion library |
| 31 | DEPENDS:=+libjson +libubox |
| 32 | endef |
| 33 | |
| 34 | define Package/jshn |
| 35 | SECTION:=utils |
| 36 | CATEGORY:=Utilities |
| 37 | DEPENDS:=+libjson |
| 38 | TITLE:=JSON SHell Notation |
| 39 | endef |
| 40 | |
| 41 | define Package/jshn/description |
| 42 | Library for parsing and generating JSON from shell scripts |
| 43 | endef |
| 44 | |
| 45 | TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include |
| 46 | |
| 47 | define Package/libubox/install |
| 48 | $(INSTALL_DIR) $(1)/lib/ |
| 49 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/ |
| 50 | endef |
| 51 | |
| 52 | define Package/libblobmsg-json/install |
| 53 | $(INSTALL_DIR) $(1)/lib/ |
| 54 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/ |
| 55 | endef |
| 56 | |
| 57 | define Package/jshn/install |
| 58 | $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox |
| 59 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin |
| 60 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox |
| 61 | endef |
| 62 | |
| 63 | $(eval $(call BuildPackage,libubox)) |
| 64 | $(eval $(call BuildPackage,libblobmsg-json)) |
| 65 | $(eval $(call BuildPackage,jshn)) |
| 66 | |
| 67 | |