luci: Add support for wolfssl as an alternative to mbedtls.
[librecmc/librecmc.git] / package / utils / px5g-wolfssl / Makefile
1 # Copyright (C) 2020 Paul Spooren <mail@aparcar.org>
2 #
3 # SPDX-License-Identifier: GPL-2.0-or-later
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=px5g-wolfssl
8 PKG_RELEASE:=1
9 PKG_LICENSE:=GPL-2.0-or-later
10
11 PKG_USE_MIPS16:=0
12
13 PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/px5g-wolfssl
18   SECTION:=utils
19   CATEGORY:=Utilities
20   SUBMENU:=Encryption
21   TITLE:=X.509 certificate generator (using WolfSSL)
22   DEPENDS:=+libwolfssl
23   PROVIDES:=px5g
24   VARIANT:=wolfssl
25 endef
26
27 define Package/px5g-wolfssl/description
28  Px5g is a tiny X.509 certificate generator.
29  It suitable to create key files and certificates in DER
30  and PEM format for use with stunnel, uhttpd and others.
31 endef
32
33 TARGET_LDFLAGS += -lwolfssl
34
35
36 TARGET_CFLAGS += -Wl,--gc-sections
37
38 define Build/Compile
39         $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
40                 -o $(PKG_BUILD_DIR)/px5g px5g-wolfssl.c $(TARGET_LDFLAGS)
41 endef
42
43 define Package/px5g-wolfssl/install
44         $(INSTALL_DIR) $(1)/usr/sbin
45         $(INSTALL_BIN) $(PKG_BUILD_DIR)/px5g $(1)/usr/sbin/px5g
46 endef
47
48 $(eval $(call BuildPackage,px5g-wolfssl))