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