1.1 --- a/freeradius/freeradius.spec Sat Feb 19 00:04:57 2011 +0100 1.2 +++ b/freeradius/freeradius.spec Sat Feb 19 00:06:36 2011 +0100 1.3 @@ -21,9 +21,6 @@ 1.4 ## SUCH DAMAGE. 1.5 ## 1.6 1.7 -# FIXME: rse: default configuration is a little bit fat 1.8 -# FIXME: rse: still not run-time tested 1.9 - 1.10 # package information 1.11 Name: freeradius 1.12 Summary: FreeRADIUS Server 1.13 @@ -35,7 +32,7 @@ 1.14 Group: RADIUS 1.15 License: GPL 1.16 Version: 2.1.10 1.17 -Release: 20100929 1.18 +Release: 20100930 1.19 1.20 # package options 1.21 %option with_mysql no 1.22 @@ -49,8 +46,10 @@ 1.23 Patch0: freeradius.patch 1.24 1.25 # build information 1.26 -BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, libtool 1.27 -PreReq: OpenPKG, openpkg >= 20100101 1.28 +Prefix: %{l_prefix} 1.29 +BuildRoot: %{l_buildroot} 1.30 +BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, libtool 1.31 +PreReq: OpenPKG, openpkg >= 20060823 1.32 BuildPreReq: perl, openssl, gdbm, readline 1.33 PreReq: perl, openssl, gdbm, readline 1.34 %if "%{with_mysql}" == "yes" 1.35 @@ -69,6 +68,8 @@ 1.36 BuildPreReq: snmp 1.37 PreReq: snmp 1.38 %endif 1.39 +AutoReq: no 1.40 +AutoReqProv: no 1.41 1.42 %description 1.43 FreeRADIUS is one of the most modular and featureful RADIUS servers 1.44 @@ -87,11 +88,28 @@ 1.45 %prep 1.46 %setup -q -n freeradius-server-%{version} 1.47 %patch -p0 1.48 + %{l_shtool} subst \ 1.49 + -e 's; */usr/\(include/postgresql\);%{l_prefix}/\1;g' \ 1.50 + -e 's; */usr/local/pgsql/include;;g' \ 1.51 + -e 's; */usr/include/pgsql;;g' \ 1.52 + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure 1.53 + extlib='' 1.54 + case "%{l_platform -t}" in 1.55 + *-sunos* ) 1.56 + extlib='-lsocket -lnsl' 1.57 + ;; 1.58 + esac 1.59 %if "%{with_openldap}" == "yes" 1.60 %{l_shtool} subst \ 1.61 - -e 's;\(LIBS *=.* *-lldap\);\1 -llber -lssl -lcrypto;' \ 1.62 + -e "s;\(LIBS *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ 1.63 + -e "s;\(smart_lib *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ 1.64 src/modules/rlm_ldap/configure 1.65 %endif 1.66 +%if "%{with_pgsql}" == "yes" 1.67 + %{l_shtool} subst \ 1.68 + -e "s;-lpq;-lpq `%{l_prefix}/bin/pg_config --libs` $extlib;g" \ 1.69 + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure 1.70 +%endif 1.71 1.72 %build 1.73 # configure package 1.74 @@ -175,6 +193,7 @@ 1.75 1.76 %install 1.77 # install package 1.78 + rm -rf $RPM_BUILD_ROOT 1.79 %{l_shtool} mkdir -f -p -m 755 \ 1.80 $RPM_BUILD_ROOT%{l_prefix}/lib/freeradius 1.81 %{l_make} %{l_mflags} install \ 1.82 @@ -210,4 +229,5 @@ 1.83 %files -f files 1.84 1.85 %clean 1.86 + rm -rf $RPM_BUILD_ROOT 1.87