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.

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