]> git.pld-linux.org Git - packages/freeradius-server.git/blame - freeradius-server.spec
- disabled ac/am regeneration and as-needed - needs fixing; cleanups.
[packages/freeradius-server.git] / freeradius-server.spec
CommitLineData
b3332a9e 1#
2# TODO:
10649a33
PG
3# - check log files permisions - should be writable by radius user/group
4# (log files are created by server)
5# - prepare to use with --as-needed
6# - ac/am regeneration doesn't work
b3332a9e 7#
8%include /usr/lib/rpm/macros.perl
9#
10Summary: High-performance and highly configurable RADIUS server
11Summary(pl.UTF-8): Szybki i wysoce konfigurowalny serwer RADIUS
12Name: freeradius-server
0a62ea03 13Version: 2.1.1
10649a33 14Release: 0.9
b3332a9e 15License: GPL
0a62ea03 16Group: Networking/Daemons/Radius
b3332a9e 17Source0: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.bz2
0a62ea03 18# Source0-md5: 4ccf748ef9851d90844d085647351ca4
b3332a9e 19Source1: %{name}.logrotate
20Source2: %{name}.init
21Source3: %{name}.pam
22Patch0: %{name}-config.patch
23Patch1: %{name}-libdir.patch
24Patch2: %{name}-makefile.patch
25Patch3: %{name}-rundir.patch
26URL: http://www.freeradius.org/
27BuildRequires: Firebird-devel
28BuildRequires: autoconf
29BuildRequires: automake
30BuildRequires: cyrus-sasl-devel
31BuildRequires: gdbm-devel
32BuildRequires: libeap-ikev2-devel
33BuildRequires: libtool
34BuildRequires: net-snmp-utils
35BuildRequires: mysql-devel
36BuildRequires: openldap-devel
37BuildRequires: openssl-devel
38BuildRequires: pam-devel
39BuildRequires: perl-devel
40BuildRequires: postgresql-devel
41BuildRequires: python-devel
42BuildRequires: rpmbuild(macros) >= 1.268
43BuildRequires: sqlite3-devel
44BuildRequires: unixODBC-devel
45Requires(post,preun): /sbin/chkconfig
46Requires(postun): /usr/sbin/groupdel
47Requires(postun): /usr/sbin/userdel
48Requires(pre): /bin/id
49Requires(pre): /usr/bin/getgid
50Requires(pre): /usr/sbin/groupadd
51Requires(pre): /usr/sbin/useradd
52Requires(pre): /usr/sbin/usermod
53Requires: perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
54Requires: rc-scripts
55Provides: group(radius)
56Provides: user(radius)
80f87d24 57Provides: freeradius = %{version}-%{release}
b3332a9e 58Obsoletes: cistron-radius
80f87d24 59Obsoletes: freeradius < 2.0
b3332a9e 60Conflicts: logrotate < 3.7-4
b3332a9e 61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
10649a33
PG
63%define filterout_ld -Wl,--as-needed
64
b3332a9e 65%description
66The FreeRADIUS Server Project is an attempt to create a
67high-performance and highly configurable GPL'd RADIUS server. It is
68generally similar to the Livingston 2.0 RADIUS server, but has a lot
69more features, and is much more configurable.
70
71%description -l pl.UTF-8
72Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce
73konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do
74Livingston 2.0 RADIUS server ale ma o wiele więcej funkcji i posiada
75większe możliwości konfigurowania.
76
77%prep
78%setup -q
79%patch0 -p1
80%patch1 -p1
81%patch2 -p1
82%patch3 -p1
83
84%build
10649a33
PG
85# Keep it for future when ac/am regeneration will be ok
86#find -name 'configure.[ia][nc]' -type f | while read FILE; do
87# cd $(dirname "$FILE")
88# %{__libtoolize}
89# %{__aclocal} -I $OLDPWD
90# %{__autoconf}
91# [ -f config.h.in ] && %{__autoheader}
92# cd -
93#done
b3332a9e 94
95LIBS="-lgdbm" \
96%configure \
97 --enable-strict-dependencies \
98 --with-experimental-modules \
99 --with-logdir=%{_var}/log/freeradius \
100 --with-system-libtool \
7fd3fae8 101 --without-rlm_eap_tnc \
b3332a9e 102 --without-rlm_opendirectory \
103 --without-rlm_sql_db2 \
104 --without-rlm_sql_iodbc \
105 --without-rlm_sql_oracle
106
107%{make} -j1
108
109%install
110rm -rf $RPM_BUILD_ROOT
10649a33
PG
111install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,pam.d} \
112 $RPM_BUILD_ROOT%{_var}/log/{,archive}/freeradius/radacct
b3332a9e 113
114%{__make} -j1 install \
115 R=$RPM_BUILD_ROOT
116
b3332a9e 117install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
b3332a9e 118install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
b3332a9e 119install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/radius
120
10649a33
PG
121# Cleanups:
122rm -rf $RPM_BUILD_ROOT%{_docdir}/freeradius \
123 $RPM_BUILD_ROOT%{_libdir}/*.{a,la} \
124 $RPM_BUILD_ROOT%{_libdir}/freeradius/*.a \
125 $RPM_BUILD_ROOT%{_sbindir}/rc.* \
126 $RPM_BUILD_ROOT%{_sysconfdir}/*.pl
b3332a9e 127
128%clean
129rm -rf $RPM_BUILD_ROOT
130
131%pre
132%groupadd -g 29 -r -f radius
133%useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g radius radius
134
135# TODO: should be in trigger instead.
136# upgrade from previous versions of the package, where radius' gid was "nobody"
137if [ "`id -g radius`" = "99" ]; then
138 usermod -g 29 radius
139 chown radius:radius /var/log/%{name}/*.log >/dev/null 2>&1 || :
140 chown radius:radius /var/log/%{name}/radacct/* >/dev/null 2>&1 || :
141fi
142
143%post
144/sbin/chkconfig --add %{name}
145%service %{name} restart "%{name} daemon"
146
147%preun
148if [ "$1" = "0" ]; then
149 %service %{name} stop
150 /sbin/chkconfig --del %{name}
151fi
152
153%postun
154if [ "$1" = "0" ]; then
155 %userremove radius
156 %groupremove radius
157fi
158
159%files
160%defattr(644,root,root,755)
161%doc doc/*
162%dir %{_libdir}/freeradius
163%dir %{_sysconfdir}/raddb
164%attr(771,root,radius) %dir %{_var}/log/freeradius
165%attr(771,root,radius) %dir %{_var}/log/freeradius/radacct
166%attr(771,root,radius) %dir %{_var}/log/archive/freeradius
167%attr(771,root,radius) %dir %{_var}/log/archive/freeradius/radacct
168%attr(775,root,radius) %dir /var/run/freeradius
169%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/raddb/*
170%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
171%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
172%attr(754,root,root) /etc/rc.d/init.d/%{name}
173%attr(755,root,root) %{_bindir}/*
174%attr(755,root,root) %{_sbindir}/*
175%attr(755,root,root) %{_libdir}/*.so
176%attr(755,root,root) %{_libdir}/freeradius/*.la
177%attr(755,root,root) %{_libdir}/freeradius/*.so
178%{_datadir}/freeradius
179%{_includedir}/freeradius
180%{_mandir}/man?/*
This page took 0.087639 seconds and 4 git commands to generate.