[freeradius2]: move into it's own submenu, add option to build without openssl

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@39790 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
kaloz 2014-03-07 14:33:38 +00:00
parent bde34d9c18
commit d4626d6048
2 changed files with 33 additions and 9 deletions

14
net/freeradius2/Config.in Normal file
View File

@ -0,0 +1,14 @@
# FreeRADIUS avanced configuration
choice
prompt "SSL library"
default FREERADIUS_OPENSSL
depends on PACKAGE_freeradius2-common
config FREERADIUS_NOSSL
bool "No SSL support"
config FREERADIUS_OPENSSL
bool "OpenSSL"
endchoice

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=freeradius2
PKG_VERSION:=2.2.3
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
@ -18,19 +18,27 @@ PKG_MD5SUM:=25fb44cc1bc121f44f61f439bf45a420
PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_CONFIG_DEPENDS := \
FREERADIUS_OPENSSL \
FREERADIUS_NOSSL
include $(INCLUDE_DIR)/package.mk
define Package/freeradius2/config
source "$(SOURCE)/Config.in"
endef
define Package/freeradius2/Default
SECTION:=net
CATEGORY:=Network
URL:=http://freeradius.org/
SUBMENU:=FreeRADIUS (version 2)
endef
define Package/freeradius2
$(call Package/freeradius2/Default)
DEPENDS:=+libltdl +libreadline +freeradius2-common
TITLE:=A flexible RADIUS server (version 2)
MENU:=1
endef
define Package/freeradius2/conffiles
@ -48,7 +56,7 @@ endef
define Package/freeradius2-common
$(call Package/freeradius2/Default)
TITLE:=common files
DEPENDS:=+libpthread +freeradius2-mod-eap
DEPENDS:=+libpthread +FREERADIUS_OPENSSL:libopenssl
endef
define Package/freeradius2-mod-chap
@ -73,7 +81,7 @@ endef
define Package/freeradius2-mod-eap
$(call Package/freeradius2/Default)
DEPENDS:=freeradius2 +libopenssl
DEPENDS:=freeradius2
TITLE:=Base EAP module
endef
@ -101,13 +109,13 @@ endef
define Package/freeradius2-mod-eap-peap
$(call Package/freeradius2/Default)
DEPENDS:=freeradius2-mod-eap
DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
TITLE:=EAP/PEAP module
endef
define Package/freeradius2-mod-eap-tls
$(call Package/freeradius2/Default)
DEPENDS:=freeradius2-mod-eap
DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
TITLE:=EAP/TLS module
endef
@ -335,8 +343,9 @@ CONFIGURE_ARGS+= \
--disable-static \
--disable-developer \
--with-threads \
--with-openssl-includes="$(STAGING_DIR)/usr/include" \
--with-openssl-libraries="$(STAGING_DIR)/usr/lib" \
$(if $(CONFIG_FREERADIUS_OPENSSL),--with,--without)-openssl \
$(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-includes="$(STAGING_DIR)/usr/include",) \
$(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-libraries="$(STAGING_DIR)/usr/lib",) \
--with-system-libtool \
--with-system-libltdl \
--enable-strict-dependencies \
@ -530,6 +539,7 @@ define Package/freeradius2-common/install
$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/dictionary $(1)/etc/freeradius2/ ; \
$(INSTALL_DIR) $(1)/usr/lib/freeradius2
$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-radius{,-*}.so $(1)/usr/lib/freeradius2
$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-eap{,-*}.so $(1)/usr/lib/freeradius2
$(INSTALL_DIR) $(1)/usr/share/freeradius2
$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius2/
$(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius2/dictionary
@ -590,7 +600,7 @@ $(eval $(call BuildPackage,freeradius2-common))
$(eval $(call BuildPackage,freeradius2-democerts))
$(eval $(call BuildPlugin,freeradius2-mod-chap,rlm_chap,modules/chap,modules,))
$(eval $(call BuildPlugin,freeradius2-mod-detail,rlm_detail,modules/detail,modules,))
$(eval $(call BuildPlugin,freeradius2-mod-eap,libfreeradius-eap rlm_eap,eap.conf))
$(eval $(call BuildPlugin,freeradius2-mod-eap,rlm_eap,eap.conf))
$(eval $(call BuildPlugin,freeradius2-mod-eap-gtc,rlm_eap_gtc,))
$(eval $(call BuildPlugin,freeradius2-mod-eap-md5,rlm_eap_md5,))
$(eval $(call BuildPlugin,freeradius2-mod-eap-mschapv2,rlm_eap_mschapv2,))