No Description

Makefile 18KB

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