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.

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