python3: update to 3.11.10
[openadk.git] / package / freeradius-server / Makefile
blobe58967d6b0d20d3907fd8e5e91df1e5fbc7bf8bf
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
6 PKG_NAME:= freeradius-server
7 PKG_VERSION:= 3.2.6
8 PKG_RELEASE:= 1
9 PKG_HASH:= dfed5a53596470e8c977fa2d4d154622ad673a0717d56dd085fb5000eda32f0d
10 PKG_DESCR:= flexible radius server
11 PKG_SECTION:= net/radius
12 PKG_DEPENDS:= libltdl libpcre libtalloc libopenssl libatomic libreadline
13 PKG_BUILDDEP:= libtool pcre talloc openssl readline
14 PKG_NEEDS:= threads
15 PKG_URL:= http://www.freeradius.org/
16 PKG_SITES:= https://github.com/FreeRADIUS/freeradius-server/releases/download/release_3_2_6/
18 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
20 PKG_SUBPKGS:= FREERADIUS_SERVER FREERADIUS_DEMOCERTS FREERADIUS_MOD_CHAP FREERADIUS_MOD_DETAIL
21 PKG_SUBPKGS+= FREERADIUS_MOD_DIGEST FREERADIUS_MOD_FILES FREERADIUS_MOD_LDAP FREERADIUS_MOD_MSCHAP
22 PKG_SUBPKGS+= FREERADIUS_MOD_PAP FREERADIUS_MOD_PREPROCESS FREERADIUS_MOD_REALM FREERADIUS_MOD_SQL
23 PKG_SUBPKGS+= FREERADIUS_MOD_SQL_MYSQL FREERADIUS_MOD_SQL_PGSQL FREERADIUS_UTILS
25 # sub package build dependencies
26 PKGSB_FREERADIUS_MOD_LDAP:= openldap
27 PKGSB_FREERADIUS_MOD_SQL_MYSQL:= mariadb
28 PKGSB_FREERADIUS_MOD_SQL_PGSQL:= postgresql
29 PKGSS_FREERADIUS_MOD_LDAP:= libopenldap
30 PKGSS_FREERADIUS_MOD_SQL_MYSQL:= libmariadbclient
31 PKGSS_FREERADIUS_MOD_SQL_PGSQL:= libpq
33 PKGSD_FREERADIUS_DEMOCERTS:= Demo certificates to test the server
34 PKGSN_FREERADIUS_DEMOCERTS:= freeradius-server
35 PKGSD_FREERADIUS_MOD_CHAP:= CHAP authentication module
36 PKGSN_FREERADIUS_MOD_CHAP:= freeradius-server
37 PKGSD_FREERADIUS_MOD_DETAIL:= Detailed accounting module
38 PKGSN_FREERADIUS_MOD_DETAIL:= freeradius-server
39 PKGSD_FREERADIUS_MOD_DIGEST:= Digest authentication module
40 PKGSN_FREERADIUS_MOD_DIGEST:= freeradius-server
41 PKGSD_FREERADIUS_MOD_FILES:= Module using local files for authorization
42 PKGSN_FREERADIUS_MOD_FILES:= freeradius-server
43 PKGSD_FREERADIUS_MOD_LDAP:= LDAP module
44 PKGSN_FREERADIUS_MOD_LDAP:= freeradius-server
45 PKGSD_FREERADIUS_MOD_MSCHAP:= MS-CHAP and MS-CHAPv2 module
46 PKGSN_FREERADIUS_MOD_MSCHAP:= freeradius-server
47 PKGSD_FREERADIUS_MOD_PAP:= PAP authentication module
48 PKGSN_FREERADIUS_MOD_PAP:= freeradius-server
49 PKGSD_FREERADIUS_MOD_PREPROCESS:= Request pre-processing module
50 PKGSN_FREERADIUS_MOD_PREPROCESS:= freeradius-server
51 PKGSD_FREERADIUS_MOD_REALM:= Realms handling module
52 PKGSN_FREERADIUS_MOD_REALM:= freeradius-server
53 PKGSD_FREERADIUS_MOD_SQL:= Base SQL module
54 PKGSN_FREERADIUS_MOD_SQL:= freeradius-server
55 PKGSD_FREERADIUS_MOD_SQL_MYSQL:= MySQL module
56 PKGSN_FREERADIUS_MOD_SQL_MYSQL:= freeradius-server
57 PKGSD_FREERADIUS_MOD_SQL_PGSQL:= PostgreSQL module
58 PKGSN_FREERADIUS_MOD_SQL_PGSQL:= freeradius-server
59 PKGSD_FREERADIUS_UTILS:= Misc. client utilities
60 PKGSN_FREERADIUS_UTILS:= freeradius-server
62 PKG_CONFIGURE_OPTS:=
64 ifneq (${ADK_PACKAGE_FREERADIUS_MOD_LDAP},)
65 PKG_CONFIGURE_LIBS+= -lcrypto -lssl
66 PKG_CONFIGURE_OPTS+= --with-rlm_ldap-include-dir="${STAGING_TARGET_DIR}/usr/include" \
67 --with-rlm_ldap-lib-dir="${STAGING_TARGET_DIR}/usr/lib"
68 else
69 PKG_CONFIGURE_OPTS+= --without-rlm_ldap
70 endif
72 ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_MYSQL},)
73 PKG_CONFIGURE_LIBS+= -lz
74 PKG_CONFIGURE_OPTS+= --with-mysql-include-dir="${STAGING_TARGET_DIR}/usr/include/mysql" \
75 --with-mysql-lib-dir="${STAGING_TARGET_DIR}/usr/lib/mysql" \
76 --without-threads \
77 --with-rlm_sql
78 else
79 PKG_CONFIGURE_OPTS+= --without-rlm_sql_mysql
80 endif
81 ifneq (${ADK_PACKAGE_FREERADIUS_MOD_SQL_PGSQL},)
82 PKG_CONFIGURE_OPTS+= --with-rlm_sql_postgresql-include-dir="${STAGING_TARGET_DIR}/usr/include" \
83 --with-rlm_sql_postgresql-lib-dir="${STAGING_TARGET_DIR}/usr/lib" \
84 --with-rlm_sql
85 else
86 PKG_CONFIGURE_OPTS+= --without-rlm_sql_postgresql
87 endif
89 include ${ADK_TOPDIR}/mk/package.mk
91 define PKG_mod_template
93 INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
95 ${2}-install:
96 ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/freeradius
97 for m in ${2}; do \
98 ${CP} ${WRKINST}/usr/lib/freeradius/$$$${m}.so \
99 $${IDIR_${1}}/usr/lib/freeradius/ ; \
100 done
101 -${INSTALL_DIR} $${IDIR_${1}}/etc/freeradius
102 for f in ${3}; do \
103 ${CP} ${WRKINST}/etc/freeradius/$$$${f} \
104 $${IDIR_${1}}/etc/freeradius/ ; \
105 done
106 endef
108 $(eval $(call PKG_template,FREERADIUS_SERVER,freeradius-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
109 $(eval $(call PKG_template,FREERADIUS_DEMOCERTS,freeradius-democerts,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_DEMOCERTS},${PKG_SECTION}))
110 $(eval $(call PKG_template,FREERADIUS_MOD_CHAP,freeradius-mod-chap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_CHAP},${PKG_SECTION}))
111 $(eval $(call PKG_template,FREERADIUS_MOD_DETAIL,freeradius-mod-detail,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_DETAIL},${PKG_SECTION}))
112 $(eval $(call PKG_template,FREERADIUS_MOD_DIGEST,freeradius-mod-digest,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_DIGEST},${PKG_SECTION}))
113 $(eval $(call PKG_template,FREERADIUS_MOD_FILES,freeradius-mod-files,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_FILES},${PKG_SECTION}))
114 $(eval $(call PKG_template,FREERADIUS_MOD_LDAP,freeradius-mod-ldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LDAP},${PKGSD_FREERADIUS_MOD_LDAP},${PKG_SECTION}))
115 $(eval $(call PKG_template,FREERADIUS_MOD_MSCHAP,freeradius-mod-mschap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_MSCHAP},${PKG_SECTION}))
116 $(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_PAP},${PKG_SECTION}))
117 $(eval $(call PKG_template,FREERADIUS_MOD_PREPROCESS,freeradius-mod-preprocess,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_PREPROCESS},${PKG_SECTION}))
118 $(eval $(call PKG_template,FREERADIUS_MOD_REALM,freeradius-mod-realm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_REALM},${PKG_SECTION}))
119 $(eval $(call PKG_template,FREERADIUS_MOD_SQL,freeradius-mod-sql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_MOD_SQL},${PKG_SECTION}))
120 $(eval $(call PKG_template,FREERADIUS_MOD_SQL_MYSQL,freeradius-mod-sql-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_MYSQL},${PKGSD_FREERADIUS_MOD_SQL_MYSQL},${PKG_SECTION}))
121 $(eval $(call PKG_template,FREERADIUS_MOD_SQL_PGSQL,freeradius-mod-sql-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_PGSQL},${PKGSD_FREERADIUS_MOD_SQL_PGSQL},${PKG_SECTION}))
122 $(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FREERADIUS_UTILS},${PKG_SECTION}))
124 $(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
125 $(eval $(call PKG_mod_template,FREERADIUS_MOD_DETAIL,rlm_detail,))
126 $(eval $(call PKG_mod_template,FREERADIUS_MOD_DIGEST,rlm_digest,))
127 $(eval $(call PKG_mod_template,FREERADIUS_MOD_FILES,rlm_files,acct_users preproxy_users users))
128 $(eval $(call PKG_mod_template,FREERADIUS_MOD_MSCHAP,rlm_mschap,))
129 $(eval $(call PKG_mod_template,FREERADIUS_MOD_LDAP,rlm_ldap,))
130 $(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,))
131 $(eval $(call PKG_mod_template,FREERADIUS_MOD_PREPROCESS,rlm_preprocess,hints huntgroups))
132 $(eval $(call PKG_mod_template,FREERADIUS_MOD_REALM,rlm_realm,proxy.conf))
133 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,))
134 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,))
135 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,))
137 CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTS} \
138 --libdir=/usr/lib/freeradius \
139 --libexecdir=/usr/lib/freeradius \
140 --disable-openssl-version-check \
141 --with-execinfo-include-dir=/dev/null \
142 --with-threads=yes \
143 --with-openssl-include-dir=${STAGING_TARGET_DIR}/usr/include \
144 --with-openssl-lib-dir=${STAGING_TARGET_DIR}/usr/lib \
145 --with-system-libltld \
146 --enable-strict-dependencies \
147 --with-raddbdir=/etc/freeradius \
148 --without-edir \
149 --without-snmp \
150 --without-experimental-modules \
151 --without-rlm_attr-rewrite \
152 --without-rlm_checkval \
153 --without-rlm_counter \
154 --without-rlm_dbm \
155 --without-rlm_eap \
156 --without-rlm_eap2 \
157 --without-rlm_eap_sim \
158 --without-rlm_example \
159 --without-rlm_ippool \
160 --without-rlm_json \
161 --without-rlm_krb5 \
162 --without-rlm_otp \
163 --without-rlm_smsotp \
164 --without-rlm_pam \
165 --without-rlm_perl \
166 --without-rlm_python3 \
167 --without-rlm_radutmp \
168 --without-rlm_rest \
169 --without-rlm_ruby \
170 --without-rlm_python \
171 --without-rlm_smb \
172 --without-rlm_sqlcounter \
173 --without-rlm_sql_db2 \
174 --without-rlm_sql_freetds \
175 --without-rlm_sql_iodbc \
176 --without-rlm_sql_oracle \
177 --without-rlm_sql_sybase \
178 --without-rlm_sql_unixodbc \
179 --without-rlm_sql_log \
180 --without-rlm_redis \
181 --without-rlm_cache_redis \
182 --without-rlm_rediswho \
183 --without-rlm_unbound \
184 --without-rlm_unix \
185 --without-rlm_eap_ikev2 \
186 --without-rlm_eap_tnc \
187 --without-rlm_cache_memcached \
188 --without-rlm_opendirectory \
189 --without-rlm_sql_firebird \
190 --without-rlm_sql_sqlite
191 CONFIGURE_ENV+= ax_cv_cc_builtin_choose_expr=yes \
192 ax_cv_cc_builtin_types_compatible_p=yes \
193 ax_cv_cc_builtin_bswap64=yes \
194 ax_cv_cc_bounded_attribute=yes \
195 FAKE_FLAGS+= INSTALLSTRIP=""
196 MAKE_ENV+= VERBOSE=1 \
197 R="$(WRKINST)"
199 freeradius-server-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
200 -${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/etc/freeradius
201 ${CP} ./files/users ${IDIR_FREERADIUS_SERVER}/etc/freeradius/
202 ${INSTALL_DATA} ./files/radiusd.conf \
203 ${IDIR_FREERADIUS_SERVER}/etc/freeradius
204 ${INSTALL_DATA} ./files/clients.conf \
205 ${IDIR_FREERADIUS_SERVER}/etc/freeradius
206 for f in dictionary; do \
207 ${CP} ${WRKINST}/etc/freeradius/$${f} \
208 ${IDIR_FREERADIUS_SERVER}/etc/freeradius/ ; \
209 done
210 ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius
211 ${CP} ${WRKINST}/usr/share/freeradius/dictionary* \
212 ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius/
213 ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/lib/freeradius
214 ${CP} ${WRKINST}/usr/lib/freeradius/libfreeradius-{dhcp,eap,server,radius}.so \
215 ${IDIR_FREERADIUS_SERVER}/usr/lib
216 ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/sbin
217 ${CP} ${WRKINST}/usr/sbin/radiusd \
218 ${IDIR_FREERADIUS_SERVER}/usr/sbin/
219 ${INSTALL_DIR} ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius
220 ${CP} ${WRKINST}/etc/freeradius/certs \
221 ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/
222 rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/README
223 rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/new*
224 rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/index*
225 rm -rf ${IDIR_FREERADIUS_DEMOCERTS}/etc/freeradius/certs/demoCA/serial*
226 ${INSTALL_DIR} ${IDIR_FREERADIUS_UTILS}/usr/bin
227 ${INSTALL_BIN} ${WRKINST}/usr/bin/radclient \
228 ${IDIR_FREERADIUS_UTILS}/usr/bin
230 include ${ADK_TOPDIR}/mk/pkg-bottom.mk