2 # spec file for package freeradius (Version 1.0.3)
4 # Copyright (c) 2004 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
8 # Please submit bugfixes or comments via http://www.suse.de/feedback/
11 %define _oracle_support 0
13 # neededforbuild cyrus-sasl-devel db-devel heimdal-devel heimdal-lib mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel pam-devel postgresql postgresql-devel postgresql-libs python python-devel unixODBC unixODBC-devel
15 BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv less libacl libattr libgcc libnscd libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace syslogd sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils cyrus-sasl-devel db-devel e2fsprogs-devel gcc gdbm gettext heimdal-devel heimdal-lib libtool mysql-devel mysql-shared openldap2 openldap2-devel openssl-devel pam-devel perl postgresql postgresql-devel postgresql-libs python python-devel rpm unixODBC unixODBC-devel
19 Group: Productivity/Networking/Radius/Servers
21 Conflicts: radiusd-livingston radiusd-cistron icradius
24 URL: http://www.freeradius.org/
25 Summary: Very highly Configurable Radius-Server
26 Source0: %{name}-%{version}.tar.gz
27 %if %suse_version > 800
28 PreReq: /usr/sbin/useradd /usr/sbin/groupadd
29 PreReq: %insserv_prereq %fillup_prereq
31 BuildRoot: %{_tmppath}/%{name}-%{version}-build
35 The FreeRADIUS server has a number of features found in other servers,
36 and additional features not found in any other server. Rather than
37 doing a feature by feature comparison, we will simply list the features
38 of the server, and let you decide if they satisfy your needs.
40 Support for RFC and VSA Attributes Additional server configuration
41 attributes Selecting a particular configuration Authentication methods
48 Miquel van Smoorenburg <miquels@cistron.nl>
49 Alan DeKok <aland@ox.org>
50 Mike Machado <mike@innercite.com>
55 BuildRequires: oracle-instantclient-basic oracle-instantclient-devel
56 Group: Productivity/Networking/Radius/Servers
57 Summary: FreeRADIUS Oracle database support
58 Requires: oracle-instantclient-basic
62 The FreeRADIUS server has a number of features found in other servers,
63 and additional features not found in any other server. Rather than
64 doing a feature by feature comparison, we will simply list the features
65 of the server, and let you decide if they satisfy your needs.
67 Support for RFC and VSA Attributes Additional server configuration
68 attributes Selecting a particular configuration Authentication methods
71 Group: Productivity/Networking/Radius/Servers
72 Summary: FreeRADIUS web interface
73 Requires: perl-DateManip, php4, apache2-mod_php4
76 %description dialupadmin
77 This is the FreeRADIUS web interface.
81 Group: Development/Libraries/C and C++
82 Summary: FreeRADIUS Development Files (static libs)
86 These are the static libraries for the FreeRADIUS package.
92 Miquel van Smoorenburg <miquels@cistron.nl>
93 Alan DeKok <aland@ox.org>
94 Mike Machado <mike@innercite.com>
100 rm -rf `find . -name CVS`
103 CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure \
104 --prefix=%{_prefix} \
105 --sysconfdir=%{_sysconfdir} \
106 --infodir=%{_infodir} \
107 --mandir=%{_mandir} \
108 --libdir=/usr/lib/freeradius \
109 --localstatedir=/var \
114 --disable-ltdl-install \
115 --with-ltdl-lib=/usr/lib \
116 --with-ltdl-include=/usr/include \
118 %if %suse_version <= 920
119 --enable-heimdal-krb5 \
120 --with-rlm-krb5-include-dir=/usr/include/heimdal/ \
122 --with-rlm-krb5-lib-dir=%{_libdir} \
124 %if %_oracle_support == 1
125 --with-rlm_sql_oracle \
126 --with-oracle-lib-dir=/usr/lib/oracle/10.1.0.3/client/lib/ \
128 --without-rlm_sql_oracle \
130 --enable-strict-dependencies
134 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf \
136 mkdir -p $RPM_BUILD_ROOT
137 mkdir -p $RPM_BUILD_ROOT/var/lib/radiusd
138 make install R=$RPM_BUILD_ROOT
139 # modify default configuration
140 RADDB=$RPM_BUILD_ROOT%{_sysconfdir}/raddb
141 perl -i -pe 's/^#user =.*$/user = radiusd/' $RADDB/radiusd.conf
142 perl -i -pe 's/^#group =.*$/group = radiusd/' $RADDB/radiusd.conf
143 ldconfig -n $RPM_BUILD_ROOT/usr/lib/freeradius
145 touch $RPM_BUILD_ROOT/var/log/radius/radutmp
147 install -d $RPM_BUILD_ROOT/etc/pam.d
148 install -d $RPM_BUILD_ROOT/etc/logrotate.d
149 %if %suse_version >= 930
150 install -m 644 suse/radiusd-pam $RPM_BUILD_ROOT/etc/pam.d/radiusd
152 #install -m 644 suse/radiusd-pam-old $RPM_BUILD_ROOT/etc/pam.d/radiusd
153 install -m 644 suse/radiusd-pam $RPM_BUILD_ROOT/etc/pam.d/radiusd
155 install -m 644 suse/radiusd-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
156 install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
157 install -m 744 suse/rcradiusd $RPM_BUILD_ROOT/etc/init.d/radiusd
158 #install -d -m 744 $RPM_BUILD_ROOT/usr/share/dialup_admin
159 DIALUPADMIN=$RPM_BUILD_ROOT/usr/share/freeradius-dialupadmin
160 cp -R dialup_admin $DIALUPADMIN
161 perl -i -pe 's/^#general_base_dir\:.*$/general_base_dir\: \/usr\/share\/freeradius-dialupadmin/' $DIALUPADMIN/conf/admin.conf
162 perl -i -pe 's/^#general_radiusd_base_dir\:.*$/general_radiusd_base_dir\: \//' $DIALUPADMIN/conf/admin.conf
163 perl -i -pe 's/^#general_snmpwalk_command\:.*$/general_snmpwalk_command\: \/usr\/bin\/snmpwalk/' $DIALUPADMIN/conf/admin.conf
164 perl -i -pe 's/^#general_snmpget_command\:.*$/general_snmpget_command\: \/usr\/bin\/snmpget/' $DIALUPADMIN/conf/admin.conf
165 ln -sf ../../etc/init.d/radiusd $RPM_BUILD_ROOT/usr/sbin/rcradiusd
166 mv -v doc/README doc/README.doc
167 # remove unneeded stuff
169 rm -f $RPM_BUILD_ROOT/etc/raddb/experimental.conf $RPM_BUILD_ROOT/usr/sbin/radwatch $RPM_BUILD_ROOT/usr/sbin/rc.radiusd
170 rm -rf $RPM_BUILD_ROOT/usr/share/doc/freeradius*
173 /usr/sbin/groupadd -r radiusd 2> /dev/null || :
174 /usr/sbin/useradd -r -g radiusd -s /bin/false -c "Radius daemon" -d \
175 /var/lib/radiusd radiusd 2> /dev/null || :
178 %{fillup_and_insserv -s radiusd START_RADIUSD }
179 %if %suse_version > 820
182 %stop_on_removal radiusd
186 %if %suse_version > 820
187 %restart_on_update radiusd
192 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
195 %defattr(-,root,root)
197 %doc %attr(-,root,root) $RPM_SOURCE_DIR/README.SuSE
198 %doc doc/* LICENSE COPYRIGHT CREDITS README
199 %doc src/modules/rlm_sql/drivers/rlm_sql_*/*.sql
200 %doc scripts/create-users.pl scripts/CA.* scripts/certs.sh
201 %doc scripts/users2mysql.pl scripts/xpextensions
202 %doc scripts/cryptpasswd scripts/exec-program-wait scripts/radiusd2ldif.pl
203 # SUSE support scripts
204 %config /etc/init.d/radiusd
205 %config /etc/pam.d/radiusd
206 %config /etc/logrotate.d/radiusd
208 %dir %attr(755,radiusd,radiusd) /var/lib/radiusd
211 %defattr(-,root,radiusd)
212 %config /etc/raddb/dictionary
213 %config(noreplace) /etc/raddb/acct_users
214 %config(noreplace) /etc/raddb/attrs
215 %attr(640,-,radiusd) %ghost %config(noreplace) /etc/raddb/clients
216 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/clients.conf
217 %config(noreplace) /etc/raddb/hints
218 %config(noreplace) /etc/raddb/huntgroups
219 %config(noreplace) /etc/raddb/ldap.attrmap
220 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/mssql.conf
221 %ghost %config(noreplace) /etc/raddb/naslist
222 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/naspasswd
223 %attr(640,-,radiusd) %ghost %config(noreplace) /etc/raddb/oraclesql.conf
224 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/postgresql.conf
225 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/preproxy_users
226 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/proxy.conf
227 %config(noreplace) /etc/raddb/radiusd.conf
228 %ghost %config(noreplace) /etc/raddb/realms
229 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/snmp.conf
230 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/sql.conf
231 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/users
232 %config(noreplace) /etc/raddb/x99.conf
233 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/x99passwd.sample
234 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/certs
235 %attr(640,-,radiusd) %config(noreplace) /etc/raddb/eap.conf
236 %attr(700,radiusd,radiusd) %dir /var/run/radiusd/
238 %defattr(-,root,root)
240 /usr/sbin/check-radiusd-config
244 %attr(755,root,root) %dir /usr/lib/freeradius
245 %attr(755,root,root) /usr/lib/freeradius/*.so*
247 %doc %{_mandir}/man1/*
248 %doc %{_mandir}/man5/*
249 %doc %{_mandir}/man8/*
251 %attr(755,root,root) %dir /usr/share/freeradius
252 /usr/share/freeradius/*
254 %attr(700,radiusd,radiusd) %dir /var/log/radius/
255 %attr(700,radiusd,radiusd) %dir /var/log/radius/radacct/
256 %attr(644,radiusd,radiusd) /var/log/radius/radutmp
259 %defattr(-,root,root)
260 /usr/lib/freeradius/*.a
261 %attr(644,root,root) /usr/lib/freeradius/*.la
264 %if %_oracle_support == 1
266 %defattr(-,root,root)
267 %attr(755,root,root) %dir /usr/lib/freeradius
268 %attr(755,root,root) /usr/lib/freeradius/rlm_sql_oracle*.so*
272 %dir %attr(755,root,root) /usr/share/freeradius-dialupadmin
273 %config /usr/share/freeradius-dialupadmin/conf
274 /usr/share/freeradius-dialupadmin/*