ucert: add PROVIDES also for minimal 'ucert' package
[openwrt/openwrt.git] / package / system / ucert / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ucert
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
8 PKG_SOURCE_DATE:=2018-09-18
9 PKG_SOURCE_VERSION:=e1c722b1b6cbf2527b3178342464e56b97825874
10 PKG_MIRROR_HASH:=36dcca7c2d649a6c34a8daaaef4698fbeb808fd6580c6bfb1ca35f4f06825d17
11
12 CMAKE_INSTALL:=1
13 PKG_CHECK_FORMAT_SECURITY:=1
14
15 PKG_LICENSE:=GPL-3.0+
16 PKG_LICENSE_FILES:=COPYING
17
18 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
19
20 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/host-build.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 CMAKE_HOST_OPTIONS += \
27 -DUCERT_FULL=1 \
28 -DUCERT_HOST_BUILD=1 \
29 -DCMAKE_SKIP_RPATH=FALSE \
30 -DUSE_RPATH="${STAGING_DIR_HOST}/lib"
31
32 HOST_BUILD_DEPENDS:=libubox/host libjson-c/host usign/host
33 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
34 PKG_BUILD_DEPENDS:=ucert/host
35
36 define Package/ucert-full
37 SECTION:=base
38 CATEGORY:=Base system
39 DEPENDS:=+usign +libubox +libjson-c +libblobmsg-json
40 TITLE:=OpenWrt certificate generation and verification utility
41 PROVIDES:=ucert
42 VARIANT:=full
43 endef
44
45 define Package/ucert
46 SECTION:=base
47 CATEGORY:=Base system
48 DEPENDS:=+usign +libubox
49 TITLE:=OpenWrt certificate verification utility
50 PROVIDES:=ucert
51 CONFLICTS:=ucert-full
52 VARIANT:=tiny
53 endef
54
55 ifeq ($(BUILD_VARIANT),full)
56 CMAKE_OPTIONS += -DUCERT_FULL=1
57 endif
58
59 define Build/Prepare
60 mkdir -p $(PKG_BUILD_DIR)
61 $(call Build/Prepare/Default)
62 endef
63
64 define Package/ucert/install
65 $(INSTALL_DIR) $(1)/usr/bin
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucert $(1)/usr/bin
67 endef
68
69 Package/ucert-full/install = $(Package/ucert/install)
70
71 $(eval $(call BuildPackage,ucert))
72 $(eval $(call BuildPackage,ucert-full))
73 $(eval $(call HostBuild))