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 --without-rlm_attr-rewrite \
31 --without-rlm_counter \
34 --without-rlm_eap_sim \
36 --without-rlm_ippool \
39 --without-rlm_radutmp \
40 --without-rlm_sql_iodbc \
41 --without-rlm_sql_oracle \
42 --without-rlm_sql_unixodbc \
44 --without-rlm_x99-token \
46 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP
),)
47 PKG_CONFIGURE_OPTIONS
+= \
48 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
49 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib"
51 PKG_CONFIGURE_OPTIONS
+= --without-rlm_ldap
53 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL
),)
54 PKG_CONFIGURE_OPTIONS
+= \
55 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include/mysql" \
56 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql"
58 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_mysql
60 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL
),)
61 PKG_CONFIGURE_OPTIONS
+= \
62 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
63 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib"
65 PKG_CONFIGURE_OPTIONS
+= --without-rlm_sql_postgresql
68 include $(TOPDIR
)/package
/rules.mk
70 define PKG_mod_template
73 install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/freeradius
75 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/$$$${m}{,-*}.so \
76 $$(IDIR_
$(1))/usr
/lib
/freeradius
/ ; \
78 install -d
-m0755
$$(IDIR_
$(1))/etc
/freeradius
80 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$$$${f} \
81 $$(IDIR_
$(1))/etc
/freeradius
/ ; \
83 $(RSTRIP
) $$(IDIR_
$(1))
84 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
88 $(eval
$(call PKG_template
,FREERADIUS
,freeradius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
89 $(eval
$(call PKG_template
,FREERADIUS_DEMOCERTS
,freeradius-democerts
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
90 $(eval
$(call PKG_template
,FREERADIUS_MOD_CHAP
,freeradius-mod-chap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
91 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP
,freeradius-mod-eap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
92 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_GTC
,freeradius-mod-eap-gtc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
93 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MD5
,freeradius-mod-eap-md5
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
94 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,freeradius-mod-eap-mschapv2
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
95 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_PEAP
,freeradius-mod-eap-peap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
96 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TLS
,freeradius-mod-eap-tls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
97 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TTLS
,freeradius-mod-eap-ttls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
98 $(eval
$(call PKG_template
,FREERADIUS_MOD_FILES
,freeradius-mod-files
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,FREERADIUS_MOD_LDAP
,freeradius-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,FREERADIUS_MOD_MSCHAP
,freeradius-mod-mschap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(eval
$(call PKG_template
,FREERADIUS_MOD_PAP
,freeradius-mod-pap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
102 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL
,freeradius-mod-sql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_MYSQL
,freeradius-mod-sql-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_PGSQL
,freeradius-mod-sql-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
105 $(eval
$(call PKG_template
,FREERADIUS_UTILS
,freeradius-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_CHAP
,rlm_chap
,))
108 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP
,libeap rlm_eap
,eap.conf
))
109 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_GTC
,rlm_eap_gtc
,))
110 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MD5
,rlm_eap_md5
,))
111 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,rlm_eap_mschapv2
,))
112 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_PEAP
,rlm_eap_peap
,))
113 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TLS
,rlm_eap_tls
,))
114 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TTLS
,rlm_eap_ttls
,))
115 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_FILES
,rlm_files
,acct_users preproxy_users users
))
116 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_LDAP
,rlm_ldap
,ldap.attrmap
))
117 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_MSCHAP
,rlm_mschap
,))
118 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PAP
,rlm_pap
,))
119 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL
,rlm_sql
,sql.conf
))
120 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_MYSQL
,rlm_sql_mysql
,))
121 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_PGSQL
,rlm_sql_postgresql
,))
123 $(PKG_BUILD_DIR
)/.configured
:
124 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
125 $(TARGET_CONFIGURE_OPTS
) \
126 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
127 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
128 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
129 sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
130 sys_lib_search_path_spec
="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
133 --target
=$(GNU_TARGET_NAME
) \
134 --host
=$(GNU_TARGET_NAME
) \
135 --build
=$(GNU_HOST_NAME
) \
136 --program-prefix
="" \
137 --program-suffix
="" \
141 --datadir=/usr
/share \
142 --includedir=/usr
/include \
143 --infodir=/usr
/share
/info \
144 --libdir=/usr
/lib
/freeradius \
145 --libexecdir
=/usr
/lib
/freeradius \
146 --localstatedir
=/var \
147 --mandir=/usr
/share
/man \
148 --sbindir
=/usr
/sbin \
150 $(DISABLE_LARGEFILE
) \
152 $(PKG_CONFIGURE_OPTIONS
) \
156 $(PKG_BUILD_DIR
)/.built
:
157 rm -rf
$(PKG_INSTALL_DIR
)
158 mkdir
-p
$(PKG_INSTALL_DIR
)
159 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
160 R
="$(PKG_INSTALL_DIR)" \
166 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/init.d
167 install -m0755 .
/files
/radiusd.init
$(IDIR_FREERADIUS
)/etc
/init.d
/radiusd
168 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/freeradius
169 for f in clients.conf dictionary radiusd.conf
; do \
170 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$${f} \
171 $(IDIR_FREERADIUS
)/etc
/freeradius
/ ; \
173 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/share
/freeradius
174 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary \
175 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/
176 for f in cisco freeradius microsoft tunnel wispr
; do \
177 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$${f} \
178 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/ ; \
180 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/lib
/freeradius
181 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/libradius
{,-*}.so \
182 $(IDIR_FREERADIUS
)/usr
/lib
/freeradius
/
183 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/sbin
184 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd \
185 $(IDIR_FREERADIUS
)/usr
/sbin
/
186 $(RSTRIP
) $(IDIR_FREERADIUS
)
187 $(IPKG_BUILD
) $(IDIR_FREERADIUS
) $(PACKAGE_DIR
)
189 $(IPKG_FREERADIUS_DEMOCERTS
):
190 install -m0755
-d
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
191 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/certs \
192 $(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/
193 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/README
194 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/new
*
195 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/index
*
196 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/serial
*
197 $(RSTRIP
) $(IDIR_FREERADIUS_DEMOCERTS
)
198 $(IPKG_BUILD
) $(IDIR_FREERADIUS_DEMOCERTS
) $(PACKAGE_DIR
)
200 $(IPKG_FREERADIUS_UTILS
):
201 install -m0755
-d
$(IDIR_FREERADIUS_UTILS
)/usr
/bin
202 for f in radclient radeapclient
; do \
203 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/$${f} \
204 $(IDIR_FREERADIUS_UTILS
)/usr
/bin
/ ; \
206 $(RSTRIP
) $(IDIR_FREERADIUS_UTILS
)
207 $(IPKG_BUILD
) $(IDIR_FREERADIUS_UTILS
) $(PACKAGE_DIR
)