Updated for version 2.0.3
[freeradius.git] / redhat / freeradius.spec
index 55de003..9d3eadf 100644 (file)
@@ -1,14 +1,14 @@
 Summary: High-performance and highly configurable RADIUS server
 URL: http://www.freeradius.org/
-Name: freeradius
-Version: 1.1.0
-Release: 1
+Name: freeradius-server
+Version: 2.0.3
+Release: 0
 License: GPL
 Group: Networking/Daemons
 Packager: FreeRADIUS.org
 Source0: %{name}-%{version}.tar.gz
 Prereq: /sbin/chkconfig
-BuildPreReq: libtool
+BuildPreReq: libtool libtool-ltdl-devel
 # FIXME: snmpwalk, snmpget and rusers POSSIBLY needed by checkrad
 Provides: radiusd
 Conflicts: cistron-radius
@@ -29,11 +29,11 @@ CFLAGS="$RPM_OPT_FLAGS" \
        --localstatedir=%{_localstatedir} \
        --sysconfdir=%{_sysconfdir} \
        --mandir=%{_mandir} \
+       --with-docdir=%{_datadir}/doc/%{name}-%{version} \
        --with-system-libtool \
        --disable-ltdl-install \
        --with-ltdl-lib=/usr/lib \
        --with-ltdl-include=/usr/include \
-       --with-gnu-ld \
        --with-large-files --with-udpfromto --with-edir \
        --with-rlm-sql_postgresql-include-dir=/usr/include/pgsql \
        --with-rlm-krb5-include-dir=/usr/kerberos/include \
@@ -55,9 +55,13 @@ perl -i -pe 's/^#group =.*$/group = radiusd/' $RADDB/radiusd.conf
 perl -i -pe 's/#       shadow =/shadow =/' $RADDB/radiusd.conf
 
 # remove unneeded stuff
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/builddbm.8
 rm -f $RPM_BUILD_ROOT%{_prefix}/sbin/rc.radiusd
 
+# more files go to /usr/share/doc/freeradius-%{version}
+install -m 0644 CREDITS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
+install -m 0644 COPYRIGHT $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
+install -m 0644 LICENSE $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
+
 cd redhat
 install -m 755 rc.radiusd-redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/radiusd
 install -m 644 radiusd-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
@@ -99,22 +103,23 @@ fi
 
 %files
 %defattr(-,root,root)
-%doc doc/ChangeLog doc/README* todo/ COPYRIGHT INSTALL
 %config /etc/pam.d/radius
 %config /etc/logrotate.d/radiusd
 %config /etc/rc.d/init.d/radiusd
 %config (noreplace) /etc/raddb/*
+%doc %{_datadir}/doc/%{name}-%{version}
 %{_bindir}/*
 %{_datadir}/%{name}
 %{_libdir}/*
 %{_mandir}/*/*
 %{_sbindir}/*
+%{_incdir}/freeradius/*
 %attr(0700,radiusd,radiusd) %dir /var/log/radius
 %attr(0700,radiusd,radiusd) %dir /var/log/radius/radacct
 %attr(0700,radiusd,radiusd) %dir /var/run/radiusd
 
 %changelog
-* Thurs Dec 15 2004 Alan DeKok
+* Thu Dec 15 2004 Alan DeKok
 - update for 1.1.0
 
 * Mon May 31 2004 Paul Hampson