0
0
mirror of https://github.com/openwrt/packages.git synced 2025-08-12 11:13:00 +00:00
Files
packages/libs/libradcli/Makefile
Thibaut VARÈNE 5ffca82f54 libradcli: fix build options
The provided Config.in was never sourced from the Makefile, making it
impossible to toggle TLS support.

This commit adds the necessary Makefile glue to fix this.

Also default to TLS disabled, as was the de-facto case since Config.in
was never sourced (and thus the default 'y' never enabled).

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2025-06-23 14:52:02 +08:00

83 lines
2.1 KiB
Makefile

#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libradcli
PKG_VERSION:=1.3.0
PKG_RELEASE:=1
PKG_SOURCE:=radcli-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION)
PKG_HASH:=20ddc8429d5912dfa2e71fafc93881844ce98e898c041b1dd7f757b9ddc8fcfd
PKG_BUILD_DIR:=$(BUILD_DIR)/radcli-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS := CONFIG_RADCLI_TLS
include $(INCLUDE_DIR)/package.mk
define Package/libradcli
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A library for radius clients
URL:=https://radcli.github.io/radcli
MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
DEPENDS:= +RADCLI_TLS:libgnutls +libnettle
endef
define Package/libradcli/decription
The radcli library is a library for writing RADIUS Clients. The library's
approach is to allow writing RADIUS-aware application in less than 50 lines
of C code. It was based originally on freeradius-client and is source
compatible with it.
endef
define Package/libradcli/config
source "$(SOURCE)/Config.in"
endef
CONFIGURE_ARGS+= \
--enable-legacy-compat
ifneq ($(CONFIG_RADCLI_TLS),y)
CONFIGURE_ARGS += --without-tls
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/radcli
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/radcli/radcli.h \
$(PKG_INSTALL_DIR)/usr/include/radcli/version.h \
$(1)/usr/include/radcli
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/freeradius-client.h \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libradcli.so* \
$(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.so \
$(1)/usr/lib/
endef
define Package/libradcli/conffiles
/etc/radcli/radiusclient.conf
endef
define Package/libradcli/install
$(INSTALL_DIR) $(1)/etc/radcli
$(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/radiusclient.conf $(1)/etc/radcli/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libradcli.so.* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,libradcli))