You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

621 lines
18 KiB

  1. #
  2. # Copyright (C) 2008-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=freeradius3
  9. PKG_VERSION:=release_3_0_17
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
  13. PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
  14. PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYRIGHT LICENSE
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
  18. PKG_FIXUP:=autoreconf
  19. PKG_CONFIG_DEPENDS := \
  20. FREERADIUS3_OPENSSL \
  21. FREERADIUS3_NOSSL
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/freeradius3/config
  24. source "$(SOURCE)/Config.in"
  25. endef
  26. define Package/freeradius3/Default
  27. SECTION:=net
  28. CATEGORY:=Network
  29. URL:=http://freeradius.org/
  30. SUBMENU:=FreeRADIUS (version 3)
  31. endef
  32. define Package/freeradius3
  33. $(call Package/freeradius3/Default)
  34. DEPENDS:=+freeradius3-common
  35. TITLE:=A flexible RADIUS server (version 3)
  36. endef
  37. define Package/freeradius3/conffiles
  38. /etc/freeradius3/clients.conf
  39. /etc/freeradius3/radiusd.conf
  40. /etc/freeradius3/sites/default
  41. endef
  42. define Package/freeradius3-common
  43. $(call Package/freeradius3/Default)
  44. TITLE:=common files
  45. DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc
  46. endef
  47. define Package/freeradius3-default
  48. $(call Package/freeradius3/Default)
  49. DEPENDS:=freeradius3 \
  50. +freeradius3-democerts \
  51. +freeradius3-mod-always \
  52. +freeradius3-mod-attr-filter \
  53. +freeradius3-mod-chap \
  54. +freeradius3-mod-detail \
  55. +freeradius3-mod-digest \
  56. +freeradius3-mod-eap \
  57. +freeradius3-mod-eap-gtc \
  58. +freeradius3-mod-eap-leap \
  59. +freeradius3-mod-eap-md5 \
  60. +freeradius3-mod-eap-mschapv2 \
  61. +freeradius3-mod-eap-peap \
  62. +freeradius3-mod-eap-tls \
  63. +freeradius3-mod-eap-ttls \
  64. +freeradius3-mod-exec \
  65. +freeradius3-mod-expiration \
  66. +freeradius3-mod-expr \
  67. +freeradius3-mod-files \
  68. +freeradius3-mod-logintime \
  69. +freeradius3-mod-mschap \
  70. +freeradius3-mod-pap \
  71. +freeradius3-mod-preprocess \
  72. +freeradius3-mod-radutmp \
  73. +freeradius3-mod-realm \
  74. +freeradius3-mod-unix
  75. TITLE:=Modules needed for Radius default configuration
  76. endef
  77. define Package/freeradius3-democerts
  78. $(call Package/freeradius3/Default)
  79. DEPENDS:=freeradius3
  80. TITLE:=Demo certificates to test the server
  81. endef
  82. define Package/freeradius3-mod-chap
  83. $(call Package/freeradius3/Default)
  84. DEPENDS:=freeradius3
  85. TITLE:=CHAP module
  86. endef
  87. define Package/freeradius3-mod-chap/conffiles
  88. /etc/freeradius3/mods-available/chap
  89. /etc/freeradius3/mods-enabled/chap
  90. endef
  91. define Package/freeradius3-mod-detail
  92. $(call Package/freeradius3/Default)
  93. DEPENDS:=freeradius3
  94. TITLE:=Detailed accounting module
  95. endef
  96. define Package/freeradius3-mod-detail/conffiles
  97. /etc/freeradius3/mods-available/detail
  98. /etc/freeradius3/mods-enabled/detail
  99. endef
  100. define Package/freeradius3-mod-digest
  101. $(call Package/freeradius3/Default)
  102. DEPENDS:=freeradius3
  103. TITLE:=HTTP Digest Authentication
  104. endef
  105. define Package/freeradius3-mod-digest/conffiles
  106. /etc/freeradius3/mods-available/digest
  107. /etc/freeradius3/mods-enabled/digest
  108. endef
  109. define Package/freeradius3-mod-eap
  110. $(call Package/freeradius3/Default)
  111. DEPENDS:=freeradius3
  112. TITLE:=Base EAP module
  113. endef
  114. define Package/freeradius3-mod-eap/conffiles
  115. /etc/freeradius3/mods-available/eap
  116. /etc/freeradius3/mods-enabled/eap
  117. /etc/freeradius3/policy.d/eap
  118. /etc/freeradius3/sites-enabled/inner-tunnel
  119. /etc/freeradius3/sites-available/inner-tunnel
  120. endef
  121. define Package/freeradius3-mod-eap-gtc
  122. $(call Package/freeradius3/Default)
  123. DEPENDS:=freeradius3-mod-eap
  124. TITLE:=EAP/GTC module
  125. endef
  126. define Package/freeradius3-mod-eap-leap
  127. $(call Package/freeradius3/Default)
  128. DEPENDS:=freeradius3-mod-eap
  129. TITLE:=EAP/LEAP module
  130. endef
  131. define Package/freeradius3-mod-eap-md5
  132. $(call Package/freeradius3/Default)
  133. DEPENDS:=freeradius3-mod-eap
  134. TITLE:=EAP/MD5 module
  135. endef
  136. define Package/freeradius3-mod-eap-mschapv2
  137. $(call Package/freeradius3/Default)
  138. DEPENDS:=freeradius3-mod-eap +freeradius3-mod-mschap
  139. TITLE:=EAP/MS-CHAPv2 module
  140. endef
  141. define Package/freeradius3-mod-eap-peap
  142. $(call Package/freeradius3/Default)
  143. DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL
  144. TITLE:=EAP/PEAP module
  145. endef
  146. define Package/freeradius3-mod-eap-tls
  147. $(call Package/freeradius3/Default)
  148. DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL
  149. TITLE:=EAP/TLS module
  150. endef
  151. define Package/freeradius3-mod-eap-ttls
  152. $(call Package/freeradius3/Default)
  153. DEPENDS:=freeradius3-mod-eap-tls
  154. TITLE:=EAP/TTLS module
  155. endef
  156. define Package/freeradius3-mod-exec
  157. $(call Package/freeradius3/Default)
  158. DEPENDS:=freeradius3
  159. TITLE:=EXEC module
  160. endef
  161. define Package/freeradius3-mod-exec/conffiles
  162. /etc/freeradius3/mods-available/exec
  163. /etc/freeradius3/mods-enabled/exec
  164. endef
  165. define Package/freeradius3-mod-expiration
  166. $(call Package/freeradius3/Default)
  167. DEPENDS:=freeradius3
  168. TITLE:=Expiration module
  169. endef
  170. define Package/freeradius3-mod-expiration/conffiles
  171. /etc/freeradius3/mods-available/expiration
  172. /etc/freeradius3/mods-enabled/expiration
  173. endef
  174. define Package/freeradius3-mod-always
  175. $(call Package/freeradius3/Default)
  176. DEPENDS:=freeradius3
  177. TITLE:=Always module
  178. endef
  179. define Package/freeradius3-mod-always/conffiles
  180. /etc/freeradius3/mods-available/always
  181. /etc/freeradius3/mods-enabled/always
  182. endef
  183. define Package/freeradius3-mod-expr
  184. $(call Package/freeradius3/Default)
  185. DEPENDS:=freeradius3
  186. TITLE:=EXPR module
  187. endef
  188. define Package/freeradius3-mod-expr/conffiles
  189. /etc/freeradius3/mods-available/expr
  190. /etc/freeradius3/mods-enabled/expr
  191. endef
  192. define Package/freeradius3-mod-attr-filter
  193. $(call Package/freeradius3/Default)
  194. DEPENDS:=freeradius3
  195. TITLE:=ATTR filter module
  196. endef
  197. define Package/freeradius3-mod-attr-filter/conffiles
  198. /etc/freeradius3/mods-available/attr_filter
  199. /etc/freeradius3/mods-enabled/attr_filter
  200. /etc/freeradius3/mods-config/attr_filter/access_challenge
  201. /etc/freeradius3/mods-config/attr_filter/access_reject
  202. /etc/freeradius3/mods-config/attr_filter/accounting_response
  203. /etc/freeradius3/mods-config/attr_filter/post-proxy
  204. /etc/freeradius3/mods-config/attr_filter/pre-proxy
  205. endef
  206. define Package/freeradius3-mod-attr-rewrite
  207. $(call Package/freeradius3/Default)
  208. DEPENDS:=freeradius3
  209. TITLE:=ATTR rewrite module
  210. endef
  211. define Package/freeradius3-mod-files
  212. $(call Package/freeradius3/Default)
  213. DEPENDS:=freeradius3
  214. TITLE:=Module using local files for authorization
  215. endef
  216. define Package/freeradius3-mod-files/conffiles
  217. /etc/freeradius3/mods-available/files
  218. /etc/freeradius3/mods-enabled/files
  219. /etc/freeradius3/mods-config/files/accounting
  220. /etc/freeradius3/mods-config/files/authorize
  221. /etc/freeradius3/mods-config/files/pre-proxy
  222. endef
  223. define Package/freeradius3-mod-passwd
  224. $(call Package/freeradius3/Default)
  225. DEPENDS:=freeradius3
  226. TITLE:=Rlm passwd module
  227. endef
  228. define Package/freeradius3-mod-passwd/conffiles
  229. /etc/freeradius3/mods-available/passwd
  230. /etc/freeradius3/mods-enabled/passwd
  231. endef
  232. define Package/freeradius3-mod-ldap
  233. $(call Package/freeradius3/Default)
  234. DEPENDS:=freeradius3 +libopenldap @FREERADIUS3_OPENSSL
  235. TITLE:=LDAP Authentication
  236. endef
  237. define Package/freeradius3-mod-ldap/conffiles
  238. /etc/freeradius3/mods-available/ldap
  239. endef
  240. define Package/freeradius3-mod-logintime
  241. $(call Package/freeradius3/Default)
  242. DEPENDS:=freeradius3
  243. TITLE:=Logintime module
  244. endef
  245. define Package/freeradius3-mod-logintime/conffiles
  246. /etc/freeradius3/mods-available/logintime
  247. /etc/freeradius3/mods-enabled/logintime
  248. endef
  249. define Package/freeradius3-mod-mschap
  250. $(call Package/freeradius3/Default)
  251. DEPENDS:=freeradius3
  252. TITLE:=MS-CHAP and MS-CHAPv2 module
  253. endef
  254. define Package/freeradius3-mod-mschap/conffiles
  255. /etc/freeradius3/mods-available/mschap
  256. /etc/freeradius3/mods-enabled/mschap
  257. endef
  258. define Package/freeradius3-mod-pap
  259. $(call Package/freeradius3/Default)
  260. DEPENDS:=freeradius3
  261. TITLE:=PAP module
  262. endef
  263. define Package/freeradius3-mod-pap/conffiles
  264. /etc/freeradius3/mods-available/pap
  265. /etc/freeradius3/mods-enabled/pap
  266. endef
  267. define Package/freeradius3-mod-preprocess
  268. $(call Package/freeradius3/Default)
  269. DEPENDS:=freeradius3
  270. TITLE:=Request pre-processing module
  271. endef
  272. define Package/freeradius3-mod-preprocess/conffiles
  273. /etc/freeradius3/mods-config/preprocess/hints
  274. /etc/freeradius3/mods-config/preprocess/huntgroups
  275. /etc/freeradius3/mods-available/preprocess
  276. /etc/freeradius3/mods-enabled/preprocess
  277. endef
  278. define Package/freeradius3-mod-realm
  279. $(call Package/freeradius3/Default)
  280. DEPENDS:=freeradius3
  281. TITLE:=Realms handling module
  282. endef
  283. define Package/freeradius3-mod-realm/conffiles
  284. /etc/freeradius3/proxy.conf
  285. /etc/freeradius3/mods-available/realm
  286. /etc/freeradius3/mods-enabled/realm
  287. endef
  288. # SQL support has not been ported
  289. define Package/freeradius3-mod-radutmp
  290. $(call Package/freeradius3/Default)
  291. DEPENDS:=freeradius3
  292. TITLE:=Radius UTMP module
  293. endef
  294. define Package/freeradius3-mod-radutmp/conffiles
  295. /etc/freeradius3/mods-available/radutmp
  296. /etc/freeradius3/mods-enabled/radutmp
  297. /etc/freeradius3/mods-available/sradutmp
  298. /etc/freeradius3/mods-enabled/sradutmp
  299. endef
  300. define Package/freeradius3-mod-unix
  301. $(call Package/freeradius3/Default)
  302. DEPENDS:=freeradius3
  303. TITLE:=System Authentication
  304. endef
  305. define Package/freeradius3-mod-unix/conffiles
  306. /etc/freeradius3/mods-available/unix
  307. /etc/freeradius3/mods-enabled/unix
  308. endef
  309. define Package/freeradius3-utils
  310. $(call Package/freeradius3/Default)
  311. DEPENDS:=+freeradius3-common
  312. TITLE:=Misc. client utilities
  313. endef
  314. CONFIGURE_ARGS+= \
  315. --libdir=/usr/lib/freeradius3 \
  316. --libexecdir=/usr/lib/freeradius3 \
  317. --disable-developer \
  318. --with-threads \
  319. $(if $(CONFIG_FREERADIUS3_OPENSSL),--with,--without)-openssl \
  320. $(if $(CONFIG_FREERADIUS3_OPENSSL),--with-openssl-includes="$(STAGING_DIR)/usr/include",) \
  321. $(if $(CONFIG_FREERADIUS3_OPENSSL),--with-openssl-libraries="$(STAGING_DIR)/usr/lib",) \
  322. $(if $(CONFIG_FREERADIUS3_OPENSSL),--disable-openssl-version-check,) \
  323. --with-talloc-include-dir="$(STAGING_DIR)/usr/include" \
  324. --with-talloc-lib-dir="$(STAGING_DIR)/usr/lib" \
  325. --enable-strict-dependencies \
  326. --with-dictdir=/usr/share/freeradius3 \
  327. --with-raddbdir=/etc/freeradius3 \
  328. --with-radacctdir=/var/db/radacct \
  329. --with-logdir=/var/log \
  330. --without-edir \
  331. --without-snmp \
  332. --without-rlm_cache \
  333. --without-rlm_cache_memcached \
  334. --without-rlm_couchbase \
  335. --without-rlm_counter \
  336. --without-rlm_eap_ikev2 \
  337. --without-rlm_eap_pwd \
  338. --without-rlm_eap_sim \
  339. --without-rlm_eap_tnc \
  340. --without-rlm_example \
  341. --without-rlm_idn \
  342. --without-rlm_ippool \
  343. --without-rlm_krb5 \
  344. --without-rlm_opendirectory \
  345. --without-rlm_pam \
  346. --without-rlm_perl \
  347. --without-rlm_python \
  348. --without-rlm_redis \
  349. --without-rlm_rediswho \
  350. --without-rlm_rest \
  351. --without-rlm_ruby \
  352. --without-rlm_securid \
  353. --without-rlm_smsotp \
  354. --without-rlm_sql \
  355. --without-rlm_sql_db2 \
  356. --without-rlm_sql_firebird \
  357. --without-rlm_sql_freetds \
  358. --without-rlm_sql_iodbc \
  359. --without-rlm_sql_mysql \
  360. --without-rlm_sql_oracle \
  361. --without-rlm_sql_postgresql \
  362. --without-rlm_sql_sqlite \
  363. --without-rlm_sql_unixodbc \
  364. --without-rlm_sqlcounter \
  365. --without-rlm_sqlhpwippool \
  366. --without-rlm_sqlippool \
  367. --without-rlm_unbound \
  368. --without-rlm_yubikey \
  369. PKG_DICTIONARIES:= \
  370. compat \
  371. freeradius freeradius.internal \
  372. rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
  373. rfc4372 rfc4675 rfc4679 rfc5580\
  374. microsoft \
  375. wispr \
  376. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-peap),)
  377. CONFIGURE_ARGS+= \
  378. --with-rlm_eap_peap \
  379. --with-rlm_eap_peap-include-dir="$(STAGING_DIR)/usr/include" \
  380. --with-rlm_eap_peap-lib-dir="$(STAGING_DIR)/usr/lib"
  381. CONFIGURE_LIBS+= -lcrypto -lssl
  382. else
  383. CONFIGURE_ARGS+= --without-rlm_eap_peap
  384. endif
  385. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-tls),)
  386. CONFIGURE_ARGS+= \
  387. --with-rlm_eap_tls \
  388. --with-rlm_eap_tls-include-dir="$(STAGING_DIR)/usr/include" \
  389. --with-rlm_eap_tls-lib-dir="$(STAGING_DIR)/usr/lib"
  390. CONFIGURE_LIBS+= -lcrypto -lssl
  391. else
  392. CONFIGURE_ARGS+= --without-rlm_eap_tls
  393. endif
  394. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-ttls),)
  395. CONFIGURE_ARGS+= \
  396. --with-rlm_eap_ttls \
  397. --with-rlm_eap_ttls-include-dir="$(STAGING_DIR)/usr/include" \
  398. --with-rlm_eap_ttls-lib-dir="$(STAGING_DIR)/usr/lib"
  399. CONFIGURE_LIBS+= -lcrypto -lssl
  400. else
  401. CONFIGURE_ARGS+= --without-rlm_eap_ttls
  402. endif
  403. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),)
  404. CONFIGURE_ARGS+= --with-rlm_radutmp
  405. else
  406. CONFIGURE_ARGS+= --without-rlm_radutmp
  407. endif
  408. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-unix),)
  409. CONFIGURE_ARGS+= --with-rlm_unix
  410. else
  411. CONFIGURE_ARGS+= --without-rlm_unix
  412. endif
  413. ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-ldap),)
  414. CONFIGURE_ARGS+= --with-rlm_ldap \
  415. --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
  416. --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
  417. else
  418. CONFIGURE_ARGS+= --without-rlm_ldap
  419. endif
  420. ifeq ($(CONFIG_USE_GLIBC),y)
  421. TARGET_CFLAGS+= -DLIBBSD_OVERLAY -I$(STAGING_DIR)/usr/include/bsd \
  422. -D_RPC_NETDB_H
  423. #^^^^^^^^^^^^^ avoid inclusion of librpc's netdb.h
  424. CONFIGURE_LIBS+= -Wl,--push-state,--as-needed -lbsd -Wl,--pop-state
  425. endif
  426. CONFIGURE_VARS+= \
  427. LDFLAGS="$$$$LDFLAGS" \
  428. LIBS="$(CONFIGURE_LIBS)" \
  429. MYSQL_CONFIG="no" \
  430. ac_cv_lib_readline=no \
  431. ax_cv_cc_builtin_choose_expr=yes \
  432. ax_cv_cc_builtin_types_compatible_p=yes ax_cv_cc_builtin_bswap64=yes \
  433. ax_cv_cc_bounded_attribute=no \
  434. ac_cv_lib_collectdclient_lcc_connect=no \
  435. ac_cv_lib_execinfo_backtrace_symbols=no
  436. define Build/Compile
  437. # Compile jlibtool for the host once the configuration is done
  438. (cd $(PKG_BUILD_DIR); \
  439. mkdir -p build/make; \
  440. $(HOSTCC) $(HOST_CFLAGS) scripts/jlibtool.c -o build/make/jlibtool; \
  441. )
  442. $(MAKE) -C $(PKG_BUILD_DIR) \
  443. R="$(PKG_INSTALL_DIR)" \
  444. INSTALLSTRIP="" \
  445. all install
  446. endef
  447. define Package/freeradius3-common/install
  448. $(INSTALL_DIR) $(1)/etc/freeradius3
  449. chmod 771 $(1)/etc/freeradius3
  450. $(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/dictionary $(1)/etc/freeradius3/ ; \
  451. $(INSTALL_DIR) $(1)/usr/lib/freeradius3
  452. $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/libfreeradius-{dhcp,eap,radius,server}.so $(1)/usr/lib/freeradius3
  453. $(INSTALL_DIR) $(1)/usr/share/freeradius3
  454. $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius3/dictionary $(1)/usr/share/freeradius3/
  455. $(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius3/dictionary
  456. for f in $(PKG_DICTIONARIES); do \
  457. $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius3/dictionary.$$$${f} $(1)/usr/share/freeradius3/ ; \
  458. $(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\)$$$$,\1,g" $(1)/usr/share/freeradius3/dictionary ; \
  459. done
  460. endef
  461. define Package/freeradius3/install
  462. $(INSTALL_DIR) $(1)/etc/freeradius3
  463. $(INSTALL_DIR) $(1)/etc/freeradius3/policy.d
  464. $(INSTALL_DIR) $(1)/etc/freeradius3/sites-available
  465. $(INSTALL_DIR) $(1)/etc/freeradius3/sites-enabled
  466. for f in clients.conf radiusd.conf proxy.conf; do \
  467. $(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/$$$${f} $(1)/etc/freeradius3/ ; \
  468. done
  469. for f in accounting filter; do \
  470. $(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/policy.d/$$$${f} $(1)/etc/freeradius3/policy.d/ ; \
  471. done
  472. for f in default; do \
  473. $(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/sites-available/$$$${f} $(1)/etc/freeradius3/sites-available/ ; \
  474. $(CP) $(PKG_INSTALL_DIR)/etc/freeradius3/sites-enabled/$$$${f} $(1)/etc/freeradius3/sites-enabled/ ; \
  475. done
  476. $(INSTALL_DIR) $(1)/usr/sbin
  477. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
  478. $(INSTALL_DIR) $(1)/etc/init.d
  479. $(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd
  480. endef
  481. define Package/freeradius3-democerts/install
  482. $(INSTALL_DIR) $(1)/etc/freeradius3/certs
  483. $(CP) \
  484. $(PKG_INSTALL_DIR)/etc/freeradius3/certs/ca.pem \
  485. $(PKG_INSTALL_DIR)/etc/freeradius3/certs/dh \
  486. $(PKG_INSTALL_DIR)/etc/freeradius3/certs/server.pem \
  487. $(1)/etc/freeradius3/certs/
  488. endef
  489. define Package/freeradius3-utils/install
  490. $(INSTALL_DIR) $(1)/usr/bin
  491. for f in radclient radeapclient radwho; do \
  492. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \
  493. done
  494. endef
  495. define BuildPlugin
  496. define Package/$(1)/install
  497. [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/freeradius3
  498. for m in $(2); do \
  499. $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius3/$$$$$$$${m}.so $$(1)/usr/lib/freeradius3 ; \
  500. done
  501. # Install configuration files
  502. for f in $(strip $(call Package/$(1)/conffiles)); do \
  503. $(INSTALL_DIR) $$(1)/$$$$$$$${f%/*} ; \
  504. $(CP) $(PKG_INSTALL_DIR)/$$$$$$$${f} $$(1)/$$$$$$$${f}; \
  505. done
  506. endef
  507. $$(eval $$(call BuildPackage,$(1)))
  508. endef
  509. $(eval $(call BuildPackage,freeradius3))
  510. $(eval $(call BuildPackage,freeradius3-common))
  511. $(eval $(call BuildPackage,freeradius3-default))
  512. $(eval $(call BuildPackage,freeradius3-democerts))
  513. $(eval $(call BuildPlugin,freeradius3-mod-always,rlm_always,))
  514. $(eval $(call BuildPlugin,freeradius3-mod-attr-filter,rlm_attr_filter,))
  515. $(eval $(call BuildPlugin,freeradius3-mod-chap,rlm_chap,))
  516. $(eval $(call BuildPlugin,freeradius3-mod-detail,rlm_detail,))
  517. $(eval $(call BuildPlugin,freeradius3-mod-digest,rlm_digest,))
  518. $(eval $(call BuildPlugin,freeradius3-mod-eap-gtc,rlm_eap_gtc,))
  519. $(eval $(call BuildPlugin,freeradius3-mod-eap-leap,rlm_eap_leap,))
  520. $(eval $(call BuildPlugin,freeradius3-mod-eap-md5,rlm_eap_md5,))
  521. $(eval $(call BuildPlugin,freeradius3-mod-eap-mschapv2,rlm_eap_mschapv2,))
  522. $(eval $(call BuildPlugin,freeradius3-mod-eap-peap,rlm_eap_peap,))
  523. $(eval $(call BuildPlugin,freeradius3-mod-eap,rlm_eap,))
  524. $(eval $(call BuildPlugin,freeradius3-mod-eap-tls,rlm_eap_tls,))
  525. $(eval $(call BuildPlugin,freeradius3-mod-eap-ttls,rlm_eap_ttls,))
  526. $(eval $(call BuildPlugin,freeradius3-mod-exec,rlm_exec,))
  527. $(eval $(call BuildPlugin,freeradius3-mod-expiration,rlm_expiration,))
  528. $(eval $(call BuildPlugin,freeradius3-mod-expr,rlm_expr,))
  529. $(eval $(call BuildPlugin,freeradius3-mod-files,rlm_files,))
  530. $(eval $(call BuildPlugin,freeradius3-mod-ldap,rlm_ldap,))
  531. $(eval $(call BuildPlugin,freeradius3-mod-logintime,rlm_logintime,))
  532. $(eval $(call BuildPlugin,freeradius3-mod-mschap,rlm_mschap,))
  533. $(eval $(call BuildPlugin,freeradius3-mod-pap,rlm_pap,))
  534. $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
  535. $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
  536. $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
  537. $(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
  538. $(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
  539. $(eval $(call BuildPackage,freeradius3-utils))