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.

633 lines
18 KiB

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