move into it's own submenu, add option to build without openssl
authorImre Kaloz <kaloz@openwrt.org>
Fri, 7 Mar 2014 14:33:38 +0000 (14:33 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Fri, 7 Mar 2014 14:33:38 +0000 (14:33 +0000)
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 39790

net/freeradius2/Config.in [new file with mode: 0644]
net/freeradius2/Makefile

diff --git a/net/freeradius2/Config.in b/net/freeradius2/Config.in
new file mode 100644 (file)
index 0000000..cd0141e
--- /dev/null
@@ -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
index c4adf8184e4b521ff4a52aceb4724bbb90d46efa..d36dad51a87a0c1c78807be72e8cfa4952f323bd 100644 (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,))