Makefile 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= freeradius-server
  5. PKG_VERSION:= 2.1.6
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 078f7d29b4d2d34f7c992abf772c28a0
  8. PKG_DESCR:= a flexible RADIUS server
  9. PKG_SECTION:= net
  10. PKG_DEPENDS:= libltdl libopenssl libpthread
  11. PKG_URL:= http://www.freeradius.org
  12. PKG_SITES:= ftp://ftp.freeradius.org/pub/radius/ \
  13. http://freeradius.portal-to-web.de/ \
  14. ftp://ftp.uk.freeradius.org/pub/radius/
  15. PKG_CONFIGURE_OPTIONS:=
  16. ifneq (${ADK_PACKAGE_FREERADIUS_MOD_LDAP},)
  17. PKG_CONFIGURE_LIBS+= -lcrypto -lssl
  18. PKG_CONFIGURE_OPTIONS+= \
  19. --with-rlm_ldap-include-dir="${STAGING_DIR}/usr/include" \
  20. --with-rlm_ldap-lib-dir="${STAGING_DIR}/usr/lib"
  21. else
  22. PKG_CONFIGURE_OPTIONS+= --without-rlm_ldap
  23. endif
  24. ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_MYSQL},)
  25. PKG_CONFIGURE_LIBS+= -lz
  26. PKG_CONFIGURE_OPTIONS+= \
  27. --with-mysql-include-dir="${STAGING_DIR}/usr/include" \
  28. --with-mysql-lib-dir="${STAGING_DIR}/usr/lib/mysql" \
  29. --without-threads \
  30. --with-rlm_sql
  31. else
  32. PKG_CONFIGURE_OPTIONS+= --without-rlm_sql_mysql
  33. endif
  34. ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_PGSQL},)
  35. PKG_CONFIGURE_OPTIONS+= \
  36. --with-rlm_sql_postgresql-include-dir="${STAGING_DIR}/usr/include" \
  37. --with-rlm_sql_postgresql-lib-dir="${STAGING_DIR}/usr/lib" \
  38. --with-rlm_sql
  39. else
  40. PKG_CONFIGURE_OPTIONS+= --without-rlm_sql_postgresql
  41. endif
  42. include ${TOPDIR}/mk/package.mk
  43. define PKG_mod_template
  44. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  45. ${2}-install:
  46. ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/freeradius
  47. for m in ${2}; do \
  48. ${CP} ${WRKINST}/usr/lib/freeradius/$$$${m}{,-*}.so \
  49. $${IDIR_${1}}/usr/lib/freeradius/ ; \
  50. done
  51. ${INSTALL_DIR} $${IDIR_${1}}/etc/freeradius
  52. for f in ${3}; do \
  53. ${CP} ${WRKINST}/etc/freeradius/$$$${f} \
  54. $${IDIR_${1}}/etc/freeradius/ ; \
  55. done
  56. endef
  57. $(eval $(call PKG_template,FREERADIUS_SERVER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  58. $(eval $(call PKG_template,FREERADIUS_DEMOCERTS,freeradius-democerts,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  59. $(eval $(call PKG_template,FREERADIUS_MOD_CHAP,freeradius-mod-chap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  60. $(eval $(call PKG_template,FREERADIUS_MOD_DETAIL,freeradius-mod-detail,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  61. $(eval $(call PKG_template,FREERADIUS_MOD_DIGEST,freeradius-mod-digest,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  62. $(eval $(call PKG_template,FREERADIUS_MOD_FILES,freeradius-mod-files,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  63. $(eval $(call PKG_template,FREERADIUS_MOD_LDAP,freeradius-mod-ldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  64. $(eval $(call PKG_template,FREERADIUS_MOD_MSCHAP,freeradius-mod-mschap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  65. $(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  66. $(eval $(call PKG_template,FREERADIUS_MOD_PREPROCESS,freeradius-mod-preprocess,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  67. $(eval $(call PKG_template,FREERADIUS_MOD_REALM,freeradius-mod-realm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  68. $(eval $(call PKG_template,FREERADIUS_MOD_SQL,freeradius-mod-sql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  69. $(eval $(call PKG_template,FREERADIUS_MOD_SQL_MYSQL,freeradius-mod-sql-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  70. $(eval $(call PKG_template,FREERADIUS_MOD_SQL_PGSQL,freeradius-mod-sql-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  71. $(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  72. $(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
  73. $(eval $(call PKG_mod_template,FREERADIUS_MOD_DETAIL,rlm_detail,))
  74. $(eval $(call PKG_mod_template,FREERADIUS_MOD_DIGEST,rlm_digest,))
  75. $(eval $(call PKG_mod_template,FREERADIUS_MOD_FILES,rlm_files,acct_users preproxy_users users))
  76. $(eval $(call PKG_mod_template,FREERADIUS_MOD_MSCHAP,rlm_mschap,))
  77. $(eval $(call PKG_mod_template,FREERADIUS_MOD_LDAP,rlm_ldap,ldap.attrmap))
  78. $(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,))
  79. $(eval $(call PKG_mod_template,FREERADIUS_MOD_PREPROCESS,rlm_preprocess,hints huntgroups))
  80. $(eval $(call PKG_mod_template,FREERADIUS_MOD_REALM,rlm_realm,proxy.conf))
  81. $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,sql.conf))
  82. $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,))
  83. $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,))
  84. CONFIGURE_STYLE= gnu
  85. CONFIGURE_ENV+= ac_cv_lib_nsl_inet_ntoa=no
  86. CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS} \
  87. --with-openssl-includes=${STAGING_DIR}/usr/include \
  88. --with-openssl-libraries=${STAGING_DIR}/usr/lib \
  89. --enable-strict-dependencies \
  90. --with-raddbdir=/etc/freeradius \
  91. --without-edir \
  92. --without-snmp \
  93. --with-experimental-modules \
  94. --without-rlm_attr-rewrite \
  95. --without-rlm_checkval \
  96. --without-rlm_counter \
  97. --without-rlm_dbm \
  98. --without-rlm_eap \
  99. --without-rlm_eap2 \
  100. --without-rlm_eap_sim \
  101. --without-rlm_example \
  102. --without-rlm_ippool \
  103. --without-rlm_krb5 \
  104. --without-rlm_otp \
  105. --without-rlm_smsotp \
  106. --without-rlm_pam \
  107. --without-rlm_perl \
  108. --without-rlm_python \
  109. --without-rlm_radutmp \
  110. --without-rlm_ruby \
  111. --without-rlm_smb \
  112. --without-rlm_sqlcounter \
  113. --without-rlm_sql_db2 \
  114. --without-rlm_sql_freetds \
  115. --without-rlm_sql_iodbc \
  116. --without-rlm_sql_oracle \
  117. --without-rlm_sql_sybase \
  118. --without-rlm_sql_unixodbc \
  119. --without-rlm_sql_log \
  120. --without-rlm_unix \
  121. --without-rlm_eap_ikev2 \
  122. --without-rlm_eap_tnc \
  123. --without-rlm_opendirectory \
  124. --without-rlm_sql_firebird \
  125. --without-rlm_sql_sqlite \
  126. --libdir=/usr/lib/freeradius \
  127. --libexecdir=/usr/lib/freeradius
  128. BUILD_STYLE= auto
  129. INSTALL_STYLE= auto
  130. FAKE_FLAGS+= R="${WRKINST}" \
  131. INSTALLSTRIP=""
  132. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  133. ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/etc/freeradius
  134. ${CP} ./files/users ${IDIR_FREERADIUS_SERVER}/etc/freeradius/
  135. ${INSTALL_DATA} ./files/radiusd.conf ${IDIR_FREERADIUS_SERVER}/etc/freeradius
  136. ${INSTALL_DATA} ./files/clients.conf ${IDIR_FREERADIUS_SERVER}/etc/freeradius
  137. for f in dictionary; do \
  138. ${CP} ${WRKINST}/etc/freeradius/$${f} \
  139. ${IDIR_FREERADIUS_SERVER}/etc/freeradius/ ; \
  140. done
  141. ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius
  142. ${CP} ${WRKINST}/usr/share/freeradius/dictionary \
  143. ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius/
  144. for f in freeradius freeradius.internal rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 rfc4072 rfc4372 rfc4675 rfc4679 rfc5176; do \
  145. cp ${WRKINST}/usr/share/freeradius/dictionary.$${f} \
  146. ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius/ ; \
  147. done
  148. ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/lib/freeradius
  149. ${CP} ${WRKINST}/usr/lib/freeradius/libfreeradius-radius{,-*}.so \
  150. ${IDIR_FREERADIUS_SERVER}/usr/lib
  151. ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/sbin
  152. ${CP} ${WRKINST}/usr/sbin/radiusd \
  153. ${IDIR_FREERADIUS_SERVER}/usr/sbin/
  154. ${INSTALL_DIR} ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius
  155. ${CP} ${WRKINST}/etc/freeradius/certs \
  156. ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/
  157. rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/README
  158. rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/new*
  159. rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/index*
  160. rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/serial*
  161. ${INSTALL_DIR} ${IDIR_FREERADIUS_UTILS}/usr/bin
  162. ${INSTALL_BIN} ${WRKINST}/usr/bin/radclient ${IDIR_FREERADIUS_UTILS}/usr/bin
  163. include ${TOPDIR}/mk/pkg-bottom.mk