19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
21 ## SUCH DAMAGE. |
21 ## SUCH DAMAGE. |
22 ## |
22 ## |
23 |
23 |
24 # FIXME: rse: default configuration is a little bit fat |
|
25 # FIXME: rse: still not run-time tested |
|
26 |
|
27 # package information |
24 # package information |
28 Name: freeradius |
25 Name: freeradius |
29 Summary: FreeRADIUS Server |
26 Summary: FreeRADIUS Server |
30 URL: http://www.freeradius.org/ |
27 URL: http://www.freeradius.org/ |
31 Vendor: The FreeRADIUS Server Project |
28 Vendor: The FreeRADIUS Server Project |
47 Source0: ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-%{version}.tar.gz |
44 Source0: ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-%{version}.tar.gz |
48 Source1: rc.freeradius |
45 Source1: rc.freeradius |
49 Patch0: freeradius.patch |
46 Patch0: freeradius.patch |
50 |
47 |
51 # build information |
48 # build information |
52 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, libtool |
49 Prefix: %{l_prefix} |
53 PreReq: OpenPKG, openpkg >= 20100101 |
50 BuildRoot: %{l_buildroot} |
|
51 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, libtool |
|
52 PreReq: OpenPKG, openpkg >= 20060823 |
54 BuildPreReq: perl, openssl, gdbm, readline |
53 BuildPreReq: perl, openssl, gdbm, readline |
55 PreReq: perl, openssl, gdbm, readline |
54 PreReq: perl, openssl, gdbm, readline |
56 %if "%{with_mysql}" == "yes" |
55 %if "%{with_mysql}" == "yes" |
57 BuildPreReq: mysql, zlib |
56 BuildPreReq: mysql, zlib |
58 PreReq: mysql, zlib |
57 PreReq: mysql, zlib |
85 } |
86 } |
86 |
87 |
87 %prep |
88 %prep |
88 %setup -q -n freeradius-server-%{version} |
89 %setup -q -n freeradius-server-%{version} |
89 %patch -p0 |
90 %patch -p0 |
90 %if "%{with_openldap}" == "yes" |
91 %{l_shtool} subst \ |
91 %{l_shtool} subst \ |
92 -e 's; */usr/\(include/postgresql\);%{l_prefix}/\1;g' \ |
92 -e 's;\(LIBS *=.* *-lldap\);\1 -llber -lssl -lcrypto;' \ |
93 -e 's; */usr/local/pgsql/include;;g' \ |
|
94 -e 's; */usr/include/pgsql;;g' \ |
|
95 src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure |
|
96 extlib='' |
|
97 case "%{l_platform -t}" in |
|
98 *-sunos* ) |
|
99 extlib='-lsocket -lnsl' |
|
100 ;; |
|
101 esac |
|
102 %if "%{with_openldap}" == "yes" |
|
103 %{l_shtool} subst \ |
|
104 -e "s;\(LIBS *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ |
|
105 -e "s;\(smart_lib *=.* *-lldap[_r]*\);\1 -llber -lssl -lcrypto $extlib;g" \ |
93 src/modules/rlm_ldap/configure |
106 src/modules/rlm_ldap/configure |
|
107 %endif |
|
108 %if "%{with_pgsql}" == "yes" |
|
109 %{l_shtool} subst \ |
|
110 -e "s;-lpq;-lpq `%{l_prefix}/bin/pg_config --libs` $extlib;g" \ |
|
111 src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure |
94 %endif |
112 %endif |
95 |
113 |
96 %build |
114 %build |
97 # configure package |
115 # configure package |
98 CC="%{l_cc}" \ |
116 CC="%{l_cc}" \ |