2005-05-17 03:23:24 +03:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=freeradius
|
2006-01-12 17:17:35 +02:00
|
|
|
PKG_VERSION:=1.0.5
|
2005-06-15 01:22:46 +03:00
|
|
|
PKG_RELEASE:=1
|
2006-01-12 17:17:35 +02:00
|
|
|
PKG_MD5SUM:=00d06fc31e3b8279f6456d25401c81cb
|
2005-05-17 03:23:24 +03:00
|
|
|
|
2005-06-15 01:22:46 +03:00
|
|
|
PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/ \
|
|
|
|
http://freeradius.portal-to-web.de/ \
|
|
|
|
ftp://ftp.uk.freeradius.org/pub/radius/
|
2005-05-17 03:23:24 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
2005-05-27 08:24:20 +03:00
|
|
|
PKG_CONFIGURE_OPTIONS := \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-static \
|
|
|
|
--disable-ltdl-install \
|
|
|
|
--with-ltdl-include="$(STAGING_DIR)/usr/include" \
|
|
|
|
--with-ltdl-lib="$(STAGING_DIR)/usr/lib" \
|
|
|
|
--with-openssl-includes="$(STAGING_DIR)/usr/include" \
|
|
|
|
--with-openssl-libraries="$(STAGING_DIR)/usr/lib" \
|
|
|
|
--enable-strict-dependencies \
|
|
|
|
--with-raddbdir=/etc/freeradius \
|
|
|
|
--without-edir \
|
|
|
|
--without-snmp \
|
2005-06-01 23:16:03 +03:00
|
|
|
--with-experimental-modules \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_attr-rewrite \
|
2005-06-01 23:16:03 +03:00
|
|
|
--without-rlm_checkval \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_counter \
|
|
|
|
--without-rlm_dbm \
|
|
|
|
--with-rlm_eap \
|
|
|
|
--without-rlm_eap_sim \
|
2005-06-01 23:16:03 +03:00
|
|
|
--without-rlm_example \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_ippool \
|
|
|
|
--without-rlm_krb5 \
|
|
|
|
--without-rlm_pam \
|
2005-06-01 23:16:03 +03:00
|
|
|
--without-rlm_perl \
|
|
|
|
--without-rlm_python \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_radutmp \
|
2005-06-01 23:16:03 +03:00
|
|
|
--without-rlm_smb \
|
|
|
|
--with-rlm_sql \
|
|
|
|
--with-rlm_sqlcounter \
|
|
|
|
--without-rlm_sql_db2 \
|
|
|
|
--without-rlm_sql_freetds \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_sql_iodbc \
|
|
|
|
--without-rlm_sql_oracle \
|
2005-06-01 23:16:03 +03:00
|
|
|
--without-rlm_sql_sybase \
|
2005-05-27 08:24:20 +03:00
|
|
|
--without-rlm_sql_unixodbc \
|
|
|
|
--without-rlm_unix \
|
|
|
|
--without-rlm_x99-token \
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP),)
|
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
|
|
|
--with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
|
|
|
|
--with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
|
|
else
|
|
|
|
PKG_CONFIGURE_OPTIONS += --without-rlm_ldap
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL),)
|
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
|
|
|
--with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql" \
|
|
|
|
--with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql"
|
|
|
|
else
|
|
|
|
PKG_CONFIGURE_OPTIONS += --without-rlm_sql_mysql
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),)
|
|
|
|
PKG_CONFIGURE_OPTIONS += \
|
|
|
|
--with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
|
|
|
|
--with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
|
|
else
|
|
|
|
PKG_CONFIGURE_OPTIONS += --without-rlm_sql_postgresql
|
|
|
|
endif
|
|
|
|
|
2005-05-17 03:23:24 +03:00
|
|
|
include $(TOPDIR)/package/rules.mk
|
|
|
|
|
|
|
|
define PKG_mod_template
|
|
|
|
|
|
|
|
$$(IPKG_$(1)):
|
2005-06-01 23:16:03 +03:00
|
|
|
[ -z "$(2)" ] || install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius
|
2005-05-17 03:23:24 +03:00
|
|
|
for m in $(2); do \
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \
|
|
|
|
$$(IDIR_$(1))/usr/lib/freeradius/ ; \
|
|
|
|
done
|
2005-06-01 23:16:03 +03:00
|
|
|
[ -z "$(3)" ] || install -d -m0755 $$(IDIR_$(1))/etc/freeradius
|
2005-05-17 03:23:24 +03:00
|
|
|
for f in $(3); do \
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \
|
|
|
|
$$(IDIR_$(1))/etc/freeradius/ ; \
|
|
|
|
done
|
|
|
|
$(RSTRIP) $$(IDIR_$(1))
|
|
|
|
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call PKG_template,FREERADIUS,freeradius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_DEMOCERTS,freeradius-democerts,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_CHAP,freeradius-mod-chap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-12-08 01:08:54 +02:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_DETAIL,freeradius-mod-detail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-05-17 03:23:24 +03:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP,freeradius-mod-eap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_GTC,freeradius-mod-eap-gtc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_MD5,freeradius-mod-eap-md5,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_MSCHAPV2,freeradius-mod-eap-mschapv2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_PEAP,freeradius-mod-eap-peap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_TLS,freeradius-mod-eap-tls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_EAP_TTLS,freeradius-mod-eap-ttls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_FILES,freeradius-mod-files,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_LDAP,freeradius-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_MSCHAP,freeradius-mod-mschap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-12-08 01:08:54 +02:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_PREPROCESS,freeradius-mod-preprocess,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_REALM,freeradius-mod-realm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-05-17 03:23:24 +03:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_SQL,freeradius-mod-sql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_SQL_MYSQL,freeradius-mod-sql-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_SQL_PGSQL,freeradius-mod-sql-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-06-01 23:16:03 +03:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_MOD_SQLCOUNTER,freeradius-mod-sqlcounter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-05-17 03:23:24 +03:00
|
|
|
$(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|
|
|
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
|
2005-12-08 01:08:54 +02:00
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_DETAIL,rlm_detail,))
|
2005-05-17 03:23:24 +03:00
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP,libeap rlm_eap,eap.conf))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_GTC,rlm_eap_gtc,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MD5,rlm_eap_md5,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MSCHAPV2,rlm_eap_mschapv2,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_PEAP,rlm_eap_peap,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TLS,rlm_eap_tls,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TTLS,rlm_eap_ttls,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_FILES,rlm_files,acct_users preproxy_users users))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_LDAP,rlm_ldap,ldap.attrmap))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_MSCHAP,rlm_mschap,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,))
|
2005-12-08 01:08:54 +02:00
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_PREPROCESS,rlm_preprocess,hints huntgroups))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_REALM,rlm_realm,proxy.conf))
|
2005-05-17 03:23:24 +03:00
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,sql.conf))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,))
|
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,))
|
2005-06-01 23:16:03 +03:00
|
|
|
$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQLCOUNTER,rlm_sqlcounter,))
|
2005-05-17 03:23:24 +03:00
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.configured:
|
|
|
|
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2005-12-08 01:08:54 +02:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|
|
|
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|
|
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|
|
|
sys_lib_dlsearch_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
|
|
|
|
sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
|
2005-05-17 03:23:24 +03:00
|
|
|
MYSQL_CONFIG="no" \
|
|
|
|
./configure \
|
2005-12-08 01:08:54 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--program-prefix="" \
|
|
|
|
--program-suffix="" \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--includedir=/usr/include \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--libdir=/usr/lib/freeradius \
|
|
|
|
--libexecdir=/usr/lib/freeradius \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
$(PKG_CONFIGURE_OPTIONS) \
|
2005-05-17 03:23:24 +03:00
|
|
|
)
|
2005-05-20 00:14:18 +03:00
|
|
|
touch $@
|
2005-05-17 03:23:24 +03:00
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built:
|
2005-05-20 00:14:18 +03:00
|
|
|
rm -rf $(PKG_INSTALL_DIR)
|
2005-05-17 03:23:24 +03:00
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
R="$(PKG_INSTALL_DIR)" \
|
|
|
|
INSTALLSTRIP="" \
|
2005-05-20 00:14:18 +03:00
|
|
|
all install
|
|
|
|
touch $@
|
2005-05-17 03:23:24 +03:00
|
|
|
|
|
|
|
$(IPKG_FREERADIUS):
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS)/etc/init.d
|
|
|
|
install -m0755 ./files/radiusd.init $(IDIR_FREERADIUS)/etc/init.d/radiusd
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS)/etc/freeradius
|
|
|
|
for f in clients.conf dictionary radiusd.conf; do \
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$${f} \
|
|
|
|
$(IDIR_FREERADIUS)/etc/freeradius/ ; \
|
|
|
|
done
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS)/usr/share/freeradius
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary \
|
|
|
|
$(IDIR_FREERADIUS)/usr/share/freeradius/
|
|
|
|
for f in cisco freeradius microsoft tunnel wispr; do \
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$${f} \
|
|
|
|
$(IDIR_FREERADIUS)/usr/share/freeradius/ ; \
|
|
|
|
done
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS)/usr/lib/freeradius
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so \
|
|
|
|
$(IDIR_FREERADIUS)/usr/lib/freeradius/
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS)/usr/sbin
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/radiusd \
|
|
|
|
$(IDIR_FREERADIUS)/usr/sbin/
|
|
|
|
$(RSTRIP) $(IDIR_FREERADIUS)
|
|
|
|
$(IPKG_BUILD) $(IDIR_FREERADIUS) $(PACKAGE_DIR)
|
|
|
|
|
|
|
|
$(IPKG_FREERADIUS_DEMOCERTS):
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/certs \
|
|
|
|
$(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/
|
|
|
|
rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/README
|
|
|
|
rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/new*
|
|
|
|
rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/index*
|
|
|
|
rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/serial*
|
|
|
|
$(RSTRIP) $(IDIR_FREERADIUS_DEMOCERTS)
|
|
|
|
$(IPKG_BUILD) $(IDIR_FREERADIUS_DEMOCERTS) $(PACKAGE_DIR)
|
|
|
|
|
|
|
|
$(IPKG_FREERADIUS_UTILS):
|
|
|
|
install -m0755 -d $(IDIR_FREERADIUS_UTILS)/usr/bin
|
|
|
|
for f in radclient radeapclient; do \
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/$${f} \
|
|
|
|
$(IDIR_FREERADIUS_UTILS)/usr/bin/ ; \
|
|
|
|
done
|
|
|
|
$(RSTRIP) $(IDIR_FREERADIUS_UTILS)
|
|
|
|
$(IPKG_BUILD) $(IDIR_FREERADIUS_UTILS) $(PACKAGE_DIR)
|
|
|
|
|