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 runtime tested |
|
26 |
24 # package information |
27 # package information |
25 Name: freeradius |
28 Name: freeradius |
26 Summary: FreeRADIUS Server |
29 Summary: FreeRADIUS Server |
27 URL: http://www.freeradius.org/ |
30 URL: http://www.freeradius.org/ |
28 Vendor: The FreeRADIUS Server Project |
31 Vendor: The FreeRADIUS Server Project |
44 Source0: ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-%{version}.tar.gz |
47 Source0: ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-%{version}.tar.gz |
45 Source1: rc.freeradius |
48 Source1: rc.freeradius |
46 Patch0: freeradius.patch |
49 Patch0: freeradius.patch |
47 |
50 |
48 # build information |
51 # build information |
49 Prefix: %{l_prefix} |
52 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, libtool |
50 BuildRoot: %{l_buildroot} |
53 PreReq: OpenPKG, openpkg >= 20100101 |
51 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, libtool |
|
52 PreReq: OpenPKG, openpkg >= 20060823 |
|
53 BuildPreReq: perl, openssl, gdbm, readline |
54 BuildPreReq: perl, openssl, gdbm, readline |
54 PreReq: perl, openssl, gdbm, readline |
55 PreReq: perl, openssl, gdbm, readline |
55 %if "%{with_mysql}" == "yes" |
56 %if "%{with_mysql}" == "yes" |
56 BuildPreReq: mysql, zlib |
57 BuildPreReq: mysql, zlib |
57 PreReq: mysql, zlib |
58 PreReq: mysql, zlib |
58 %endif |
59 %endif |
59 %if "%{with_openldap}" == "yes" |
60 %if "%{with_openldap}" == "yes" |
60 BuildPreReq: openldap |
61 BuildPreReq: openldap, pkgconfig |
61 PreReq: openldap |
62 PreReq: openldap |
62 %endif |
63 %endif |
63 %if "%{with_pgsql}" == "yes" |
64 %if "%{with_pgsql}" == "yes" |
64 BuildPreReq: postgresql |
65 BuildPreReq: postgresql |
65 PreReq: postgresql |
66 PreReq: postgresql |
66 %endif |
67 %endif |
67 %if "%{with_snmp}" == "yes" |
68 %if "%{with_snmp}" == "yes" |
68 BuildPreReq: snmp |
69 BuildPreReq: snmp |
69 PreReq: snmp |
70 PreReq: snmp |
70 %endif |
71 %endif |
71 AutoReq: no |
|
72 AutoReqProv: no |
|
73 |
72 |
74 %description |
73 %description |
75 FreeRADIUS is one of the most modular and featureful RADIUS servers |
74 FreeRADIUS is one of the most modular and featureful RADIUS servers |
76 available today. It has been written by a team of developers who |
75 available today. It has been written by a team of developers who |
77 have more than a decade of collective experience in implementing |
76 have more than a decade of collective experience in implementing |
91 %{l_shtool} subst \ |
90 %{l_shtool} subst \ |
92 -e 's; */usr/\(include/postgresql\);%{l_prefix}/\1;g' \ |
91 -e 's; */usr/\(include/postgresql\);%{l_prefix}/\1;g' \ |
93 -e 's; */usr/local/pgsql/include;;g' \ |
92 -e 's; */usr/local/pgsql/include;;g' \ |
94 -e 's; */usr/include/pgsql;;g' \ |
93 -e 's; */usr/include/pgsql;;g' \ |
95 src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure |
94 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" \ |
|
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 |
|
112 %endif |
|
113 |
95 |
114 %build |
96 %build |
115 # configure package |
97 # configure package |
|
98 extlib='' |
|
99 %if "%{with_pgsql}" == "yes" |
|
100 extlib="`%{l_prefix}/bin/pg_config --libs`" |
|
101 %endif |
|
102 %if "%{with_openldap}" == "yes" |
|
103 extlib="$extlib `%{l_prefix}/bin/pkg-config --libs openldap`" \ |
|
104 %endif |
116 CC="%{l_cc}" \ |
105 CC="%{l_cc}" \ |
117 CFLAGS="-I`pwd`/src/include %{l_cflags -O} %{l_cppflags}" \ |
106 CFLAGS="-I`pwd`/src/include %{l_cflags -O} %{l_cppflags}" \ |
118 CPPFLAGS="%{l_cppflags}" \ |
107 CPPFLAGS="%{l_cppflags}" \ |
119 LDFLAGS="%{l_ldflags}" \ |
108 LDFLAGS="%{l_ldflags}" \ |
120 %if "%{with_openldap}" == "yes" |
109 %if "%{with_openldap}" == "yes" |
121 LIBS="-llber -lssl -lcrypto -lreadline" \ |
110 LIBS="$extlib" \ |
122 %endif |
111 %endif |
123 ./configure \ |
112 ./configure \ |
124 --prefix=%{l_prefix} \ |
113 --prefix=%{l_prefix} \ |
125 --libdir=%{l_prefix}/lib/freeradius \ |
114 --libdir=%{l_prefix}/lib/freeradius \ |
126 --mandir=%{l_prefix}/man \ |
115 --mandir=%{l_prefix}/man \ |