Группа :: Система/Серверы
Пакет: freeradius
Главная Изменения Спек Патчи Загрузить Bugs and FR
# This spec for backport to M24 is autogenerated. Do not edit it.
%define __libtoolize /bin/true
%define __nprocs 1
# nibs
%define nibs_version 1.1.8
%define dist_tag %(cut -d" " -f3 < /etc/altlinux-release)
#%%define nibs_suffix bf3_freeradius-1.0.1
%def_with pgsql
%def_without freenibs
%if "%dist_tag" == "Sisyphus"
%set_verify_elf_method unresolved=relaxed
%endif
Name: freeradius
Version: 1.1.2
Release: alt0.M24.2
Summary: FreeRADIUS server - GPLed RADIUS server
Summary(ru_RU.KOI8-R): FreeRADIUS - GPL реализация RADIUS сервера
License: GPL
Group: System/Servers
Url: http://www.freeradius.org
Source0: ftp://ftp.freeradius.org/pub/radius/%name-%version.tar.gz
Source1: %name.logrotate
Source2: %name.init
Source3: %name.sysconfig
Source4: http://heanet.dl.sourceforge.net/sourceforge/freesnibs/freenibs-%nibs_version.tar.gz
# alt patches
Patch1: freeradius-1.1.2-alt-eap_ssl.patch
Patch2: freeradius-1.1.2-alt-config.patch
# mdk patches
Patch20: freeradius-1.1.2-a_libtool14_to_call_your_own.diff
Patch21: freeradius-1.1.2-libdir.diff
Patch22: freeradius-1.1.2-avoid-version.diff
Patch23: freeradius-1.1.2-ltdl_no_la.diff
%def_disable static
%add_findprov_lib_path %_libdir/%name
Packager: FreeRadius Development Team <freeradius at packages.altlinux.org>
BuildRequires: libMySQL-devel libgdbm-devel libkrb5-devel libldap-devel
BuildRequires: libpam-devel libssl-devel libltdl-devel
BuildRequires: openldap-clients perl-devel perl-Net-SNMP perl-DBI
BuildRequires: python-base python-dev python-modules-encodings zlib-devel
%if_with pgsql
BuildRequires: postgresql-devel libpq3-devel
%endif
BuildRequires: rpm-build-compat >= 0.4
%description
The FreeRADIUS Server Project is an attempt to create a high-performance
and highly configurable GPL'd free RADIUS server. The server is similar
to Livingston's 2.0 server.
FreeRADIUS is a variant of the Cistron RADIUS server, but they don't
share a lot in common any more. You should use it because it has a lot
more features than Cistron and Livingston and is much more configurable.
%description -l ru_RU.KOI8-R
FreeRadius Server проект предназначен для создания высокопроизводительного
свободного RADIUS сервера с богатым спектром настроек и свойств. Этот
сервер подобен Livingston 2.0 RADIUS серверу и является вариантом
Cistron RADIUS Server, однако он имеет большее количество свойств и гибче
в конфигурировании.
%package ldap
Summary: libraries for %name with ldap support
Group: System/Servers
Requires: %name = %version-%release
%description ldap
This package provides a support for ldap authorization in freeradius
%package mysql
Summary: libraries for %name with MySQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release
%description mysql
This package provides a support for mysql
authetication/authorization/accounting in freeradius
%if_with pgsql
%package pgsql
Summary: libraries for %name with PostgreSQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release
%description pgsql
This package provides a support for Postgresql
authetication/authorization/accounting in freeradius
%endif
%package python
Summary: Python module for freeradius
Group: System/Servers
Requires: %name = %version-%release, python
%description python
This module allows to write modules in python
%package perl
Summary: perl module for freeradius
Group: System/Servers
Requires: %name = %version-%release
%description perl
This module allows to write modules in perl
%package sqlcounter
Summary: sqlcounter module for %name
Group: System/Servers
Provides: %name-sqlcounter = %version-%release
Requires: %name-sql = %version-%release
%description sqlcounter
sqlcounter is module for counting all sessions of users and disabling
account if total time of all sessions is greater than limit.
%package devel
Summary: Headers for %name
Group: Development/C
Provides: %name-devel = %version-%release
%description devel
Headers for %name
%if_with freenibs
%package -n freenibs-%nibs_version
Summary: NIBS is Neon Internet Billing System
Group: System/Servers
URL: http://sourceforge.net/projects/nibs
Provides: %name-freenibs billing nibs
%description -n freenibs-%nibs_version
FreeNIBS is billing and accounting system for FreeRADIUS
%endif
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%if_with freenibs
%setup -q -D -T -a 4
#%patch3 -p1
cp -r freenibs-%nibs_version/src/modules/rlm_nibs src/modules
echo "rlm_nibs" >> src/modules/stable
%endif
%build
export CC=gcc LTCC=gcc
%configure \
%{subst_enable static} \
--with-gnu-ld \
--localstatedir=%_var \
--libdir=%_libdir/%name \
--includedir=%_includedir/%name \
--with-logdir=%_logdir/%name \
--mandir=%_mandir \
--disable-ltdl-install \
--with-openssl-includes=%_includedir/openssl \
--with-openssl-libraries=%_libdir \
--with-rlm-krb5-lib-dir=%_libdir \
--with-rlm-krb5-include-dir=%_includedir/krb5 \
--with-rlm-dbm-include-dir=%_includedir \
--with-ltdl-include-dir=%_includedir \
--with-ltdl-lib=%_libdir \
--with-static-modules="" \
--with-large-files \
%if_with pgsql
--with-rlm_sql_postgresql=yes \
%endif
--with-experimental-modules \
--with-rlm_perl=yes
%__subst "s,HAVE_NDBM,HAVE_GDBM_NDBM," src/modules/rlm_dbm/Makefile
find -type f -print0 |
xargs -r0 grep -FZl libradius.a -- | \
xargs -r0 %__subst -p 's/libradius\.a/libradius.so/g' --
%make_build
%install
make install R=%buildroot
rm -f %buildroot%prefix/sbin/rc.radiusd
mkdir -p %buildroot%_sysconfdir/{logrotate.d,sysconfig,rc.d/init.d}
install -p -m644 %SOURCE1 %buildroot%_sysconfdir/logrotate.d/radiusd
install -p -m755 %SOURCE2 %buildroot%_sysconfdir/rc.d/init.d/radiusd
install -p -m640 %SOURCE3 %buildroot%_sysconfdir/sysconfig/radiusd
install -d -p -m0755 %buildroot%_docdir/%name-%version
install -d -p -m0755 %buildroot%_docdir/%name-%version/rfc
rm -rf doc/00-OLD
cp -R doc %buildroot%_docdir/%name-%version
# devel
mkdir -p %buildroot%_includedir/%name
cp -rp src/include/*.h %buildroot%_includedir/%name
# delete .la-files
rm -f %buildroot%_libdir/%name/*.la
%if_with freenibs
mkdir -p freenibs_docs/rlm_nibs_mysql
mkdir -p freenibs_docs/rlm_nibs_postgresql
mv -f src/modules/rlm_nibs/{schemas,doc,utils} freenibs_docs
cp -r freenibs-%nibs_version/raddb freenibs_docs
rm -f freenibs_docs/makefile
%endif
%pre
/usr/sbin/groupadd -r -f radius ||:
/usr/sbin/useradd -r -n -g radius -d /dev/null -s /dev/null \
-c RADIUS radius >/dev/null 2>&1 ||:
%if_with freenibs
%add_findreq_skiplist %_sbindir/dialup.guard %_sbindir/dialup.userkill
%endif
%preun
%preun_service radiusd
%post
%post_service radiusd
%files
%doc doc/*
%doc dialup_admin
%_bindir/*
%_sbindir/*
%_datadir/%name/*
%dir %_datadir/%name
%_libdir/%name/libradius*.so
%_libdir/%name/libeap*.so
%_libdir/%name/rlm_sim_files*.so
%_libdir/%name/rlm_acct*.so
%_libdir/%name/rlm_always*.so
%_libdir/%name/rlm_attr*.so
%_libdir/%name/rlm_chap*.so
%_libdir/%name/rlm_checkval*.so
%_libdir/%name/rlm_counter*.so
%_libdir/%name/rlm_cram*.so
%_libdir/%name/rlm_dbm*.so
%_libdir/%name/rlm_detail*.so
%_libdir/%name/rlm_digest*.so
%_libdir/%name/rlm_eap*.so
%_libdir/%name/rlm_ex*.so
%_libdir/%name/rlm_f*.so
%_libdir/%name/rlm_ip*.so
%_libdir/%name/rlm_ms*.so
%_libdir/%name/rlm_ns*.so
%_libdir/%name/rlm_pa*.so
%_libdir/%name/rlm_pr*.so
%_libdir/%name/rlm_r*.so
%_libdir/%name/rlm_smb*.so
%_libdir/%name/rlm_otp*.so
%_libdir/%name/rlm_sql.so
%_libdir/%name/rlm_sql_log.so
%_libdir/%name/rlm_unix.so
%_libdir/%name/rlm_krb5.so
%_libdir/%name/rlm_sqlippool.so
%dir %_libdir/%name
%_man1dir/*
%_man5dir/*
%_man8dir/*
%config(noreplace) %_sysconfdir/raddb/*
%config(noreplace) %_sysconfdir/logrotate.d/radiusd
%config(noreplace) %_sysconfdir/sysconfig/radiusd
%config %_initdir/radiusd
%dir %attr(0750,root,radius) %_sysconfdir/raddb
%attr(1770,root,radius) %dir %_var/run/radiusd
%attr(1770,root,radius) %dir %_logdir/%name/radacct
%attr(1770,root,radius) %dir %_logdir/%name
%files ldap
%_libdir/%name/rlm_ldap*.so
%files mysql
%_libdir/%name/rlm_sql_mysql*.so
%if_with pgsql
%files pgsql
%_libdir/%name/rlm_sql_postgresql*.so
%endif
%files python
%doc src/modules/rlm_python/*.py
%doc src/modules/rlm_python/*.sql
%_libdir/%name/rlm_python*.so
%files perl
%doc src/modules/rlm_perl/example.pl
%_libdir/%name/rlm_perl*.so
%files sqlcounter
%_libdir/%name/rlm_sqlcounter*.so
%files devel
%_includedir/%name
%if_with freenibs
%files -n freenibs-%nibs_version
%doc freenibs_docs/*
%_libdir/%name/rlm_nibs*.so
%endif
%changelog
…
Полный changelog можно просмотреть здесь
%define __libtoolize /bin/true
%define __nprocs 1
# nibs
%define nibs_version 1.1.8
%define dist_tag %(cut -d" " -f3 < /etc/altlinux-release)
#%%define nibs_suffix bf3_freeradius-1.0.1
%def_with pgsql
%def_without freenibs
%if "%dist_tag" == "Sisyphus"
%set_verify_elf_method unresolved=relaxed
%endif
Name: freeradius
Version: 1.1.2
Release: alt0.M24.2
Summary: FreeRADIUS server - GPLed RADIUS server
Summary(ru_RU.KOI8-R): FreeRADIUS - GPL реализация RADIUS сервера
License: GPL
Group: System/Servers
Url: http://www.freeradius.org
Source0: ftp://ftp.freeradius.org/pub/radius/%name-%version.tar.gz
Source1: %name.logrotate
Source2: %name.init
Source3: %name.sysconfig
Source4: http://heanet.dl.sourceforge.net/sourceforge/freesnibs/freenibs-%nibs_version.tar.gz
# alt patches
Patch1: freeradius-1.1.2-alt-eap_ssl.patch
Patch2: freeradius-1.1.2-alt-config.patch
# mdk patches
Patch20: freeradius-1.1.2-a_libtool14_to_call_your_own.diff
Patch21: freeradius-1.1.2-libdir.diff
Patch22: freeradius-1.1.2-avoid-version.diff
Patch23: freeradius-1.1.2-ltdl_no_la.diff
%def_disable static
%add_findprov_lib_path %_libdir/%name
Packager: FreeRadius Development Team <freeradius at packages.altlinux.org>
BuildRequires: libMySQL-devel libgdbm-devel libkrb5-devel libldap-devel
BuildRequires: libpam-devel libssl-devel libltdl-devel
BuildRequires: openldap-clients perl-devel perl-Net-SNMP perl-DBI
BuildRequires: python-base python-dev python-modules-encodings zlib-devel
%if_with pgsql
BuildRequires: postgresql-devel libpq3-devel
%endif
BuildRequires: rpm-build-compat >= 0.4
%description
The FreeRADIUS Server Project is an attempt to create a high-performance
and highly configurable GPL'd free RADIUS server. The server is similar
to Livingston's 2.0 server.
FreeRADIUS is a variant of the Cistron RADIUS server, but they don't
share a lot in common any more. You should use it because it has a lot
more features than Cistron and Livingston and is much more configurable.
%description -l ru_RU.KOI8-R
FreeRadius Server проект предназначен для создания высокопроизводительного
свободного RADIUS сервера с богатым спектром настроек и свойств. Этот
сервер подобен Livingston 2.0 RADIUS серверу и является вариантом
Cistron RADIUS Server, однако он имеет большее количество свойств и гибче
в конфигурировании.
%package ldap
Summary: libraries for %name with ldap support
Group: System/Servers
Requires: %name = %version-%release
%description ldap
This package provides a support for ldap authorization in freeradius
%package mysql
Summary: libraries for %name with MySQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release
%description mysql
This package provides a support for mysql
authetication/authorization/accounting in freeradius
%if_with pgsql
%package pgsql
Summary: libraries for %name with PostgreSQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release
%description pgsql
This package provides a support for Postgresql
authetication/authorization/accounting in freeradius
%endif
%package python
Summary: Python module for freeradius
Group: System/Servers
Requires: %name = %version-%release, python
%description python
This module allows to write modules in python
%package perl
Summary: perl module for freeradius
Group: System/Servers
Requires: %name = %version-%release
%description perl
This module allows to write modules in perl
%package sqlcounter
Summary: sqlcounter module for %name
Group: System/Servers
Provides: %name-sqlcounter = %version-%release
Requires: %name-sql = %version-%release
%description sqlcounter
sqlcounter is module for counting all sessions of users and disabling
account if total time of all sessions is greater than limit.
%package devel
Summary: Headers for %name
Group: Development/C
Provides: %name-devel = %version-%release
%description devel
Headers for %name
%if_with freenibs
%package -n freenibs-%nibs_version
Summary: NIBS is Neon Internet Billing System
Group: System/Servers
URL: http://sourceforge.net/projects/nibs
Provides: %name-freenibs billing nibs
%description -n freenibs-%nibs_version
FreeNIBS is billing and accounting system for FreeRADIUS
%endif
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%if_with freenibs
%setup -q -D -T -a 4
#%patch3 -p1
cp -r freenibs-%nibs_version/src/modules/rlm_nibs src/modules
echo "rlm_nibs" >> src/modules/stable
%endif
%build
export CC=gcc LTCC=gcc
%configure \
%{subst_enable static} \
--with-gnu-ld \
--localstatedir=%_var \
--libdir=%_libdir/%name \
--includedir=%_includedir/%name \
--with-logdir=%_logdir/%name \
--mandir=%_mandir \
--disable-ltdl-install \
--with-openssl-includes=%_includedir/openssl \
--with-openssl-libraries=%_libdir \
--with-rlm-krb5-lib-dir=%_libdir \
--with-rlm-krb5-include-dir=%_includedir/krb5 \
--with-rlm-dbm-include-dir=%_includedir \
--with-ltdl-include-dir=%_includedir \
--with-ltdl-lib=%_libdir \
--with-static-modules="" \
--with-large-files \
%if_with pgsql
--with-rlm_sql_postgresql=yes \
%endif
--with-experimental-modules \
--with-rlm_perl=yes
%__subst "s,HAVE_NDBM,HAVE_GDBM_NDBM," src/modules/rlm_dbm/Makefile
find -type f -print0 |
xargs -r0 grep -FZl libradius.a -- | \
xargs -r0 %__subst -p 's/libradius\.a/libradius.so/g' --
%make_build
%install
make install R=%buildroot
rm -f %buildroot%prefix/sbin/rc.radiusd
mkdir -p %buildroot%_sysconfdir/{logrotate.d,sysconfig,rc.d/init.d}
install -p -m644 %SOURCE1 %buildroot%_sysconfdir/logrotate.d/radiusd
install -p -m755 %SOURCE2 %buildroot%_sysconfdir/rc.d/init.d/radiusd
install -p -m640 %SOURCE3 %buildroot%_sysconfdir/sysconfig/radiusd
install -d -p -m0755 %buildroot%_docdir/%name-%version
install -d -p -m0755 %buildroot%_docdir/%name-%version/rfc
rm -rf doc/00-OLD
cp -R doc %buildroot%_docdir/%name-%version
# devel
mkdir -p %buildroot%_includedir/%name
cp -rp src/include/*.h %buildroot%_includedir/%name
# delete .la-files
rm -f %buildroot%_libdir/%name/*.la
%if_with freenibs
mkdir -p freenibs_docs/rlm_nibs_mysql
mkdir -p freenibs_docs/rlm_nibs_postgresql
mv -f src/modules/rlm_nibs/{schemas,doc,utils} freenibs_docs
cp -r freenibs-%nibs_version/raddb freenibs_docs
rm -f freenibs_docs/makefile
%endif
%pre
/usr/sbin/groupadd -r -f radius ||:
/usr/sbin/useradd -r -n -g radius -d /dev/null -s /dev/null \
-c RADIUS radius >/dev/null 2>&1 ||:
%if_with freenibs
%add_findreq_skiplist %_sbindir/dialup.guard %_sbindir/dialup.userkill
%endif
%preun
%preun_service radiusd
%post
%post_service radiusd
%files
%doc doc/*
%doc dialup_admin
%_bindir/*
%_sbindir/*
%_datadir/%name/*
%dir %_datadir/%name
%_libdir/%name/libradius*.so
%_libdir/%name/libeap*.so
%_libdir/%name/rlm_sim_files*.so
%_libdir/%name/rlm_acct*.so
%_libdir/%name/rlm_always*.so
%_libdir/%name/rlm_attr*.so
%_libdir/%name/rlm_chap*.so
%_libdir/%name/rlm_checkval*.so
%_libdir/%name/rlm_counter*.so
%_libdir/%name/rlm_cram*.so
%_libdir/%name/rlm_dbm*.so
%_libdir/%name/rlm_detail*.so
%_libdir/%name/rlm_digest*.so
%_libdir/%name/rlm_eap*.so
%_libdir/%name/rlm_ex*.so
%_libdir/%name/rlm_f*.so
%_libdir/%name/rlm_ip*.so
%_libdir/%name/rlm_ms*.so
%_libdir/%name/rlm_ns*.so
%_libdir/%name/rlm_pa*.so
%_libdir/%name/rlm_pr*.so
%_libdir/%name/rlm_r*.so
%_libdir/%name/rlm_smb*.so
%_libdir/%name/rlm_otp*.so
%_libdir/%name/rlm_sql.so
%_libdir/%name/rlm_sql_log.so
%_libdir/%name/rlm_unix.so
%_libdir/%name/rlm_krb5.so
%_libdir/%name/rlm_sqlippool.so
%dir %_libdir/%name
%_man1dir/*
%_man5dir/*
%_man8dir/*
%config(noreplace) %_sysconfdir/raddb/*
%config(noreplace) %_sysconfdir/logrotate.d/radiusd
%config(noreplace) %_sysconfdir/sysconfig/radiusd
%config %_initdir/radiusd
%dir %attr(0750,root,radius) %_sysconfdir/raddb
%attr(1770,root,radius) %dir %_var/run/radiusd
%attr(1770,root,radius) %dir %_logdir/%name/radacct
%attr(1770,root,radius) %dir %_logdir/%name
%files ldap
%_libdir/%name/rlm_ldap*.so
%files mysql
%_libdir/%name/rlm_sql_mysql*.so
%if_with pgsql
%files pgsql
%_libdir/%name/rlm_sql_postgresql*.so
%endif
%files python
%doc src/modules/rlm_python/*.py
%doc src/modules/rlm_python/*.sql
%_libdir/%name/rlm_python*.so
%files perl
%doc src/modules/rlm_perl/example.pl
%_libdir/%name/rlm_perl*.so
%files sqlcounter
%_libdir/%name/rlm_sqlcounter*.so
%files devel
%_includedir/%name
%if_with freenibs
%files -n freenibs-%nibs_version
%doc freenibs_docs/*
%_libdir/%name/rlm_nibs*.so
%endif
%changelog
…
Полный changelog можно просмотреть здесь