%if %{with freeradius_openssl}
BuildRequires: freeradius-openssl, freeradius-openssl-devel
%else
-%if 0%{?rhel}%{?fedora} < 8
-BuildRequires: nwkrad-openssl-devel >= 1.1.1
-%else
BuildRequires: openssl, openssl-devel
%endif
-%endif
BuildRequires: libcap-devel
BuildRequires: libkqueue-devel
%if %{with freeradius_openssl}
Requires: freeradius-openssl
%else
-%if 0%{?rhel}%{?fedora} < 8
-# (We also need the system openssl on CentOS7 for the utilities)
-Requires: nwkrad-openssl >= 1.1.1, nwkrad-openssl-perl
-%endif
# Need openssl-perl for c_rehash, which is used when
# generating certificates
Requires: openssl, openssl-perl
Summary: Internal support library for FreeRADIUS modules using json-c
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
-%if 0%{?rhel}%{?fedora} < 8
-Requires: nwkrad-json-c >= 0.13
-BuildRequires: nwkrad-json-c-devel >= 0.13
-%else
Requires: json-c >= 0.13
BuildRequires: json-c-devel >= 0.13
-%endif
%description libfreeradius-json
Internal support library for FreeRADIUS modules using json-c, required by all modules that use json-c.
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%{?fedora:BuildRequires: perl-devel}
-%if 0%{?rhel} <= 5
-BuildRequires: perl
-%endif
-%if 0%{?rhel} >= 6
BuildRequires: perl-devel
-%endif
BuildRequires: perl(ExtUtils::Embed)
%description perl
Summary: MySQL support for FreeRADIUS
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
-%if 0%{?rhel} <= 7
-Requires: mysql
-%endif
-%if 0%{?rhel} >= 8
Requires: mysql-libs
-%endif
BuildRequires: mysql-devel
%description mysql
This plugin provides an experimental M3UA/SCCP/TCAP/MAP stack for the FreeRADIUS server project.
%endif
-# libcurl version is too old in Centos/EL 7
-%if 0%{?rhel}%{?fedora} > 7
%package smtp
Summary: SMTP support for FreeRADIUS
Group: System Environment/Daemons
%description smtp
This plugin provides the ability to authenticate users against SMTP servers and send email.
-%endif
%if %{with rlm_yubikey}
%package yubikey
#
# Disable _debuginfo_subpackage. They don't work. rpbuild doesn't split out the debug info for the files
# into the subpackages. It also doesn't split out the source files.
-%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
-%endif
-%if 0%{?rhel} >= 8
-%undefine _debugsource_packages
-%undefine _debuginfo_subpackages
-%endif
%prep
%setup -q -n freeradius-server-%{version}
--with-rlm-krb5-include-dir=/usr/kerberos/include \
--without-rlm_sql_firebird \
--without-rlm_sql_db2 \
-%if 0%{?rhel}%{?fedora} < 8
- --with-jsonc-lib-dir=/opt/nwkrad/lib64 \
- --with-jsonc-include-dir=/opt/nwkrad/include \
-%else
--with-jsonc-lib-dir=%{_libdir} \
--with-jsonc-include-dir=/usr/include/json \
-%endif
--with-winbind-include-dir=/usr/include/samba-4.0 \
--with-winbind-lib-dir=/usr/lib64/samba \
%if %{with freeradius_openssl}
--with-openssl-lib-dir=/opt/openssl/lib \
--with-openssl-include-dir=/opt/openssl/include \
-%else
-%if 0%{?rhel}%{?fedora} < 8
- --with-openssl-lib-dir=/opt/nwkrad/lib64 \
- --with-openssl-include-dir=/opt/nwkrad/include \
-%endif
%endif
%if %{with developer}
--enable-developer=yes \
%{_libdir}/freeradius/rlm_mruby.so
%endif
-# libcurl version is too old in Centos/EL 7
-%if 0%{?rhel}%{?fedora} > 7
%files smtp
%defattr(-,root,root)
%{_libdir}/freeradius/rlm_smtp.so
-%endif
%files freetds
%defattr(-,root,root)