2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=freeradius-server-
$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=ftp
://ftp.freeradius.org
/pub
/freeradius
/
16 PKG_MD5SUM
:=4ccf748ef9851d90844d085647351ca4
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/freeradius-server-
$(PKG_VERSION
)
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/freeradius2
/Default
25 URL
:=http
://www.freeradius2.org
/
28 define Package
/freeradius2
29 $(call Package
/freeradius2
/Default
)
30 DEPENDS
:=+libltdl
+libopenssl
+libpthread
+libreadline
31 TITLE
:=A flexible RADIUS server
(version
2)
35 define Package
/freeradius2
/conffiles
36 /etc
/freeradius2
/clients.conf
37 /etc
/freeradius2
/radiusd.conf
38 /etc
/freeradius2
/sites
/default
41 define Package
/freeradius2-democerts
42 $(call Package
/freeradius2
/Default
)
44 TITLE
:=Demo certificates to
test the server
47 define Package
/freeradius2-mod-chap
48 $(call Package
/freeradius2
/Default
)
53 define Package
/freeradius2-mod-chap
/conffiles
54 /etc
/freeradius2
/modules
/chap
57 define Package
/freeradius2-mod-detail
58 $(call Package
/freeradius2
/Default
)
60 TITLE
:=Detailed accounting module
63 define Package
/freeradius2-mod-detail
/conffiles
64 /etc
/freeradius2
/modules
/detail
67 define Package
/freeradius2-mod-eap
68 $(call Package
/freeradius2
/Default
)
70 TITLE
:=Base EAP module
73 define Package
/freeradius2-mod-eap
/conffiles
74 /etc
/freeradius2
/eap.conf
77 define Package
/freeradius2-mod-eap-gtc
78 $(call Package
/freeradius2
/Default
)
79 DEPENDS
:=freeradius2-mod-eap
83 define Package
/freeradius2-mod-eap-md5
84 $(call Package
/freeradius2
/Default
)
85 DEPENDS
:=freeradius2-mod-eap
89 define Package
/freeradius2-mod-eap-mschapv2
90 $(call Package
/freeradius2
/Default
)
91 DEPENDS
:=freeradius2-mod-eap
92 TITLE
:=EAP
/MS-CHAPv2 module
95 define Package
/freeradius2-mod-eap-peap
96 $(call Package
/freeradius2
/Default
)
97 DEPENDS
:=freeradius2-mod-eap
98 TITLE
:=EAP
/PEAP module
101 define Package
/freeradius2-mod-eap-tls
102 $(call Package
/freeradius2
/Default
)
103 DEPENDS
:=freeradius2-mod-eap
104 TITLE
:=EAP
/TLS module
107 define Package
/freeradius2-mod-eap-ttls
108 $(call Package
/freeradius2
/Default
)
109 DEPENDS
:=freeradius2-mod-eap-tls
110 TITLE
:=EAP
/TTLS module
113 define Package
/freeradius2-mod-exec
114 $(call Package
/freeradius2
/Default
)
119 define Package
/freeradius2-mod-exec
/conffiles
120 /etc
/freeradius2
/modules
/exec
123 define Package
/freeradius2-mod-expiration
124 $(call Package
/freeradius2
/Default
)
126 TITLE
:=Expiration module
129 define Package
/freeradius2-mod-expiration
/conffiles
130 /etc
/freeradius2
/modules
/expiration
133 define Package
/freeradius2-mod-expr
134 $(call Package
/freeradius2
/Default
)
139 define Package
/freeradius2-mod-expr
/conffiles
140 /etc
/freeradius2
/modules
/expr
143 define Package
/freeradius2-mod-attr-filter
144 $(call Package
/freeradius2
/Default
)
146 TITLE
:=ATTR
filter module
149 define Package
/freeradius2-mod-attr-filter
/conffiles
150 /etc
/freeradius2
/modules
/attr_filter
151 /etc
/freeradius2
/attrs
152 /etc
/freeradius2
/attrs.access_reject
153 /etc
/freeradius2
/attrs.accounting_response
154 /etc
/freeradius2
/attrs.pre-proxy
157 define Package
/freeradius2-mod-attr-rewrite
158 $(call Package
/freeradius2
/Default
)
160 TITLE
:=ATTR rewrite module
163 define Package
/freeradius2-mod-attr-rewrite
/conffiles
164 /etc
/freeradius2
/modules
/attr_rewrite
167 define Package
/freeradius2-mod-files
168 $(call Package
/freeradius2
/Default
)
170 TITLE
:=Module using local files for authorization
173 define Package
/freeradius2-mod-files
/conffiles
174 /etc
/freeradius2
/acct_users
175 /etc
/freeradius2
/preproxy_users
176 /etc
/freeradius2
/users
177 /etc
/freeradius2
/modules
/files
180 define Package
/freeradius2-mod-ldap
181 $(call Package
/freeradius2
/Default
)
182 DEPENDS
:=freeradius2
+libopenldap
186 define Package
/freeradius2-mod-ldap
/conffiles
187 /etc
/freeradius2
/ldap.attrmap
188 /etc
/freeradius2
/modules
/ldap
191 define Package
/freeradius2-mod-logintime
192 $(call Package
/freeradius2
/Default
)
194 TITLE
:=Logintime module
197 define Package
/freeradius2-mod-logintime
/conffiles
198 /etc
/freeradius2
/modules
/logintime
201 define Package
/freeradius2-mod-mschap
202 $(call Package
/freeradius2
/Default
)
204 TITLE
:=MS-CHAP and MS-CHAPv2 module
207 define Package
/freeradius2-mod-mschap
/conffiles
208 /etc
/freeradius2
/modules
/mschap
211 define Package
/freeradius2-mod-pap
212 $(call Package
/freeradius2
/Default
)
217 define Package
/freeradius2-mod-pap
/conffiles
218 /etc
/freeradius2
/modules
/pap
221 define Package
/freeradius2-mod-preprocess
222 $(call Package
/freeradius2
/Default
)
224 TITLE
:=Request pre-processing module
227 define Package
/freeradius2-mod-preprocess
/conffiles
228 /etc
/freeradius2
/hints
229 /etc
/freeradius2
/huntgroups
230 /etc
/freeradius2
/modules
/preprocess
233 define Package
/freeradius2-mod-realm
234 $(call Package
/freeradius2
/Default
)
236 TITLE
:=Realms handling module
239 define Package
/freeradius2-mod-realm
/conffiles
240 /etc
/freeradius2
/proxy.conf
241 /etc
/freeradius2
/modules
/realm
244 define Package
/freeradius2-mod-sql
245 $(call Package
/freeradius2
/Default
)
247 TITLE
:=Base SQL module
250 define Package
/freeradius2-mod-sql
/conffiles
251 /etc
/freeradius2
/sql.conf
254 define Package
/freeradius2-mod-sql-mysql
255 $(call Package
/freeradius2
/Default
)
256 DEPENDS
:=freeradius2-mod-sql
+libmysqlclient
260 define Package
/freeradius2-mod-sql-pgsql
261 $(call Package
/freeradius2
/Default
)
262 DEPENDS
:=freeradius2-mod-sql
+libpq
263 TITLE
:=PostgreSQL module
266 define Package
/freeradius2-mod-sqlcounter
267 $(call Package
/freeradius2
/Default
)
268 DEPENDS
:=freeradius2-mod-sql
269 TITLE
:=Generic SQL Counter module
272 define Package
/freeradius2-mod-radutmp
273 $(call Package
/freeradius2
/Default
)
275 TITLE
:=Radius UTMP module
278 define Package
/freeradius2-mod-radutmp
/conffiles
279 /etc
/freeradius2
/modules
/radutmp
280 /etc
/freeradius2
/modules
/sradutmp
283 define Package
/freeradius2-utils
284 $(call Package
/freeradius2
/Default
)
286 TITLE
:=Misc. client utilities
290 --libdir=/usr
/lib
/freeradius2 \
291 --libexecdir
=/usr
/lib
/freeradius2 \
294 --disable-developer \
296 --with-openssl-includes
="$(STAGING_DIR)/usr/include" \
297 --with-openssl-libraries
="$(STAGING_DIR)/usr/lib" \
298 --enable-strict-dependencies \
299 --with-raddbdir
=/etc
/freeradius2 \
300 --with-radacctdir
=/var
/db
/radacct \
301 --with-logdir
=/var
/log \
304 --without-rlm_checkval \
306 --without-rlm_counter \
309 --without-rlm_eap_sim \
310 --without-rlm_example \
311 --without-rlm_ippool \
314 --without-rlm_smsotp \
317 --without-rlm_python \
319 --without-rlm_always \
321 --with-rlm_sqlcounter \
322 --without-rlm_sqlhpwippool \
323 --without-rlm_sqlippool \
324 --without-rlm_sql_db2 \
325 --without-rlm_sql_firebird \
326 --without-rlm_sql_freetds \
327 --without-rlm_sql_iodbc \
328 --without-rlm_sql_oracle \
329 --without-rlm_sql_sybase \
330 --without-rlm_sql_unixodbc \
331 --without-rlm_sql_log \
332 --without-rlm_sql_sqlite \
334 --without-rlm_eap_tnc \
335 --without-rlm_eap_ikev2 \
336 --without-rlm_opendirectory \
337 --without-rlm_wimax \
340 freeradius freeradius.internal \
341 rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
342 rfc4372 rfc4675 rfc4679 \
346 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-ldap
),)
348 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
349 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib"
350 CONFIGURE_LIBS
+= -lcrypto
-lssl
352 CONFIGURE_ARGS
+= --without-rlm_ldap
355 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-sql-mysql
),)
357 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include" \
358 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql"
360 CONFIGURE_VARS
+= ac_cv_lib_mysqlclient_r_mysql_init
=yes
362 CONFIGURE_ARGS
+= --without-rlm_sql_mysql
365 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-sql-pgsql
),)
367 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
368 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib"
370 CONFIGURE_ARGS
+= --without-rlm_sql_postgresql
373 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-eap-peap
),)
375 --with-rlm_eap_peap \
376 --with-rlm_eap_peap-include-dir
="$(STAGING_DIR)/usr/include" \
377 --with-rlm_eap_peap-lib-dir
="$(STAGING_DIR)/usr/lib"
378 CONFIGURE_LIBS
+= -lcrypto
-lssl
380 CONFIGURE_ARGS
+= --without-rlm_eap_peap
383 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-eap-tls
),)
386 --with-rlm_eap_tls-include-dir
="$(STAGING_DIR)/usr/include" \
387 --with-rlm_eap_tls-lib-dir
="$(STAGING_DIR)/usr/lib"
388 CONFIGURE_LIBS
+= -lcrypto
-lssl
390 CONFIGURE_ARGS
+= --without-rlm_eap_tls
393 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-eap-ttls
),)
395 --with-rlm_eap_ttls \
396 --with-rlm_eap_ttls-include-dir
="$(STAGING_DIR)/usr/include" \
397 --with-rlm_eap_ttls-lib-dir
="$(STAGING_DIR)/usr/lib"
398 CONFIGURE_LIBS
+= -lcrypto
-lssl
400 CONFIGURE_ARGS
+= --without-rlm_eap_ttls
403 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-attr-rewrite
),)
404 CONFIGURE_ARGS
+= --with-rlm_attr-rewrite
406 CONFIGURE_ARGS
+= --without-rlm_attr-rewrite
409 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-radutmp
),)
410 CONFIGURE_ARGS
+= --with-rlm_radutmp
412 CONFIGURE_ARGS
+= --without-rlm_radutmp
415 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-logintime
),)
416 CONFIGURE_ARGS
+= --with-rlm_logintime
418 CONFIGURE_ARGS
+= --without-rlm_logintime
421 ifneq ($(SDK
)$(CONFIG_PACKAGE_freeradius2-mod-expiration
),)
422 CONFIGURE_ARGS
+= --with-rlm_expiration
424 CONFIGURE_ARGS
+= --without-rlm_expiration
428 LDFLAGS
="$$$$LDFLAGS" \
429 LIBS
="$(CONFIGURE_LIBS)" \
431 ac_cv_lib_readline
=no \
434 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
435 R
="$(PKG_INSTALL_DIR)" \
440 define Package
/freeradius2
/install
441 $(INSTALL_DIR
) $(1)/etc
/freeradius2
442 $(INSTALL_DIR
) $(1)/etc
/freeradius2
/modules
443 $(INSTALL_DIR
) $(1)/etc
/freeradius2
/sites
444 for f in clients.conf dictionary radiusd.conf policy.conf
; do \
445 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius2
/$$$${f} $(1)/etc
/freeradius2
/ ; \
447 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius2
/sites-available
/default
$(1)/etc
/freeradius2
/sites
/default
448 $(INSTALL_DIR
) $(1)/usr
/share
/freeradius2
449 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary
$(1)/usr
/share
/freeradius2
/
450 $(SED
) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr
/share
/freeradius2
/dictionary
451 for f in
$(PKG_DICTIONARIES
); do \
452 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$$$${f} $(1)/usr
/share
/freeradius2
/ ; \
453 $(SED
) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr
/share
/freeradius2
/dictionary
; \
455 $(INSTALL_DIR
) $(1)/usr
/lib
/freeradius2
456 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/freeradius2
/libfreeradius-radius
{,-*}.so
$(1)/usr
/lib
/freeradius2
457 $(INSTALL_DIR
) $(1)/usr
/sbin
458 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd
$(1)/usr
/sbin
/
459 $(INSTALL_DIR
) $(1)/etc
/init.d
460 $(INSTALL_BIN
) .
/files
/radiusd.init
$(1)/etc
/init.d
/radiusd
463 define Package
/freeradius2-democerts
/install
464 $(INSTALL_DIR
) $(1)/etc
/freeradius2
465 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius2
/certs
$(1)/etc
/freeradius2
/
466 rm -rf
$(1)/etc
/freeradius2
/certs
/README
467 rm -rf
$(1)/etc
/freeradius2
/certs
/new
*
468 rm -rf
$(1)/etc
/freeradius2
/certs
/demoCA
/index
*
469 rm -rf
$(1)/etc
/freeradius2
/certs
/demoCA
/serial
*
470 rm -rf
$(1)/etc
/freeradius2
/certs
/bootstrap
471 rm -rf
$(1)/etc
/freeradius2
/certs
/Makefile
472 rm -rf
$(1)/etc
/freeradius2
/certs
/ca.cnf
473 rm -rf
$(1)/etc
/freeradius2
/certs
/client.cnf
474 rm -rf
$(1)/etc
/freeradius2
/certs
/server.cnf
477 define Package
/freeradius2-utils
/install
478 $(INSTALL_DIR
) $(1)/usr
/bin
479 for f in radclient radeapclient
; do \
480 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$${f} $(1)/usr
/bin
/ ; \
485 define Package
/$(1)/install
486 [ -z
"$(2)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/freeradius2
488 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/freeradius2
/$$$$$$$${m}{,-*}.so
$$(1)/usr
/lib
/freeradius2
; \
490 [ -z
"$(3)" ] ||
$(INSTALL_DIR
) $$(1)/etc
/freeradius2
491 [ -z
"$(4)" ] ||
$(INSTALL_DIR
) $$(1)/etc
/freeradius2
/$(4)
493 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeradius2
/$$$$$$$${f} $$(1)/etc
/freeradius2
/$$$$$$$${f} ; \
497 $$(eval
$$(call BuildPackage
,$(1)))
500 $(eval
$(call BuildPackage
,freeradius2
))
501 $(eval
$(call BuildPackage
,freeradius2-democerts
))
502 $(eval
$(call BuildPlugin
,freeradius2-mod-chap
,rlm_chap
,modules
/chap
,modules
,))
503 $(eval
$(call BuildPlugin
,freeradius2-mod-detail
,rlm_detail
,modules
/detail
,modules
,))
504 $(eval
$(call BuildPlugin
,freeradius2-mod-eap
,libfreeradius-eap rlm_eap
,eap.conf
))
505 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-gtc
,rlm_eap_gtc
,))
506 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-md5
,rlm_eap_md5
,))
507 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-mschapv2
,rlm_eap_mschapv2
,))
508 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-peap
,rlm_eap_peap
,))
509 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-tls
,rlm_eap_tls
,))
510 $(eval
$(call BuildPlugin
,freeradius2-mod-eap-ttls
,rlm_eap_ttls
,))
511 $(eval
$(call BuildPlugin
,freeradius2-mod-exec
,rlm_exec
,modules
/exec modules
/echo
,modules
,))
512 $(eval
$(call BuildPlugin
,freeradius2-mod-attr-rewrite
,rlm_attr_rewrite
,modules
/attr_rewrite
,modules
,))
513 $(eval
$(call BuildPlugin
,freeradius2-mod-files
,rlm_files
,acct_users preproxy_users users modules
/files
,modules
,))
514 $(eval
$(call BuildPlugin
,freeradius2-mod-ldap
,rlm_ldap
,ldap.attrmap modules
/ldap
,modules
,))
515 $(eval
$(call BuildPlugin
,freeradius2-mod-mschap
,rlm_mschap
,modules
/mschap
,modules
,))
516 $(eval
$(call BuildPlugin
,freeradius2-mod-pap
,rlm_pap
,modules
/pap
,modules
,))
517 $(eval
$(call BuildPlugin
,freeradius2-mod-preprocess
,rlm_preprocess
,hints huntgroups modules
/preprocess
,modules
,))
518 $(eval
$(call BuildPlugin
,freeradius2-mod-realm
,rlm_realm
,proxy.conf modules
/realm modules
/inner-eap
,modules
,))
519 $(eval
$(call BuildPlugin
,freeradius2-mod-sql
,rlm_sql
,sql.conf
,))
520 $(eval
$(call BuildPlugin
,freeradius2-mod-sql-mysql
,rlm_sql_mysql
,))
521 $(eval
$(call BuildPlugin
,freeradius2-mod-sql-pgsql
,rlm_sql_postgresql
,))
522 $(eval
$(call BuildPlugin
,freeradius2-mod-sqlcounter
,rlm_sqlcounter
,))
523 $(eval
$(call BuildPlugin
,freeradius2-mod-radutmp
,rlm_radutmp
,modules
/radutmp modules
/sradutmp
,modules
,))
524 $(eval
$(call BuildPlugin
,freeradius2-mod-logintime
,rlm_logintime
,modules
/logintime
,modules
,))
525 $(eval
$(call BuildPlugin
,freeradius2-mod-expr
,rlm_expr
,modules
/expr
,modules
,))
526 $(eval
$(call BuildPlugin
,freeradius2-mod-attr-filter
,rlm_attr_filter
,modules
/attr_filter attrs attrs.access_reject attrs.accounting_response attrs.pre-proxy
,modules
,,))
527 $(eval
$(call BuildPlugin
,freeradius2-mod-expiration
,rlm_expiration
,modules
/expiration
,modules
,))
528 $(eval
$(call BuildPackage
,freeradius2-utils
))