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 include $(TOPDIR
)/package
/rules.mk
19 define PKG_mod_template
22 install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/freeradius
24 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/$$$${m}{,-*}.so \
25 $$(IDIR_
$(1))/usr
/lib
/freeradius
/ ; \
27 install -d
-m0755
$$(IDIR_
$(1))/etc
/freeradius
29 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$$$${f} \
30 $$(IDIR_
$(1))/etc
/freeradius
/ ; \
32 $(RSTRIP
) $$(IDIR_
$(1))
33 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
37 $(eval
$(call PKG_template
,FREERADIUS
,freeradius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
38 $(eval
$(call PKG_template
,FREERADIUS_DEMOCERTS
,freeradius-democerts
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
39 $(eval
$(call PKG_template
,FREERADIUS_MOD_CHAP
,freeradius-mod-chap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
40 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP
,freeradius-mod-eap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
41 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_GTC
,freeradius-mod-eap-gtc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
42 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MD5
,freeradius-mod-eap-md5
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
43 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,freeradius-mod-eap-mschapv2
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
44 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_PEAP
,freeradius-mod-eap-peap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
45 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TLS
,freeradius-mod-eap-tls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
46 $(eval
$(call PKG_template
,FREERADIUS_MOD_EAP_TTLS
,freeradius-mod-eap-ttls
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
47 $(eval
$(call PKG_template
,FREERADIUS_MOD_FILES
,freeradius-mod-files
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
48 $(eval
$(call PKG_template
,FREERADIUS_MOD_LDAP
,freeradius-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
49 $(eval
$(call PKG_template
,FREERADIUS_MOD_MSCHAP
,freeradius-mod-mschap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
50 $(eval
$(call PKG_template
,FREERADIUS_MOD_PAP
,freeradius-mod-pap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
51 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL
,freeradius-mod-sql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
52 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_MYSQL
,freeradius-mod-sql-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
53 $(eval
$(call PKG_template
,FREERADIUS_MOD_SQL_PGSQL
,freeradius-mod-sql-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
54 $(eval
$(call PKG_template
,FREERADIUS_UTILS
,freeradius-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
56 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_CHAP
,rlm_chap
,))
57 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP
,libeap rlm_eap
,eap.conf
))
58 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_GTC
,rlm_eap_gtc
,))
59 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MD5
,rlm_eap_md5
,))
60 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_MSCHAPV2
,rlm_eap_mschapv2
,))
61 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_PEAP
,rlm_eap_peap
,))
62 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TLS
,rlm_eap_tls
,))
63 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_EAP_TTLS
,rlm_eap_ttls
,))
64 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_FILES
,rlm_files
,acct_users preproxy_users users
))
65 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_LDAP
,rlm_ldap
,ldap.attrmap
))
66 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_MSCHAP
,rlm_mschap
,))
67 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_PAP
,rlm_pap
,))
68 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL
,rlm_sql
,sql.conf
))
69 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_MYSQL
,rlm_sql_mysql
,))
70 $(eval
$(call PKG_mod_template
,FREERADIUS_MOD_SQL_PGSQL
,rlm_sql_postgresql
,))
72 $(PKG_BUILD_DIR
)/.configured
:
73 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
74 $(TARGET_CONFIGURE_OPTS
) \
75 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
76 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
77 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(PKG_INSTALL_DIR)/usr/lib/freeradius" \
78 lt_sys_lib_search_path_spec
="$(STAGING_DIR)/usr/lib" \
81 --target
=$(GNU_TARGET_NAME
) \
82 --host
=$(GNU_TARGET_NAME
) \
83 --build
=$(GNU_HOST_NAME
) \
89 --datadir=/usr
/share \
90 --includedir=/usr
/include \
91 --infodir=/usr
/share
/info \
92 --libdir=/usr
/lib
/freeradius \
93 --libexecdir
=/usr
/lib
/freeradius \
94 --localstatedir
=/var \
95 --mandir=/usr
/share
/man \
98 $(DISABLE_LARGEFILE
) \
102 --disable-ltdl-install \
103 --with-ltdl-include
="$(STAGING_DIR)/usr/include" \
104 --with-ltdl-lib
="$(STAGING_DIR)/usr/lib" \
105 --with-openssl-includes
="$(STAGING_DIR)/usr/include" \
106 --with-openssl-libraries
="$(STAGING_DIR)/usr/lib" \
107 --enable-strict-dependencies \
108 --with-raddbdir
=/etc
/freeradius \
111 --without-rlm_attr-rewrite \
112 --with-rlm_checkval \
113 --without-rlm_counter \
116 --without-rlm_eap_sim \
118 --without-rlm_ippool \
120 --with-rlm_ldap-include-dir
="$(STAGING_DIR)/usr/include" \
121 --with-rlm_ldap-lib-dir
="$(STAGING_DIR)/usr/lib" \
123 --without-rlm_radutmp \
124 --without-rlm_sql_iodbc \
125 --with-mysql-include-dir
="$(STAGING_DIR)/usr/include/mysql" \
126 --with-mysql-lib-dir
="$(STAGING_DIR)/usr/lib/mysql" \
127 --without-rlm_sql_oracle \
128 --with-rlm_sql_postgresql-include-dir
="$(STAGING_DIR)/usr/include" \
129 --with-rlm_sql_postgresql-lib-dir
="$(STAGING_DIR)/usr/lib" \
130 --without-rlm_sql_unixodbc \
132 --without-rlm_x99-token \
134 touch
$(PKG_BUILD_DIR
)/.configured
136 $(PKG_BUILD_DIR
)/.built
:
137 $(MAKE
) -C
$(PKG_BUILD_DIR
)
138 mkdir
-p
$(PKG_INSTALL_DIR
)
139 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
140 R
="$(PKG_INSTALL_DIR)" \
143 touch
$(PKG_BUILD_DIR
)/.built
146 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/init.d
147 install -m0755 .
/files
/radiusd.init
$(IDIR_FREERADIUS
)/etc
/init.d
/radiusd
148 install -m0755
-d
$(IDIR_FREERADIUS
)/etc
/freeradius
149 for f in clients.conf dictionary radiusd.conf
; do \
150 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/$${f} \
151 $(IDIR_FREERADIUS
)/etc
/freeradius
/ ; \
153 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/share
/freeradius
154 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary \
155 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/
156 for f in cisco freeradius microsoft tunnel wispr
; do \
157 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/share
/freeradius
/dictionary.
$${f} \
158 $(IDIR_FREERADIUS
)/usr
/share
/freeradius
/ ; \
160 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/lib
/freeradius
161 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/freeradius
/libradius
{,-*}.so \
162 $(IDIR_FREERADIUS
)/usr
/lib
/freeradius
/
163 install -m0755
-d
$(IDIR_FREERADIUS
)/usr
/sbin
164 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/radiusd \
165 $(IDIR_FREERADIUS
)/usr
/sbin
/
166 $(RSTRIP
) $(IDIR_FREERADIUS
)
167 $(IPKG_BUILD
) $(IDIR_FREERADIUS
) $(PACKAGE_DIR
)
169 $(IPKG_FREERADIUS_DEMOCERTS
):
170 install -m0755
-d
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
171 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/freeradius
/certs \
172 $(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/
173 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/README
174 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/new
*
175 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/index
*
176 rm -rf
$(IDIR_FREERADIUS_DEMOCERTS
)/etc
/freeradius
/certs
/demoCA
/serial
*
177 $(RSTRIP
) $(IDIR_FREERADIUS_DEMOCERTS
)
178 $(IPKG_BUILD
) $(IDIR_FREERADIUS_DEMOCERTS
) $(PACKAGE_DIR
)
180 $(IPKG_FREERADIUS_UTILS
):
181 install -m0755
-d
$(IDIR_FREERADIUS_UTILS
)/usr
/bin
182 for f in radclient radeapclient
; do \
183 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/$${f} \
184 $(IDIR_FREERADIUS_UTILS
)/usr
/bin
/ ; \
186 $(RSTRIP
) $(IDIR_FREERADIUS_UTILS
)
187 $(IPKG_BUILD
) $(IDIR_FREERADIUS_UTILS
) $(PACKAGE_DIR
)