|
@@ -0,0 +1,632 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2008-2014 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=freeradius2
|
|
11
|
+PKG_VERSION:=2.2.5
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
|
|
16
|
+PKG_MD5SUM:=40535bace507d7a3134c3d858f3cbc5a
|
|
17
|
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
|
18
|
+
|
|
19
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
|
|
20
|
+PKG_FIXUP:=autoreconf
|
|
21
|
+
|
|
22
|
+PKG_CONFIG_DEPENDS := \
|
|
23
|
+ FREERADIUS_OPENSSL \
|
|
24
|
+ FREERADIUS_NOSSL
|
|
25
|
+
|
|
26
|
+include $(INCLUDE_DIR)/package.mk
|
|
27
|
+
|
|
28
|
+define Package/freeradius2/config
|
|
29
|
+ source "$(SOURCE)/Config.in"
|
|
30
|
+endef
|
|
31
|
+
|
|
32
|
+define Package/freeradius2/Default
|
|
33
|
+ SECTION:=net
|
|
34
|
+ CATEGORY:=Network
|
|
35
|
+ URL:=http://freeradius.org/
|
|
36
|
+ SUBMENU:=FreeRADIUS (version 2)
|
|
37
|
+endef
|
|
38
|
+
|
|
39
|
+define Package/freeradius2
|
|
40
|
+ $(call Package/freeradius2/Default)
|
|
41
|
+ DEPENDS:=+libltdl +libreadline +freeradius2-common
|
|
42
|
+ TITLE:=A flexible RADIUS server (version 2)
|
|
43
|
+endef
|
|
44
|
+
|
|
45
|
+define Package/freeradius2/conffiles
|
|
46
|
+/etc/freeradius2/clients.conf
|
|
47
|
+/etc/freeradius2/radiusd.conf
|
|
48
|
+/etc/freeradius2/sites/default
|
|
49
|
+endef
|
|
50
|
+
|
|
51
|
+define Package/freeradius2-democerts
|
|
52
|
+ $(call Package/freeradius2/Default)
|
|
53
|
+ DEPENDS:=freeradius2
|
|
54
|
+ TITLE:=Demo certificates to test the server
|
|
55
|
+endef
|
|
56
|
+
|
|
57
|
+define Package/freeradius2-common
|
|
58
|
+ $(call Package/freeradius2/Default)
|
|
59
|
+ TITLE:=common files
|
|
60
|
+ DEPENDS:=+libpthread +FREERADIUS_OPENSSL:libopenssl
|
|
61
|
+endef
|
|
62
|
+
|
|
63
|
+define Package/freeradius2-mod-chap
|
|
64
|
+ $(call Package/freeradius2/Default)
|
|
65
|
+ DEPENDS:=freeradius2
|
|
66
|
+ TITLE:=CHAP module
|
|
67
|
+endef
|
|
68
|
+
|
|
69
|
+define Package/freeradius2-mod-chap/conffiles
|
|
70
|
+/etc/freeradius2/modules/chap
|
|
71
|
+endef
|
|
72
|
+
|
|
73
|
+define Package/freeradius2-mod-detail
|
|
74
|
+ $(call Package/freeradius2/Default)
|
|
75
|
+ DEPENDS:=freeradius2
|
|
76
|
+ TITLE:=Detailed accounting module
|
|
77
|
+endef
|
|
78
|
+
|
|
79
|
+define Package/freeradius2-mod-detail/conffiles
|
|
80
|
+/etc/freeradius2/modules/detail
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+define Package/freeradius2-mod-eap
|
|
84
|
+ $(call Package/freeradius2/Default)
|
|
85
|
+ DEPENDS:=freeradius2
|
|
86
|
+ TITLE:=Base EAP module
|
|
87
|
+endef
|
|
88
|
+
|
|
89
|
+define Package/freeradius2-mod-eap/conffiles
|
|
90
|
+/etc/freeradius2/eap.conf
|
|
91
|
+endef
|
|
92
|
+
|
|
93
|
+define Package/freeradius2-mod-eap-gtc
|
|
94
|
+ $(call Package/freeradius2/Default)
|
|
95
|
+ DEPENDS:=freeradius2-mod-eap
|
|
96
|
+ TITLE:=EAP/GTC module
|
|
97
|
+endef
|
|
98
|
+
|
|
99
|
+define Package/freeradius2-mod-eap-md5
|
|
100
|
+ $(call Package/freeradius2/Default)
|
|
101
|
+ DEPENDS:=freeradius2-mod-eap
|
|
102
|
+ TITLE:=EAP/MD5 module
|
|
103
|
+endef
|
|
104
|
+
|
|
105
|
+define Package/freeradius2-mod-eap-mschapv2
|
|
106
|
+ $(call Package/freeradius2/Default)
|
|
107
|
+ DEPENDS:=freeradius2-mod-eap +freeradius2-mod-mschap
|
|
108
|
+ TITLE:=EAP/MS-CHAPv2 module
|
|
109
|
+endef
|
|
110
|
+
|
|
111
|
+define Package/freeradius2-mod-eap-peap
|
|
112
|
+ $(call Package/freeradius2/Default)
|
|
113
|
+ DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
|
|
114
|
+ TITLE:=EAP/PEAP module
|
|
115
|
+endef
|
|
116
|
+
|
|
117
|
+define Package/freeradius2-mod-eap-tls
|
|
118
|
+ $(call Package/freeradius2/Default)
|
|
119
|
+ DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
|
|
120
|
+ TITLE:=EAP/TLS module
|
|
121
|
+endef
|
|
122
|
+
|
|
123
|
+define Package/freeradius2-mod-eap-ttls
|
|
124
|
+ $(call Package/freeradius2/Default)
|
|
125
|
+ DEPENDS:=freeradius2-mod-eap-tls
|
|
126
|
+ TITLE:=EAP/TTLS module
|
|
127
|
+endef
|
|
128
|
+
|
|
129
|
+define Package/freeradius2-mod-exec
|
|
130
|
+ $(call Package/freeradius2/Default)
|
|
131
|
+ DEPENDS:=freeradius2
|
|
132
|
+ TITLE:=EXEC module
|
|
133
|
+endef
|
|
134
|
+
|
|
135
|
+define Package/freeradius2-mod-exec/conffiles
|
|
136
|
+/etc/freeradius2/modules/exec
|
|
137
|
+endef
|
|
138
|
+
|
|
139
|
+define Package/freeradius2-mod-expiration
|
|
140
|
+ $(call Package/freeradius2/Default)
|
|
141
|
+ DEPENDS:=freeradius2
|
|
142
|
+ TITLE:=Expiration module
|
|
143
|
+endef
|
|
144
|
+
|
|
145
|
+define Package/freeradius2-mod-expiration/conffiles
|
|
146
|
+/etc/freeradius2/modules/expiration
|
|
147
|
+endef
|
|
148
|
+
|
|
149
|
+define Package/freeradius2-mod-always
|
|
150
|
+ $(call Package/freeradius2/Default)
|
|
151
|
+ DEPENDS:=freeradius2
|
|
152
|
+ TITLE:=Always module
|
|
153
|
+endef
|
|
154
|
+
|
|
155
|
+define Package/freeradius2-mod-always/conffiles
|
|
156
|
+/etc/freeradius2/modules/always
|
|
157
|
+endef
|
|
158
|
+
|
|
159
|
+define Package/freeradius2-mod-expr
|
|
160
|
+ $(call Package/freeradius2/Default)
|
|
161
|
+ DEPENDS:=freeradius2
|
|
162
|
+ TITLE:=EXPR module
|
|
163
|
+endef
|
|
164
|
+
|
|
165
|
+define Package/freeradius2-mod-expr/conffiles
|
|
166
|
+/etc/freeradius2/modules/expr
|
|
167
|
+endef
|
|
168
|
+
|
|
169
|
+define Package/freeradius2-mod-attr-filter
|
|
170
|
+ $(call Package/freeradius2/Default)
|
|
171
|
+ DEPENDS:=freeradius2
|
|
172
|
+ TITLE:=ATTR filter module
|
|
173
|
+endef
|
|
174
|
+
|
|
175
|
+define Package/freeradius2-mod-attr-filter/conffiles
|
|
176
|
+/etc/freeradius2/modules/attr_filter
|
|
177
|
+/etc/freeradius2/attrs
|
|
178
|
+/etc/freeradius2/attrs.access_reject
|
|
179
|
+/etc/freeradius2/attrs.accounting_response
|
|
180
|
+/etc/freeradius2/attrs.pre-proxy
|
|
181
|
+endef
|
|
182
|
+
|
|
183
|
+define Package/freeradius2-mod-attr-rewrite
|
|
184
|
+ $(call Package/freeradius2/Default)
|
|
185
|
+ DEPENDS:=freeradius2
|
|
186
|
+ TITLE:=ATTR rewrite module
|
|
187
|
+endef
|
|
188
|
+
|
|
189
|
+define Package/freeradius2-mod-attr-rewrite/conffiles
|
|
190
|
+/etc/freeradius2/modules/attr_rewrite
|
|
191
|
+endef
|
|
192
|
+
|
|
193
|
+define Package/freeradius2-mod-files
|
|
194
|
+ $(call Package/freeradius2/Default)
|
|
195
|
+ DEPENDS:=freeradius2
|
|
196
|
+ TITLE:=Module using local files for authorization
|
|
197
|
+endef
|
|
198
|
+
|
|
199
|
+define Package/freeradius2-mod-files/conffiles
|
|
200
|
+/etc/freeradius2/acct_users
|
|
201
|
+/etc/freeradius2/preproxy_users
|
|
202
|
+/etc/freeradius2/users
|
|
203
|
+/etc/freeradius2/modules/files
|
|
204
|
+endef
|
|
205
|
+
|
|
206
|
+define Package/freeradius2-mod-passwd
|
|
207
|
+ $(call Package/freeradius2/Default)
|
|
208
|
+ DEPENDS:=freeradius2
|
|
209
|
+ TITLE:=Rlm passwd module
|
|
210
|
+endef
|
|
211
|
+
|
|
212
|
+define Package/freeradius2-mod-passwd/conffiles
|
|
213
|
+/etc/freeradius2/modules/passwd
|
|
214
|
+endef
|
|
215
|
+
|
|
216
|
+define Package/freeradius2-mod-ldap
|
|
217
|
+ $(call Package/freeradius2/Default)
|
|
218
|
+ DEPENDS:=freeradius2 +PACKAGE_freeradius2-mod-ldap:libopenldap
|
|
219
|
+ TITLE:=LDAP module
|
|
220
|
+endef
|
|
221
|
+
|
|
222
|
+define Package/freeradius2-mod-ldap/conffiles
|
|
223
|
+/etc/freeradius2/ldap.attrmap
|
|
224
|
+/etc/freeradius2/modules/ldap
|
|
225
|
+endef
|
|
226
|
+
|
|
227
|
+define Package/freeradius2-mod-logintime
|
|
228
|
+ $(call Package/freeradius2/Default)
|
|
229
|
+ DEPENDS:=freeradius2
|
|
230
|
+ TITLE:=Logintime module
|
|
231
|
+endef
|
|
232
|
+
|
|
233
|
+define Package/freeradius2-mod-logintime/conffiles
|
|
234
|
+/etc/freeradius2/modules/logintime
|
|
235
|
+endef
|
|
236
|
+
|
|
237
|
+define Package/freeradius2-mod-mschap
|
|
238
|
+ $(call Package/freeradius2/Default)
|
|
239
|
+ DEPENDS:=freeradius2
|
|
240
|
+ TITLE:=MS-CHAP and MS-CHAPv2 module
|
|
241
|
+endef
|
|
242
|
+
|
|
243
|
+define Package/freeradius2-mod-mschap/conffiles
|
|
244
|
+/etc/freeradius2/modules/mschap
|
|
245
|
+endef
|
|
246
|
+
|
|
247
|
+define Package/freeradius2-mod-pap
|
|
248
|
+ $(call Package/freeradius2/Default)
|
|
249
|
+ DEPENDS:=freeradius2
|
|
250
|
+ TITLE:=PAP module
|
|
251
|
+endef
|
|
252
|
+
|
|
253
|
+define Package/freeradius2-mod-pap/conffiles
|
|
254
|
+/etc/freeradius2/modules/pap
|
|
255
|
+endef
|
|
256
|
+
|
|
257
|
+define Package/freeradius2-mod-preprocess
|
|
258
|
+ $(call Package/freeradius2/Default)
|
|
259
|
+ DEPENDS:=freeradius2
|
|
260
|
+ TITLE:=Request pre-processing module
|
|
261
|
+endef
|
|
262
|
+
|
|
263
|
+define Package/freeradius2-mod-preprocess/conffiles
|
|
264
|
+/etc/freeradius2/hints
|
|
265
|
+/etc/freeradius2/huntgroups
|
|
266
|
+/etc/freeradius2/modules/preprocess
|
|
267
|
+endef
|
|
268
|
+
|
|
269
|
+define Package/freeradius2-mod-realm
|
|
270
|
+ $(call Package/freeradius2/Default)
|
|
271
|
+ DEPENDS:=freeradius2
|
|
272
|
+ TITLE:=Realms handling module
|
|
273
|
+endef
|
|
274
|
+
|
|
275
|
+define Package/freeradius2-mod-realm/conffiles
|
|
276
|
+/etc/freeradius2/proxy.conf
|
|
277
|
+/etc/freeradius2/modules/realm
|
|
278
|
+endef
|
|
279
|
+
|
|
280
|
+define Package/freeradius2-mod-sql
|
|
281
|
+ $(call Package/freeradius2/Default)
|
|
282
|
+ DEPENDS:=freeradius2
|
|
283
|
+ TITLE:=Base SQL module
|
|
284
|
+endef
|
|
285
|
+
|
|
286
|
+define Package/freeradius2-mod-sql/conffiles
|
|
287
|
+/etc/freeradius2/sql.conf
|
|
288
|
+endef
|
|
289
|
+
|
|
290
|
+define Package/freeradius2-mod-sql-mysql
|
|
291
|
+ $(call Package/freeradius2/Default)
|
|
292
|
+ DEPENDS:=freeradius2-mod-sql \
|
|
293
|
+ +PACKAGE_freeradius2-mod-sql-mysql:libmysqlclient-r
|
|
294
|
+ TITLE:=MySQL module
|
|
295
|
+endef
|
|
296
|
+
|
|
297
|
+define Package/freeradius2-mod-sql-pgsql
|
|
298
|
+ $(call Package/freeradius2/Default)
|
|
299
|
+ DEPENDS:=freeradius2-mod-sql \
|
|
300
|
+ +PACKAGE_freeradius2-mod-sql-pgsql:libpq
|
|
301
|
+ TITLE:=PostgreSQL module
|
|
302
|
+endef
|
|
303
|
+
|
|
304
|
+define Package/freeradius2-mod-sql-sqlite
|
|
305
|
+ $(call Package/freeradius2/Default)
|
|
306
|
+ DEPENDS:=freeradius2-mod-sql \
|
|
307
|
+ +PACKAGE_freeradius2-mod-sql-sqlite:libsqlite3
|
|
308
|
+ TITLE:=SQLite module
|
|
309
|
+endef
|
|
310
|
+
|
|
311
|
+define Package/freeradius2-mod-sqlcounter
|
|
312
|
+ $(call Package/freeradius2/Default)
|
|
313
|
+ DEPENDS:=freeradius2-mod-sql
|
|
314
|
+ TITLE:=Generic SQL Counter module
|
|
315
|
+endef
|
|
316
|
+
|
|
317
|
+define Package/freeradius2-mod-radutmp
|
|
318
|
+ $(call Package/freeradius2/Default)
|
|
319
|
+ DEPENDS:=freeradius2
|
|
320
|
+ TITLE:=Radius UTMP module
|
|
321
|
+endef
|
|
322
|
+
|
|
323
|
+define Package/freeradius2-mod-radutmp/conffiles
|
|
324
|
+/etc/freeradius2/modules/radutmp
|
|
325
|
+/etc/freeradius2/modules/sradutmp
|
|
326
|
+endef
|
|
327
|
+
|
|
328
|
+define Package/freeradius2-utils
|
|
329
|
+ $(call Package/freeradius2/Default)
|
|
330
|
+ DEPENDS:=+freeradius2-common
|
|
331
|
+ TITLE:=Misc. client utilities
|
|
332
|
+endef
|
|
333
|
+
|
|
334
|
+define Package/freeradius2-mod-sqllog
|
|
335
|
+ $(call Package/freeradius2/Default)
|
|
336
|
+ DEPENDS:=freeradius2
|
|
337
|
+ TITLE:=SQL Logging module
|
|
338
|
+endef
|
|
339
|
+
|
|
340
|
+CONFIGURE_ARGS+= \
|
|
341
|
+ --libdir=/usr/lib/freeradius2 \
|
|
342
|
+ --libexecdir=/usr/lib/freeradius2 \
|
|
343
|
+ --enable-shared \
|
|
344
|
+ --disable-static \
|
|
345
|
+ --disable-developer \
|
|
346
|
+ --with-threads \
|
|
347
|
+ $(if $(CONFIG_FREERADIUS_OPENSSL),--with,--without)-openssl \
|
|
348
|
+ $(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-includes="$(STAGING_DIR)/usr/include",) \
|
|
349
|
+ $(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-libraries="$(STAGING_DIR)/usr/lib",) \
|
|
350
|
+ --with-system-libtool \
|
|
351
|
+ --with-system-libltdl \
|
|
352
|
+ --enable-strict-dependencies \
|
|
353
|
+ --with-raddbdir=/etc/freeradius2 \
|
|
354
|
+ --with-radacctdir=/var/db/radacct \
|
|
355
|
+ --with-logdir=/var/log \
|
|
356
|
+ --without-edir \
|
|
357
|
+ --without-snmp \
|
|
358
|
+ --without-rlm_checkval \
|
|
359
|
+ --without-rlm_dbm \
|
|
360
|
+ --without-rlm_counter \
|
|
361
|
+ --with-rlm_expr \
|
|
362
|
+ --with-rlm_eap \
|
|
363
|
+ --without-rlm_eap_sim \
|
|
364
|
+ --without-rlm_example \
|
|
365
|
+ --without-rlm_ippool \
|
|
366
|
+ --without-rlm_krb5 \
|
|
367
|
+ --without-rlm_otp \
|
|
368
|
+ --without-rlm_smsotp \
|
|
369
|
+ --without-rlm_pam \
|
|
370
|
+ --without-rlm_perl \
|
|
371
|
+ --without-rlm_python \
|
|
372
|
+ --without-rlm_smb \
|
|
373
|
+ --with-rlm_sql \
|
|
374
|
+ --with-rlm_sqlcounter \
|
|
375
|
+ --without-rlm_sqlhpwippool \
|
|
376
|
+ --without-rlm_sqlippool \
|
|
377
|
+ --without-rlm_sql_db2 \
|
|
378
|
+ --without-rlm_sql_firebird \
|
|
379
|
+ --without-rlm_sql_freetds \
|
|
380
|
+ --without-rlm_sql_iodbc \
|
|
381
|
+ --without-rlm_sql_oracle \
|
|
382
|
+ --without-rlm_sql_sybase \
|
|
383
|
+ --without-rlm_sql_unixodbc \
|
|
384
|
+ --without-rlm_sql_log \
|
|
385
|
+ --without-rlm_unix \
|
|
386
|
+ --without-rlm_eap_tnc \
|
|
387
|
+ --without-rlm_eap_ikev2 \
|
|
388
|
+ --without-rlm_opendirectory \
|
|
389
|
+ --without-rlm_wimax \
|
|
390
|
+ --without-rlm_ruby \
|
|
391
|
+ --without-rlm_caching \
|
|
392
|
+ --without-rlm_redis \
|
|
393
|
+ --without-rlm_rediswho \
|
|
394
|
+ --without-rlm_soh \
|
|
395
|
+ --without-rlm_sim \
|
|
396
|
+ --without-rlm_replicate \
|
|
397
|
+ --without-rlm_protocol_filter \
|
|
398
|
+ --without-rlm_policy \
|
|
399
|
+ --without-rlm_linelog \
|
|
400
|
+ --without-rlm_jradius \
|
|
401
|
+ --without-rlm_fastusers \
|
|
402
|
+ --without-rlm_eap_leap \
|
|
403
|
+ --without-rlm_dynamic_clients \
|
|
404
|
+ --without-rlm_digest \
|
|
405
|
+ --without-rlm_cram \
|
|
406
|
+ --without-rlm_copy_packet \
|
|
407
|
+ --without-rlm_acct_unique \
|
|
408
|
+ --without-rlm_acctlog
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+PKG_DICTIONARIES:= \
|
|
412
|
+ freeradius freeradius.internal \
|
|
413
|
+ rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
|
|
414
|
+ rfc4372 rfc4675 rfc4679 \
|
|
415
|
+ microsoft \
|
|
416
|
+ wispr \
|
|
417
|
+
|
|
418
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-ldap),)
|
|
419
|
+ CONFIGURE_ARGS+= \
|
|
420
|
+ --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
|
|
421
|
+ --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
422
|
+ CONFIGURE_LIBS+= -lcrypto -lssl
|
|
423
|
+else
|
|
424
|
+ CONFIGURE_ARGS+= --without-rlm_ldap
|
|
425
|
+endif
|
|
426
|
+
|
|
427
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-mysql),)
|
|
428
|
+ CONFIGURE_ARGS+= \
|
|
429
|
+ --with-mysql-include-dir="$(STAGING_DIR)/usr/include" \
|
|
430
|
+ --with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql"
|
|
431
|
+ CONFIGURE_LIBS+= -lz
|
|
432
|
+ CONFIGURE_VARS+= ac_cv_lib_mysqlclient_r_mysql_init=yes
|
|
433
|
+else
|
|
434
|
+ CONFIGURE_ARGS+= --without-rlm_sql_mysql
|
|
435
|
+endif
|
|
436
|
+
|
|
437
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-pgsql),)
|
|
438
|
+ CONFIGURE_ARGS+= \
|
|
439
|
+ --with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
|
|
440
|
+ --with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
441
|
+else
|
|
442
|
+ CONFIGURE_ARGS+= --without-rlm_sql_postgresql
|
|
443
|
+endif
|
|
444
|
+
|
|
445
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sqllog),)
|
|
446
|
+ CONFIGURE_ARGS+= \
|
|
447
|
+ --with-rlm_sql_log \
|
|
448
|
+ --with-experimental-modules \
|
|
449
|
+else
|
|
450
|
+ CONFIGURE_ARGS+= --without-rlm_sql_log
|
|
451
|
+endif
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-sqlite),)
|
|
455
|
+ CONFIGURE_ARGS+= \
|
|
456
|
+ --with-rlm_sql_sqlite \
|
|
457
|
+ --with-experimental-modules \
|
|
458
|
+ --with-sqlite-include-dir="$(STAGING_DIR)/usr/include" \
|
|
459
|
+ --with-sqlite-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
460
|
+else
|
|
461
|
+ CONFIGURE_ARGS+= --without-rlm_sql_sqlite
|
|
462
|
+endif
|
|
463
|
+
|
|
464
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-peap),)
|
|
465
|
+ CONFIGURE_ARGS+= \
|
|
466
|
+ --with-rlm_eap_peap \
|
|
467
|
+ --with-rlm_eap_peap-include-dir="$(STAGING_DIR)/usr/include" \
|
|
468
|
+ --with-rlm_eap_peap-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
469
|
+ CONFIGURE_LIBS+= -lcrypto -lssl
|
|
470
|
+else
|
|
471
|
+ CONFIGURE_ARGS+= --without-rlm_eap_peap
|
|
472
|
+endif
|
|
473
|
+
|
|
474
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-tls),)
|
|
475
|
+ CONFIGURE_ARGS+= \
|
|
476
|
+ --with-rlm_eap_tls \
|
|
477
|
+ --with-rlm_eap_tls-include-dir="$(STAGING_DIR)/usr/include" \
|
|
478
|
+ --with-rlm_eap_tls-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
479
|
+ CONFIGURE_LIBS+= -lcrypto -lssl
|
|
480
|
+else
|
|
481
|
+ CONFIGURE_ARGS+= --without-rlm_eap_tls
|
|
482
|
+endif
|
|
483
|
+
|
|
484
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-ttls),)
|
|
485
|
+ CONFIGURE_ARGS+= \
|
|
486
|
+ --with-rlm_eap_ttls \
|
|
487
|
+ --with-rlm_eap_ttls-include-dir="$(STAGING_DIR)/usr/include" \
|
|
488
|
+ --with-rlm_eap_ttls-lib-dir="$(STAGING_DIR)/usr/lib"
|
|
489
|
+ CONFIGURE_LIBS+= -lcrypto -lssl
|
|
490
|
+else
|
|
491
|
+ CONFIGURE_ARGS+= --without-rlm_eap_ttls
|
|
492
|
+endif
|
|
493
|
+
|
|
494
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-attr-rewrite),)
|
|
495
|
+ CONFIGURE_ARGS+= --with-rlm_attr-rewrite
|
|
496
|
+else
|
|
497
|
+ CONFIGURE_ARGS+= --without-rlm_attr-rewrite
|
|
498
|
+endif
|
|
499
|
+
|
|
500
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-radutmp),)
|
|
501
|
+ CONFIGURE_ARGS+= --with-rlm_radutmp
|
|
502
|
+else
|
|
503
|
+ CONFIGURE_ARGS+= --without-rlm_radutmp
|
|
504
|
+endif
|
|
505
|
+
|
|
506
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-logintime),)
|
|
507
|
+ CONFIGURE_ARGS+= --with-rlm_logintime
|
|
508
|
+else
|
|
509
|
+ CONFIGURE_ARGS+= --without-rlm_logintime
|
|
510
|
+endif
|
|
511
|
+
|
|
512
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-expiration),)
|
|
513
|
+ CONFIGURE_ARGS+= --with-rlm_expiration
|
|
514
|
+else
|
|
515
|
+ CONFIGURE_ARGS+= --without-rlm_expiration
|
|
516
|
+endif
|
|
517
|
+
|
|
518
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-always),)
|
|
519
|
+ CONFIGURE_ARGS+= --with-rlm_always
|
|
520
|
+else
|
|
521
|
+ CONFIGURE_ARGS+= --without-rlm_always
|
|
522
|
+endif
|
|
523
|
+
|
|
524
|
+CONFIGURE_VARS+= \
|
|
525
|
+ LDFLAGS="$$$$LDFLAGS" \
|
|
526
|
+ LIBS="$(CONFIGURE_LIBS)" \
|
|
527
|
+ MYSQL_CONFIG="no" \
|
|
528
|
+ ac_cv_lib_readline=no \
|
|
529
|
+
|
|
530
|
+define Build/Compile
|
|
531
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
532
|
+ R="$(PKG_INSTALL_DIR)" \
|
|
533
|
+ INSTALLSTRIP="" \
|
|
534
|
+ all certs install
|
|
535
|
+endef
|
|
536
|
+
|
|
537
|
+define Package/freeradius2-common/install
|
|
538
|
+ $(INSTALL_DIR) $(1)/etc/freeradius2
|
|
539
|
+ chmod 771 $(1)/etc/freeradius2
|
|
540
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/dictionary $(1)/etc/freeradius2/ ; \
|
|
541
|
+ $(INSTALL_DIR) $(1)/usr/lib/freeradius2
|
|
542
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-radius{,-*}.so $(1)/usr/lib/freeradius2
|
|
543
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-eap{,-*}.so $(1)/usr/lib/freeradius2
|
|
544
|
+ $(INSTALL_DIR) $(1)/usr/share/freeradius2
|
|
545
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius2/
|
|
546
|
+ $(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius2/dictionary
|
|
547
|
+ for f in $(PKG_DICTIONARIES); do \
|
|
548
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$$$${f} $(1)/usr/share/freeradius2/ ; \
|
|
549
|
+ $(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr/share/freeradius2/dictionary ; \
|
|
550
|
+ done
|
|
551
|
+endef
|
|
552
|
+
|
|
553
|
+define Package/freeradius2/install
|
|
554
|
+ $(INSTALL_DIR) $(1)/etc/freeradius2/modules
|
|
555
|
+ $(INSTALL_DIR) $(1)/etc/freeradius2/sites
|
|
556
|
+ for f in clients.conf radiusd.conf policy.conf; do \
|
|
557
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$${f} $(1)/etc/freeradius2/ ; \
|
|
558
|
+ done
|
|
559
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/sites-available/default $(1)/etc/freeradius2/sites/default
|
|
560
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
561
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
|
|
562
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
563
|
+ $(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd
|
|
564
|
+endef
|
|
565
|
+
|
|
566
|
+define Package/freeradius2-democerts/install
|
|
567
|
+ $(INSTALL_DIR) $(1)/etc/freeradius2/certs
|
|
568
|
+ $(CP) \
|
|
569
|
+ $(PKG_BUILD_DIR)/raddb/certs/ca.pem \
|
|
570
|
+ $(PKG_BUILD_DIR)/raddb/certs/dh \
|
|
571
|
+ $(PKG_BUILD_DIR)/raddb/certs/random \
|
|
572
|
+ $(PKG_BUILD_DIR)/raddb/certs/server.pem \
|
|
573
|
+ $(1)/etc/freeradius2/certs/
|
|
574
|
+endef
|
|
575
|
+
|
|
576
|
+define Package/freeradius2-utils/install
|
|
577
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
578
|
+ for f in radclient radeapclient radwho; do \
|
|
579
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \
|
|
580
|
+ done
|
|
581
|
+endef
|
|
582
|
+
|
|
583
|
+define BuildPlugin
|
|
584
|
+ define Package/$(1)/install
|
|
585
|
+ [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/freeradius2
|
|
586
|
+ for m in $(2); do \
|
|
587
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/$$$$$$$${m}{,-*}.so $$(1)/usr/lib/freeradius2 ; \
|
|
588
|
+ done
|
|
589
|
+ [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2
|
|
590
|
+ [ -z "$(4)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2/$(4)
|
|
591
|
+ for f in $(3); do \
|
|
592
|
+ $(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$$$$$${f} $$(1)/etc/freeradius2/$$$$$$$${f} ; \
|
|
593
|
+ done
|
|
594
|
+ endef
|
|
595
|
+
|
|
596
|
+ $$(eval $$(call BuildPackage,$(1)))
|
|
597
|
+endef
|
|
598
|
+
|
|
599
|
+$(eval $(call BuildPackage,freeradius2))
|
|
600
|
+$(eval $(call BuildPackage,freeradius2-common))
|
|
601
|
+$(eval $(call BuildPackage,freeradius2-democerts))
|
|
602
|
+$(eval $(call BuildPlugin,freeradius2-mod-chap,rlm_chap,modules/chap,modules,))
|
|
603
|
+$(eval $(call BuildPlugin,freeradius2-mod-detail,rlm_detail,modules/detail,modules,))
|
|
604
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap,rlm_eap,eap.conf))
|
|
605
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-gtc,rlm_eap_gtc,))
|
|
606
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-md5,rlm_eap_md5,))
|
|
607
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-mschapv2,rlm_eap_mschapv2,))
|
|
608
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-peap,rlm_eap_peap,))
|
|
609
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-tls,rlm_eap_tls,))
|
|
610
|
+$(eval $(call BuildPlugin,freeradius2-mod-eap-ttls,rlm_eap_ttls,))
|
|
611
|
+$(eval $(call BuildPlugin,freeradius2-mod-exec,rlm_exec,modules/exec modules/echo ,modules,))
|
|
612
|
+$(eval $(call BuildPlugin,freeradius2-mod-attr-rewrite,rlm_attr_rewrite,modules/attr_rewrite,modules,))
|
|
613
|
+$(eval $(call BuildPlugin,freeradius2-mod-files,rlm_files,acct_users preproxy_users users modules/files,modules,))
|
|
614
|
+$(eval $(call BuildPlugin,freeradius2-mod-passwd,rlm_passwd,modules/passwd,modules,))
|
|
615
|
+$(eval $(call BuildPlugin,freeradius2-mod-ldap,rlm_ldap,ldap.attrmap modules/ldap,modules,))
|
|
616
|
+$(eval $(call BuildPlugin,freeradius2-mod-mschap,rlm_mschap,modules/mschap,modules,))
|
|
617
|
+$(eval $(call BuildPlugin,freeradius2-mod-pap,rlm_pap,modules/pap,modules,))
|
|
618
|
+$(eval $(call BuildPlugin,freeradius2-mod-preprocess,rlm_preprocess,hints huntgroups modules/preprocess,modules,))
|
|
619
|
+$(eval $(call BuildPlugin,freeradius2-mod-realm,rlm_realm,proxy.conf modules/realm modules/inner-eap,modules,))
|
|
620
|
+$(eval $(call BuildPlugin,freeradius2-mod-sql,rlm_sql,sql.conf,))
|
|
621
|
+$(eval $(call BuildPlugin,freeradius2-mod-sql-mysql,rlm_sql_mysql,))
|
|
622
|
+$(eval $(call BuildPlugin,freeradius2-mod-sql-pgsql,rlm_sql_postgresql,))
|
|
623
|
+$(eval $(call BuildPlugin,freeradius2-mod-sql-sqlite,rlm_sql_sqlite,))
|
|
624
|
+$(eval $(call BuildPlugin,freeradius2-mod-sqlcounter,rlm_sqlcounter,))
|
|
625
|
+$(eval $(call BuildPlugin,freeradius2-mod-sqllog,rlm_sql_log,))
|
|
626
|
+$(eval $(call BuildPlugin,freeradius2-mod-radutmp,rlm_radutmp,modules/radutmp modules/sradutmp,modules,))
|
|
627
|
+$(eval $(call BuildPlugin,freeradius2-mod-logintime,rlm_logintime,modules/logintime,modules,))
|
|
628
|
+$(eval $(call BuildPlugin,freeradius2-mod-expr,rlm_expr,modules/expr,modules,))
|
|
629
|
+$(eval $(call BuildPlugin,freeradius2-mod-attr-filter,rlm_attr_filter,modules/attr_filter attrs attrs.access_reject attrs.accounting_response attrs.pre-proxy,modules,,))
|
|
630
|
+$(eval $(call BuildPlugin,freeradius2-mod-expiration,rlm_expiration,modules/expiration,modules,))
|
|
631
|
+$(eval $(call BuildPlugin,freeradius2-mod-always,rlm_always,modules/always,modules,))
|
|
632
|
+$(eval $(call BuildPackage,freeradius2-utils))
|