procd: fix procd_lock() when prepare_roofs
[openwrt/openwrt.git] / package / system / ubox / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ubox
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
8 PKG_SOURCE_DATE:=2017-11-13
9 PKG_SOURCE_VERSION:=e7a63fbafdc6ec319bab616b43a642728f6b9c1c
10 PKG_MIRROR_HASH:=17b23c11f7a6b45827af3e5ab47846cdedd04204e96d7ce22147a361fc4f285b
11 CMAKE_INSTALL:=1
12
13 PKG_LICENSE:=GPL-2.0
14 PKG_LICENSE_FILES:=
15
16 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/cmake.mk
20
21 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
22
23 define Package/ubox
24 SECTION:=base
25 CATEGORY:=Base system
26 DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
27 TITLE:=OpenWrt system helper toolbox
28 endef
29
30 define Package/logd
31 SECTION:=base
32 CATEGORY:=Base system
33 DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
34 TITLE:=OpenWrt system log implementation
35 endef
36
37 define Package/ubox/install
38 $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin
39
40 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
41 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
42 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
43
44 $(LN) kmodloader $(1)/sbin/rmmod
45 $(LN) kmodloader $(1)/sbin/insmod
46 $(LN) kmodloader $(1)/sbin/lsmod
47 $(LN) kmodloader $(1)/sbin/modinfo
48 $(LN) kmodloader $(1)/sbin/modprobe
49 endef
50
51 define Package/logd/install
52 $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
53
54 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
55 $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
56 endef
57
58 $(eval $(call BuildPackage,ubox))
59 $(eval $(call BuildPackage,logd))