30 Distribution: OpenPKG Community |
30 Distribution: OpenPKG Community |
31 Class: EVAL |
31 Class: EVAL |
32 Group: RADIUS |
32 Group: RADIUS |
33 License: BSD-style |
33 License: BSD-style |
34 Version: 0.5.6 |
34 Version: 0.5.6 |
35 Release: 20080317 |
35 Release: 20080620 |
|
36 |
|
37 # package options |
|
38 %option with_fsl yes |
|
39 %option with_brokenlibc no |
|
40 |
36 |
41 |
37 # list of sources |
42 # list of sources |
38 Source0: http://download.berlios.de/radiusclient-ng/radiusclient-ng-%{version}.tar.gz |
43 Source0: ftp://ftp.iptel.org/pub/radiusclient-ng/radiusclient-ng-%{version}.tar.gz |
|
44 Source2: fsl.radiusclient |
39 Patch0: radiusclient.patch |
45 Patch0: radiusclient.patch |
|
46 Patch1: radiusclient.patch.libc |
40 |
47 |
41 # build information |
48 # build information |
42 Prefix: %{l_prefix} |
49 Prefix: %{l_prefix} |
43 BuildRoot: %{l_buildroot} |
50 BuildRoot: %{l_buildroot} |
44 BuildPreReq: OpenPKG, openpkg >= 20060823 |
51 BuildPreReq: OpenPKG, openpkg >= 20060823 |
45 PreReq: OpenPKG, openpkg >= 20060823 |
52 PreReq: OpenPKG, openpkg >= 20060823 |
|
53 %if "%{with_fsl}" == "yes" |
|
54 BuildPreReq: fsl |
|
55 PreReq: fsl |
|
56 %endif |
46 AutoReq: no |
57 AutoReq: no |
47 AutoReqProv: no |
58 AutoReqProv: no |
48 |
59 |
49 %description |
60 %description |
50 This is a RADIUS client library and corresponding tools. |
61 This is a RADIUS client library and corresponding tools. |
51 |
62 |
52 %track |
63 %track |
53 prog radiusclient = { |
64 prog radiusclient = { |
54 version = %{version} |
65 version = %{version} |
55 url = http://prdownload.berlios.de/radiusclient-ng/ |
66 url = ftp://ftp.iptel.org/pub/radiusclient-ng/ |
56 regex = radiusclient-ng-(__VER__)\.tar\.gz |
67 regex = radiusclient-ng-(__VER__)\.tar\.gz |
57 } |
68 } |
58 |
69 |
59 %prep |
70 %prep |
60 %setup -q -n radiusclient-ng-%{version} |
71 %setup -q -n radiusclient-ng-%{version} |
61 %patch -p0 |
72 %patch -p0 |
|
73 %if "%{with_brokenlibc}" == "yes" |
|
74 %patch -p0 -P 1 |
|
75 %endif |
62 |
76 |
63 %build |
77 %build |
64 CC="%{l_cc}" \ |
78 CC="%{l_cc}" \ |
65 CFLAGS="%{l_cflags -O}" \ |
79 CFLAGS="%{l_cflags -O}" \ |
66 CPPFLAGS="%{l_cppflags}" \ |
80 CPPFLAGS="%{l_cppflags}" \ |
67 LDFLAGS="%{l_ldflags}" \ |
81 LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ |
|
82 LIBS="%{l_fsl_libs}" \ |
|
83 GREP="grep" \ |
68 ./configure \ |
84 ./configure \ |
69 --prefix=%{l_prefix} \ |
85 --prefix=%{l_prefix} \ |
70 --sysconfdir=%{l_prefix}/etc/radiusclient \ |
86 --sysconfdir=%{l_prefix}/etc/radiusclient \ |
71 --disable-shared |
87 --disable-shared |
72 %{l_make} %{l_mflags -O} |
88 %{l_make} %{l_mflags -O} |
73 |
89 |
74 %install |
90 %install |
75 rm -rf $RPM_BUILD_ROOT |
91 rm -rf $RPM_BUILD_ROOT |
76 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
92 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
|
93 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/radiusclient |
|
94 touch $RPM_BUILD_ROOT%{l_prefix}/var/radiusclient/radius.seq |
|
95 mv \ |
|
96 $RPM_BUILD_ROOT%{l_prefix}/include/radiusclient-ng.h \ |
|
97 $RPM_BUILD_ROOT%{l_prefix}/include/radiusclient.h |
77 rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/login.radius |
98 rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/login.radius |
78 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true |
99 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true |
79 mv $RPM_BUILD_ROOT%{l_prefix}/include/radiusclient-ng.h \ |
100 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl |
80 $RPM_BUILD_ROOT%{l_prefix}/include/radiusclient.h |
101 %{l_shtool} install -c -m 644 %{l_value -s -a} \ |
|
102 %{SOURCE fsl.radiusclient} \ |
|
103 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ |
|
104 |
81 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
105 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
82 %{l_files_std} \ |
106 %{l_files_std} \ |
83 '%config %{l_prefix}/etc/radiusclient/*' |
107 '%not %dir %{l_prefix}/etc/fsl' \ |
|
108 '%config %{l_prefix}/etc/radiusclient/*' \ |
|
109 '%attr(640,%{l_mgrp},%{l_rgrp}) %{l_prefix}/etc/radiusclient/servers' \ |
|
110 '%attr(644,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/radiusclient/radius.seq' |
84 |
111 |
85 %files -f files |
112 %files -f files |
86 |
113 |
87 %clean |
114 %clean |
88 rm -rf $RPM_BUILD_ROOT |
115 rm -rf $RPM_BUILD_ROOT |
89 |
116 |
|
117 %preun |
|
118 [ $1 -eq 0 ] || exit 0 |
|
119 rm -f $RPM_INSTALL_PREFIX/var/radiusclient/*.log >/dev/null 2>&1 || true |
|
120 exit 0 |
|
121 |