backport fixes from changeset:2408 to trunk
[openwrt.git] / package / freeradius / Makefile
index 6da1325..5579872 100644 (file)
@@ -3,28 +3,90 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.4
 PKG_RELEASE:=1
 PKG_RELEASE:=1
-PKG_MD5SUM:=f5dfce4efbb03bbc47ceae08270a875e
+PKG_MD5SUM:=edb5c3af6fabeff7b8e1131b6fa33e24
 
 
-PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/
+PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/ \
+       http://freeradius.portal-to-web.de/ \
+       ftp://ftp.uk.freeradius.org/pub/radius/
 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
 
 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
 
+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 \
+       --with-experimental-modules \
+       --without-rlm_attr-rewrite \
+       --without-rlm_checkval \
+       --without-rlm_counter \
+       --without-rlm_dbm \
+       --with-rlm_eap \
+       --without-rlm_eap_sim \
+       --without-rlm_example \
+       --without-rlm_ippool \
+       --without-rlm_krb5 \
+       --without-rlm_pam \
+       --without-rlm_perl \
+       --without-rlm_python \
+       --without-rlm_radutmp \
+       --without-rlm_smb \
+       --with-rlm_sql \
+       --with-rlm_sqlcounter \
+       --without-rlm_sql_db2 \
+       --without-rlm_sql_freetds \
+       --without-rlm_sql_iodbc \
+       --without-rlm_sql_oracle \
+       --without-rlm_sql_sybase \
+       --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
+
 include $(TOPDIR)/package/rules.mk
 
 define PKG_mod_template
 
 $$(IPKG_$(1)):
 include $(TOPDIR)/package/rules.mk
 
 define PKG_mod_template
 
 $$(IPKG_$(1)):
-       install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius
+       [ -z "$(2)" ] || install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius
        for m in $(2); do \
                cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \
                  $$(IDIR_$(1))/usr/lib/freeradius/ ; \
        done
        for m in $(2); do \
                cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \
                  $$(IDIR_$(1))/usr/lib/freeradius/ ; \
        done
-       install -d -m0755 $$(IDIR_$(1))/etc/freeradius
+       [ -z "$(3)" ] || install -d -m0755 $$(IDIR_$(1))/etc/freeradius
        for f in $(3); do \
                cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \
                  $$(IDIR_$(1))/etc/freeradius/ ; \
        for f in $(3); do \
                cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \
                  $$(IDIR_$(1))/etc/freeradius/ ; \
@@ -51,6 +113,7 @@ $(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,$(PKG_VERSION)-
 $(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)))
 $(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)))
+$(eval $(call PKG_template,FREERADIUS_MOD_SQLCOUNTER,freeradius-mod-sqlcounter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 
 $(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
 $(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 
 $(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
@@ -68,14 +131,16 @@ $(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,))
 $(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,))
 $(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,))
+$(eval $(call PKG_mod_template,FREERADIUS_MOD_SQLCOUNTER,rlm_sqlcounter,))
 
 $(PKG_BUILD_DIR)/.configured:
        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
                CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
 
 $(PKG_BUILD_DIR)/.configured:
        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
                CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(PKG_INSTALL_DIR)/usr/lib/freeradius" \
-               lt_sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
+               sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
+               sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
                MYSQL_CONFIG="no" \
                ./configure \
                  --target=$(GNU_TARGET_NAME) \
                MYSQL_CONFIG="no" \
                ./configure \
                  --target=$(GNU_TARGET_NAME) \
@@ -97,39 +162,7 @@ $(PKG_BUILD_DIR)/.configured:
                  --sysconfdir=/etc \
                  $(DISABLE_LARGEFILE) \
                  $(DISABLE_NLS) \
                  --sysconfdir=/etc \
                  $(DISABLE_LARGEFILE) \
                  $(DISABLE_NLS) \
-                 --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 \
-                 --without-rlm_attr-rewrite \
-                 --with-rlm_checkval \
-                 --without-rlm_counter \
-                 --without-rlm_dbm \
-                 --with-rlm_eap \
-                 --without-rlm_eap_sim \
-                 --with-rlm_files \
-                 --without-rlm_ippool \
-                 --without-rlm_krb5 \
-                 --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
-                 --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib" \
-                 --without-rlm_pam \
-                 --without-rlm_radutmp \
-                 --without-rlm_sql_iodbc \
-                 --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql" \
-                 --with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql" \
-                 --without-rlm_sql_oracle \
-                 --with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
-                 --with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib" \
-                 --without-rlm_sql_unixodbc \
-                 --without-rlm_unix \
-                 --without-rlm_x99-token \
+                 $(PKG_CONFIGURE_OPTIONS) \
        )
        touch $@
 
        )
        touch $@
 
This page took 0.031867 seconds and 4 git commands to generate.