3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=f5dfce4efbb03bbc47ceae08270a875e
10 PKG_SOURCE_URL
:=ftp
://ftp.freeradius.org
/pub
/radius
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 PKG_CONFIGURE_OPTIONS
:= \
20 --disable-ltdl-install \
21 --with-ltdl-include
="$(STAGING_DIR)/usr/include" \
22 --with-ltdl-lib
="$(STAGING_DIR)/usr/lib" \
23 --with-openssl-includes
="$(STAGING_DIR)/usr/include" \
24 --with-openssl-libraries
="$(STAGING_DIR)/usr/lib" \
25 --enable-strict-dependencies \
26 --with-raddbdir
=/etc
/freeradius \
29 --with-experimental-modules \
30 --without-rlm_attr-rewrite \
31 --without-rlm_checkval \
32 --without-rlm_counter \
35 --without-rlm_eap_sim \
36 --without-rlm_example \
37 --without-rlm_ippool \
41 --without-rlm_python \
42 --without-rlm_radutmp \
45 --with-rlm_sqlcounter \
46 --without-rlm_sql_db2 \
47 --without-rlm_sql_freetds \
48 --without-rlm_sql_iodbc \
49 --without-rlm_sql_oracle \
50 --without-rlm_sql_sybase \
51 --without-rlm_sql_unixodbc \
53 --without-rlm_x99-token \
55 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP
),)
56 PKG_CONFIGURE_OPTIONS
+= \
57 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
58 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib"
60 PKG_CONFIGURE_OPTIONS
+= --without-rlm_ldap
62 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL
),)
63 PKG_CONFIGURE_OPTIONS
+= \
64 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include/mysql" \
65 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql"
67 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_mysql
69 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL
),)
70 PKG_CONFIGURE_OPTIONS
+= \
71 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
72 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib"
74 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_postgresql
77 include $(TOPDIR
)/package
/rules.mk
79 define PKG_mod_template
82 [ -z
"$(2)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/freeradius
84 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/$$$${m}{,-*}.so \
85 $$(IDIR_
$(1))/usr
/lib
/freeradius
/ ; \
87 [ -z
"$(3)" ] ||
install -d
-m0755
$$(IDIR_
$(1))/etc
/freeradius
89 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$$$${f} \
90 $$(IDIR_
$(1))/etc
/freeradius
/ ; \
92 $(RSTRIP
) $$(IDIR_
$(1))
93 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
97 $(eval
$(call PKG_template
,FREERADIUS
,freeradius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
98 $(eval
$(call PKG_template
,FREERADIUS_DEMOCERTS
,freeradius-democerts
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,FREERADIUS_MOD_CHAP
,freeradius-mod-chap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP
,freeradius-mod-eap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_GTC
,freeradius-mod-eap-gtc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
102 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MD5
,freeradius-mod-eap-md5
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,freeradius-mod-eap-mschapv2
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_PEAP
,freeradius-mod-eap-peap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
105 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TLS
,freeradius-mod-eap-tls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
106 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TTLS
,freeradius-mod-eap-ttls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_template
,FREERADIUS_MOD_FILES
,freeradius-mod-files
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
108 $(eval
$(call PKG_template
,FREERADIUS_MOD_LDAP
,freeradius-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
109 $(eval
$(call PKG_template
,FREERADIUS_MOD_MSCHAP
,freeradius-mod-mschap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
110 $(eval
$(call PKG_template
,FREERADIUS_MOD_PAP
,freeradius-mod-pap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
111 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL
,freeradius-mod-sql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
112 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_MYSQL
,freeradius-mod-sql-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
113 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_PGSQL
,freeradius-mod-sql-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
114 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQLCOUNTER
,freeradius-mod-sqlcounter
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
115 $(eval
$(call PKG_template
,FREERADIUS_UTILS
,freeradius-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
117 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_CHAP
,rlm_chap
,))
118 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP
,libeap rlm_eap
,eap.conf
))
119 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_GTC
,rlm_eap_gtc
,))
120 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MD5
,rlm_eap_md5
,))
121 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,rlm_eap_mschapv2
,))
122 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_PEAP
,rlm_eap_peap
,))
123 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TLS
,rlm_eap_tls
,))
124 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TTLS
,rlm_eap_ttls
,))
125 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_FILES
,rlm_files
,acct_users preproxy_users users
))
126 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_LDAP
,rlm_ldap
,ldap.attrmap
))
127 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_MSCHAP
,rlm_mschap
,))
128 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PAP
,rlm_pap
,))
129 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL
,rlm_sql
,sql.conf
))
130 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_MYSQL
,rlm_sql_mysql
,))
131 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_PGSQL
,rlm_sql_postgresql
,))
132 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQLCOUNTER
,rlm_sqlcounter
,))
134 $(PKG_BUILD_DIR
)/.configured
:
135 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
136 $(TARGET_CONFIGURE_OPTS
) \
137 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
138 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
139 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
140 sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
141 sys_lib_search_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
144 --target
=$(GNU_TARGET_NAME
) \
145 --host
=$(GNU_TARGET_NAME
) \
146 --build
=$(GNU_HOST_NAME
) \
147 --program-prefix
="" \
148 --program-suffix
="" \
152 --datadir=/usr
/share \
153 --includedir=/usr
/include \
154 --infodir=/usr
/share
/info \
155 --libdir=/usr
/lib
/freeradius \
156 --libexecdir
=/usr
/lib
/freeradius \
157 --localstatedir
=/var \
158 --mandir=/usr
/share
/man \
159 --sbindir
=/usr
/sbin \
161 $(DISABLE_LARGEFILE
) \
163 $(PKG_CONFIGURE_OPTIONS
) \
167 $(PKG_BUILD_DIR
)/.built
:
168 rm -rf
$(PKG_INSTALL_DIR
)
169 mkdir
-p
$(PKG_INSTALL_DIR
)
170 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
171 R
="$(PKG_INSTALL_DIR)" \
177 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/init.d
178 install -m0755 .
/files
/radiusd.init
$(IDIR_FREERADIUS
)/etc
/init.d
/radiusd
179 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/freeradius
180 for f in clients.conf dictionary radiusd.conf
; do \
181 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$${f} \
182 $(IDIR_FREERADIUS
)/etc
/freeradius
/ ; \
184 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/share
/freeradius
185 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary \
186 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/
187 for f in cisco freeradius microsoft tunnel wispr
; do \
188 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$${f} \
189 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/ ; \
191 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/lib
/freeradius
192 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/libradius
{,-*}.so \
193 $(IDIR_FREERADIUS
)/usr
/lib
/freeradius
/
194 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/sbin
195 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd \
196 $(IDIR_FREERADIUS
)/usr
/sbin
/
197 $(RSTRIP
) $(IDIR_FREERADIUS
)
198 $(IPKG_BUILD
) $(IDIR_FREERADIUS
) $(PACKAGE_DIR
)
200 $(IPKG_FREERADIUS_DEMOCERTS
):
201 install -m0755
-d
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
202 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/certs \
203 $(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/
204 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/README
205 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/new
*
206 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/index
*
207 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/serial
*
208 $(RSTRIP
) $(IDIR_FREERADIUS_DEMOCERTS
)
209 $(IPKG_BUILD
) $(IDIR_FREERADIUS_DEMOCERTS
) $(PACKAGE_DIR
)
211 $(IPKG_FREERADIUS_UTILS
):
212 install -m0755
-d
$(IDIR_FREERADIUS_UTILS
)/usr
/bin
213 for f in radclient radeapclient
; do \
214 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/$${f} \
215 $(IDIR_FREERADIUS_UTILS
)/usr
/bin
/ ; \
217 $(RSTRIP
) $(IDIR_FREERADIUS_UTILS
)
218 $(IPKG_BUILD
) $(IDIR_FREERADIUS_UTILS
) $(PACKAGE_DIR
)