3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=b38b24f6352090fdb571b9e8da52e12e
10 PKG_SOURCE_URL
:=ftp
://ftp.freeradius.org
/pub
/radius
/ \
11 http
://freeradius.portal-to-web.de
/ \
12 ftp
://ftp.uk.freeradius.org
/pub
/radius
/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 PKG_CONFIGURE_OPTIONS
:= \
22 --disable-ltdl-install \
23 --with-ltdl-include
="$(STAGING_DIR)/usr/include" \
24 --with-ltdl-lib
="$(STAGING_DIR)/usr/lib" \
25 --with-openssl-includes
="$(STAGING_DIR)/usr/include" \
26 --with-openssl-libraries
="$(STAGING_DIR)/usr/lib" \
27 --enable-strict-dependencies \
28 --with-raddbdir
=/etc
/freeradius \
31 --with-experimental-modules \
32 --without-rlm_attr-rewrite \
33 --without-rlm_checkval \
34 --without-rlm_counter \
37 --without-rlm_eap_sim \
38 --without-rlm_example \
39 --without-rlm_ippool \
44 --without-rlm_python \
45 --without-rlm_radutmp \
48 --with-rlm_sqlcounter \
49 --without-rlm_sql_db2 \
50 --without-rlm_sql_freetds \
51 --without-rlm_sql_iodbc \
52 --without-rlm_sql_oracle \
53 --without-rlm_sql_sybase \
54 --without-rlm_sql_unixodbc \
55 --without-rlm_sql_log \
58 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP
),)
59 PKG_CONFIGURE_LIBS
+= -lcrypto
-lssl
60 PKG_CONFIGURE_OPTIONS
+= \
61 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
62 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib"
64 PKG_CONFIGURE_OPTIONS
+= --without-rlm_ldap
66 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL
),)
67 PKG_CONFIGURE_LIBS
+= -lz
68 PKG_CONFIGURE_OPTIONS
+= \
69 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include" \
70 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql" \
73 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_mysql
75 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL
),)
76 PKG_CONFIGURE_OPTIONS
+= \
77 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
78 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib"
80 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_postgresql
83 include $(TOPDIR
)/package
/rules.mk
85 define PKG_mod_template
88 [ -z
"$(2)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/freeradius
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/$$$${m}{,-*}.so \
91 $$(IDIR_
$(1))/usr
/lib
/freeradius
/ ; \
93 [ -z
"$(3)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/etc
/freeradius
95 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius
/$$$${f} \
96 $$(IDIR_
$(1))/etc
/freeradius
/ ; \
98 $(RSTRIP
) $$(IDIR_
$(1))
99 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
103 $(eval
$(call PKG_template
,FREERADIUS
,freeradius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,FREERADIUS_DEMOCERTS
,freeradius-democerts
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
105 $(eval
$(call PKG_template
,FREERADIUS_MOD_CHAP
,freeradius-mod-chap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
106 $(eval
$(call PKG_template
,FREERADIUS_MOD_DETAIL
,freeradius-mod-detail
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP
,freeradius-mod-eap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
108 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_GTC
,freeradius-mod-eap-gtc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
109 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MD5
,freeradius-mod-eap-md5
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
110 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,freeradius-mod-eap-mschapv2
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
111 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_PEAP
,freeradius-mod-eap-peap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
112 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TLS
,freeradius-mod-eap-tls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
113 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TTLS
,freeradius-mod-eap-ttls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
114 $(eval
$(call PKG_template
,FREERADIUS_MOD_FILES
,freeradius-mod-files
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
115 $(eval
$(call PKG_template
,FREERADIUS_MOD_LDAP
,freeradius-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
116 $(eval
$(call PKG_template
,FREERADIUS_MOD_MSCHAP
,freeradius-mod-mschap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
117 $(eval
$(call PKG_template
,FREERADIUS_MOD_PAP
,freeradius-mod-pap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
118 $(eval
$(call PKG_template
,FREERADIUS_MOD_PREPROCESS
,freeradius-mod-preprocess
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
119 $(eval
$(call PKG_template
,FREERADIUS_MOD_REALM
,freeradius-mod-realm
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
120 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL
,freeradius-mod-sql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
121 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_MYSQL
,freeradius-mod-sql-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
122 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_PGSQL
,freeradius-mod-sql-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
123 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQLCOUNTER
,freeradius-mod-sqlcounter
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
124 $(eval
$(call PKG_template
,FREERADIUS_UTILS
,freeradius-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
126 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_CHAP
,rlm_chap
,))
127 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_DETAIL
,rlm_detail
,))
128 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP
,libeap rlm_eap
,eap.conf
))
129 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_GTC
,rlm_eap_gtc
,))
130 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MD5
,rlm_eap_md5
,))
131 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,rlm_eap_mschapv2
,))
132 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_PEAP
,rlm_eap_peap
,))
133 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TLS
,rlm_eap_tls
,))
134 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TTLS
,rlm_eap_ttls
,))
135 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_FILES
,rlm_files
,acct_users preproxy_users users
))
136 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_LDAP
,rlm_ldap
,ldap.attrmap
))
137 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_MSCHAP
,rlm_mschap
,))
138 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PAP
,rlm_pap
,))
139 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PREPROCESS
,rlm_preprocess
,hints huntgroups
))
140 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_REALM
,rlm_realm
,proxy.conf
))
141 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL
,rlm_sql
,sql.conf
))
142 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_MYSQL
,rlm_sql_mysql
,))
143 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_PGSQL
,rlm_sql_postgresql
,))
144 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQLCOUNTER
,rlm_sqlcounter
,))
146 $(PKG_BUILD_DIR
)/.configured
:
147 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
148 $(TARGET_CONFIGURE_OPTS
) \
149 CFLAGS
="$(TARGET_CFLAGS)" \
150 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
151 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -L$(PKG_INSTALL_DIR)/usr/lib/freeradius" \
152 LIBS
="$(PKG_CONFIGURE_LIBS)" \
153 sys_lib_search_path_spec
="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
156 --target
=$(GNU_TARGET_NAME
) \
157 --host
=$(GNU_TARGET_NAME
) \
158 --build
=$(GNU_HOST_NAME
) \
159 --program-prefix
="" \
160 --program-suffix
="" \
164 --datadir=/usr
/share \
165 --includedir=/usr
/include \
166 --infodir=/usr
/share
/info \
167 --libdir=/usr
/lib
/freeradius \
168 --libexecdir
=/usr
/lib
/freeradius \
169 --localstatedir
=/var \
170 --mandir=/usr
/share
/man \
171 --sbindir
=/usr
/sbin \
173 $(DISABLE_LARGEFILE
) \
175 $(PKG_CONFIGURE_OPTIONS
) \
179 $(PKG_BUILD_DIR
)/.built
:
180 rm -rf
$(PKG_INSTALL_DIR
)
181 mkdir
-p
$(PKG_INSTALL_DIR
)
182 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
183 R
="$(PKG_INSTALL_DIR)" \
189 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/init.d
190 install -m0755 .
/files
/radiusd.init
$(IDIR_FREERADIUS
)/etc
/init.d
/radiusd
191 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/freeradius
192 for f in clients.conf dictionary radiusd.conf
; do \
193 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius
/$${f} \
194 $(IDIR_FREERADIUS
)/etc
/freeradius
/ ; \
196 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/share
/freeradius
197 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary \
198 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/
199 for f in freeradius freeradius.internal rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 microsoft wispr
; do \
200 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$${f} \
201 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/ ; \
203 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/lib
/freeradius
204 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/libradius
{,-*}.so \
205 $(IDIR_FREERADIUS
)/usr
/lib
/freeradius
/
206 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/sbin
207 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd \
208 $(IDIR_FREERADIUS
)/usr
/sbin
/
209 $(RSTRIP
) $(IDIR_FREERADIUS
)
210 $(IPKG_BUILD
) $(IDIR_FREERADIUS
) $(PACKAGE_DIR
)
212 $(IPKG_FREERADIUS_DEMOCERTS
):
213 install -m0755
-d
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
214 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius
/certs \
215 $(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/
216 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/README
217 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/new
*
218 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/index
*
219 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/serial
*
220 $(RSTRIP
) $(IDIR_FREERADIUS_DEMOCERTS
)
221 $(IPKG_BUILD
) $(IDIR_FREERADIUS_DEMOCERTS
) $(PACKAGE_DIR
)
223 $(IPKG_FREERADIUS_UTILS
):
224 install -m0755
-d
$(IDIR_FREERADIUS_UTILS
)/usr
/bin
225 for f in radclient
; do \
226 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$${f} \
227 $(IDIR_FREERADIUS_UTILS
)/usr
/bin
/ ; \
229 $(RSTRIP
) $(IDIR_FREERADIUS_UTILS
)
230 $(IPKG_BUILD
) $(IDIR_FREERADIUS_UTILS
) $(PACKAGE_DIR
)