diff -r cc6a45887422 -r 937b4de09dc1 freeradius/freeradius.spec --- a/freeradius/freeradius.spec Sat Feb 19 00:04:57 2011 +0100 +++ b/freeradius/freeradius.spec Sat Feb 19 00:06:36 2011 +0100 @@ -21,9 +21,6 @@ ## SUCH DAMAGE. ## -# FIXME: rse: default configuration is a little bit fat -# FIXME: rse: still not run-time tested - # package information Name: freeradius Summary: FreeRADIUS Server @@ -35,7 +32,7 @@ Group: RADIUS License: GPL Version: 2.1.10 -Release: 20100929 +Release: 20100930 # package options %option with_mysql no @@ -49,8 +46,10 @@ Patch0: freeradius.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, libtool -PreReq: OpenPKG, openpkg >= 20100101 +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, libtool +PreReq: OpenPKG, openpkg >= 20060823 BuildPreReq: perl, openssl, gdbm, readline PreReq: perl, openssl, gdbm, readline %if "%{with_mysql}" == "yes" @@ -69,6 +68,8 @@ BuildPreReq: snmp PreReq: snmp %endif +AutoReq: no +AutoReqProv: no %description FreeRADIUS is one of the most modular and featureful RADIUS servers @@ -87,11 +88,28 @@ %prep %setup -q -n freeradius-server-%{version} %patch -p0 + %{l_shtool} subst \ + -e 's; */usr/\(include/postgresql\);%{l_prefix}/\1;g' \ + -e 's; */usr/local/pgsql/include;;g' \ + -e 's; */usr/include/pgsql;;g' \ + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure + extlib='' + case "%{l_platform -t}" in + *-sunos* ) + extlib='-lsocket -lnsl' + ;; + esac %if "%{with_openldap}" == "yes" %{l_shtool} subst \ - -e 's;\(LIBS *=.* *-lldap\);\1 -llber -lssl -lcrypto;' \ + -e "s;\(LIBS *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ + -e "s;\(smart_lib *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ src/modules/rlm_ldap/configure %endif +%if "%{with_pgsql}" == "yes" + %{l_shtool} subst \ + -e "s;-lpq;-lpq `%{l_prefix}/bin/pg_config --libs` $extlib;g" \ + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure +%endif %build # configure package @@ -175,6 +193,7 @@ %install # install package + rm -rf $RPM_BUILD_ROOT %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/lib/freeradius %{l_make} %{l_mflags} install \ @@ -210,4 +229,5 @@ %files -f files %clean + rm -rf $RPM_BUILD_ROOT