3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=edb5c3af6fabeff7b8e1131b6fa33e24
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 \
43 --without-rlm_python \
44 --without-rlm_radutmp \
47 --with-rlm_sqlcounter \
48 --without-rlm_sql_db2 \
49 --without-rlm_sql_freetds \
50 --without-rlm_sql_iodbc \
51 --without-rlm_sql_oracle \
52 --without-rlm_sql_sybase \
53 --without-rlm_sql_unixodbc \
55 --without-rlm_x99-token \
57 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP
),)
58 PKG_CONFIGURE_OPTIONS
+= \
59 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
60 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib"
62 PKG_CONFIGURE_OPTIONS
+= --without-rlm_ldap
64 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL
),)
65 PKG_CONFIGURE_OPTIONS
+= \
66 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include/mysql" \
67 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql"
69 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_mysql
71 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL
),)
72 PKG_CONFIGURE_OPTIONS
+= \
73 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
74 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib"
76 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_postgresql
79 include $(TOPDIR
)/package
/rules.mk
81 define PKG_mod_template
84 [ -z
"$(2)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/freeradius
86 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/$$$${m}{,-*}.so \
87 $$(IDIR_
$(1))/usr
/lib
/freeradius
/ ; \
89 [ -z
"$(3)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/etc
/freeradius
91 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$$$${f} \
92 $$(IDIR_
$(1))/etc
/freeradius
/ ; \
94 $(RSTRIP
) $$(IDIR_
$(1))
95 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
99 $(eval
$(call PKG_template
,FREERADIUS
,freeradius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,FREERADIUS_DEMOCERTS
,freeradius-democerts
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(eval
$(call PKG_template
,FREERADIUS_MOD_CHAP
,freeradius-mod-chap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
102 $(eval
$(call PKG_template
,FREERADIUS_MOD_DETAIL
,freeradius-mod-detail
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP
,freeradius-mod-eap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_GTC
,freeradius-mod-eap-gtc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
105 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MD5
,freeradius-mod-eap-md5
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
106 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,freeradius-mod-eap-mschapv2
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_PEAP
,freeradius-mod-eap-peap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
108 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TLS
,freeradius-mod-eap-tls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
109 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TTLS
,freeradius-mod-eap-ttls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
110 $(eval
$(call PKG_template
,FREERADIUS_MOD_FILES
,freeradius-mod-files
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
111 $(eval
$(call PKG_template
,FREERADIUS_MOD_LDAP
,freeradius-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
112 $(eval
$(call PKG_template
,FREERADIUS_MOD_MSCHAP
,freeradius-mod-mschap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
113 $(eval
$(call PKG_template
,FREERADIUS_MOD_PAP
,freeradius-mod-pap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
114 $(eval
$(call PKG_template
,FREERADIUS_MOD_PREPROCESS
,freeradius-mod-preprocess
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
115 $(eval
$(call PKG_template
,FREERADIUS_MOD_REALM
,freeradius-mod-realm
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
116 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL
,freeradius-mod-sql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
117 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_MYSQL
,freeradius-mod-sql-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
118 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_PGSQL
,freeradius-mod-sql-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
119 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQLCOUNTER
,freeradius-mod-sqlcounter
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
120 $(eval
$(call PKG_template
,FREERADIUS_UTILS
,freeradius-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
122 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_CHAP
,rlm_chap
,))
123 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_DETAIL
,rlm_detail
,))
124 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP
,libeap rlm_eap
,eap.conf
))
125 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_GTC
,rlm_eap_gtc
,))
126 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MD5
,rlm_eap_md5
,))
127 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,rlm_eap_mschapv2
,))
128 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_PEAP
,rlm_eap_peap
,))
129 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TLS
,rlm_eap_tls
,))
130 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TTLS
,rlm_eap_ttls
,))
131 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_FILES
,rlm_files
,acct_users preproxy_users users
))
132 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_LDAP
,rlm_ldap
,ldap.attrmap
))
133 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_MSCHAP
,rlm_mschap
,))
134 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PAP
,rlm_pap
,))
135 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PREPROCESS
,rlm_preprocess
,hints huntgroups
))
136 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_REALM
,rlm_realm
,proxy.conf
))
137 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL
,rlm_sql
,sql.conf
))
138 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_MYSQL
,rlm_sql_mysql
,))
139 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_PGSQL
,rlm_sql_postgresql
,))
140 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQLCOUNTER
,rlm_sqlcounter
,))
142 $(PKG_BUILD_DIR
)/.configured
:
143 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
144 $(TARGET_CONFIGURE_OPTS
) \
145 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
146 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
147 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
148 sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
149 sys_lib_search_path_spec
="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
152 --target
=$(GNU_TARGET_NAME
) \
153 --host
=$(GNU_TARGET_NAME
) \
154 --build
=$(GNU_HOST_NAME
) \
155 --program-prefix
="" \
156 --program-suffix
="" \
160 --datadir=/usr
/share \
161 --includedir=/usr
/include \
162 --infodir=/usr
/share
/info \
163 --libdir=/usr
/lib
/freeradius \
164 --libexecdir
=/usr
/lib
/freeradius \
165 --localstatedir
=/var \
166 --mandir=/usr
/share
/man \
167 --sbindir
=/usr
/sbin \
169 $(DISABLE_LARGEFILE
) \
171 $(PKG_CONFIGURE_OPTIONS
) \
175 $(PKG_BUILD_DIR
)/.built
:
176 rm -rf
$(PKG_INSTALL_DIR
)
177 mkdir
-p
$(PKG_INSTALL_DIR
)
178 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
179 R
="$(PKG_INSTALL_DIR)" \
185 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/init.d
186 install -m0755 .
/files
/radiusd.init
$(IDIR_FREERADIUS
)/etc
/init.d
/radiusd
187 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/freeradius
188 for f in clients.conf dictionary radiusd.conf
; do \
189 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$${f} \
190 $(IDIR_FREERADIUS
)/etc
/freeradius
/ ; \
192 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/share
/freeradius
193 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary \
194 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/
195 for f in cisco freeradius microsoft tunnel wispr
; do \
196 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$${f} \
197 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/ ; \
199 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/lib
/freeradius
200 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/libradius
{,-*}.so \
201 $(IDIR_FREERADIUS
)/usr
/lib
/freeradius
/
202 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/sbin
203 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd \
204 $(IDIR_FREERADIUS
)/usr
/sbin
/
205 $(RSTRIP
) $(IDIR_FREERADIUS
)
206 $(IPKG_BUILD
) $(IDIR_FREERADIUS
) $(PACKAGE_DIR
)
208 $(IPKG_FREERADIUS_DEMOCERTS
):
209 install -m0755
-d
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
210 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/certs \
211 $(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/
212 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/README
213 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/new
*
214 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/index
*
215 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/serial
*
216 $(RSTRIP
) $(IDIR_FREERADIUS_DEMOCERTS
)
217 $(IPKG_BUILD
) $(IDIR_FREERADIUS_DEMOCERTS
) $(PACKAGE_DIR
)
219 $(IPKG_FREERADIUS_UTILS
):
220 install -m0755
-d
$(IDIR_FREERADIUS_UTILS
)/usr
/bin
221 for f in radclient radeapclient
; do \
222 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/$${f} \
223 $(IDIR_FREERADIUS_UTILS
)/usr
/bin
/ ; \
225 $(RSTRIP
) $(IDIR_FREERADIUS_UTILS
)
226 $(IPKG_BUILD
) $(IDIR_FREERADIUS_UTILS
) $(PACKAGE_DIR
)