Added ucdsnmp dependency to the SuSE spec file
[freeradius.git] / suse / freeradius.spec
1 #
2 # spec file to build FreeRadius on SuSE/United Linux
3 #
4 # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please send bugfixes or comments to nix@susesecurity.com.
9 #
10
11 # neededforbuild  cyrus-sasl-devel heimdal-devel heimdal-lib mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel postgresql postgresql-devel postgresql-libs python python-devel unixODBC unixODBC-devel ucdsnmp
12 # usedforbuild    aaa_base aaa_version acl attr bash bind9-utils bison cpio cpp cyrus-sasl db devs diffutils e2fsprogs file filesystem fileutils fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip kbd less libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail sh-utils shadow strace syslogd sysvinit tar texinfo textutils timezone unzip util-linux vim zlib-devel autoconf automake binutils bzip2 cracklib cyrus-sasl-devel gcc gdbm gettext heimdal-devel heimdal-lib libtool mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel perl postgresql postgresql-devel postgresql-libs python python-devel rpm unixODBC unixODBC-devel zlib ucdsnmp
13
14 Name:         freeradius
15 License:      GPL
16 Group:        Productivity/Networking/Radius/Servers
17 Packager:     FreeRADIUS.org
18 Provides:     radiusd
19 Conflicts:    radiusd-livingston radiusd-cistron icradius
20 Version:      0.8
21 Release:      0
22 URL:          http://www.freeradius.org/
23 Summary:      Very high configurable Radius-server
24 Source0:      %{name}-%{version}.tar.gz
25 #Source0:      freeradius-snapshot-20021107.tar.gz
26 Source1:      rcradiusd
27 Source2:      radiusd-pam
28 Source3:      radiusd-logrotate
29 #Patch:        krb5.dif
30 #Patch1:       ltconfig.dif
31 %if %suse_version > 800
32 PreReq:       %insserv_prereq %fillup_prereq
33 %endif
34 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
35         
36 %description
37 The FreeRADIUS server has a number of features which are found in other
38 servers, and additional features which are not found in any other server.
39 Rather than doing a feature by feature comparison, we will simply list
40 the features of the server, and let you decide if they satisfy your needs.
41
42 Support for RFC and VSA Attributes
43 Additional server configuration attributes
44 Selecting a particular configuration
45 Authentication methods
46 Accounting methods
47
48 Authors:
49 --------
50     Miquel van Smoorenburg <miquels@cistron.nl>
51     Alan DeKok <aland@ox.org>
52     Mike Machado <mike@innercite.com>
53     Alan Curry
54     various other people
55
56 %package devel
57 Group:        Development/Libraries/C and C++
58 Summary:      FreeRADIUS development files (static libs)
59
60 %description devel
61 These are the static libraries of the FreeRADIUS package
62
63 Authors:
64 --------
65     Miquel van Smoorenburg <miquels@cistron.nl>
66     Alan DeKok <aland@ox.org>
67     Mike Machado <mike@innercite.com>
68     Alan Curry
69     various other people
70
71 %prep
72 #%setup -n freeradius-snapshot-20021107
73 %setup
74 #%patch
75 #%patch1
76 # activate configure patch for heimdal
77 #(cd src/modules/rlm_krb5; autoconf --include ../../../)
78
79 %build
80 CFLAGS="$RPM_OPT_FLAGS" ./configure \
81                 --prefix=%{_prefix} \
82                 --sysconfdir=%{_sysconfdir} \
83                 --infodir=%{_infodir} \
84                 --mandir=%{_mandir} \
85                 --libdir=%{_libdir} \
86                 --localstatedir=/var \
87                 --with-threads \
88                 --with-thread-pool \
89                 --with-system-libtool \
90                 --disable-ltdl-install \
91                 --with-ltdl-lib=/usr/lib \
92                 --with-ltdl-include=/usr/include \
93                 --with-gnu-ld \
94                 --without-rlm-krb5 
95 #               --enable-heimdal-krb5 
96 #               --with-rlm-krb5-include-dir=/usr/include/heimdal/ \
97 #               --with-rlm-krb5-lib-dir=%{_libdir}
98
99 make
100
101 %install
102 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf \
103 $RPM_BUILD_ROOT
104 mkdir -p $RPM_BUILD_ROOT
105 make install R=$RPM_BUILD_ROOT
106 ldconfig -n $RPM_BUILD_ROOT%{_libdir}
107 # logs
108 touch $RPM_BUILD_ROOT/var/log/radius/radius.log
109 #touch $RPM_BUILD_ROOT/var/log/radius/radwatch.log
110 touch $RPM_BUILD_ROOT/var/log/radius/radwtmp
111 touch $RPM_BUILD_ROOT/var/log/radius/radutmp
112 # SuSE
113 install -d     $RPM_BUILD_ROOT/etc/pam.d
114 install -d     $RPM_BUILD_ROOT/etc/logrotate.d
115 install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/pam.d/radiusd
116 install -m 644 %SOURCE3 $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
117 install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
118 install    -m 744 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/radiusd
119 ln -sf ../../etc/init.d/radiusd $RPM_BUILD_ROOT/usr/sbin/rcradiusd
120 mv -v doc/README doc/README.doc
121
122 %post
123 %{fillup_and_insserv -s radiusd START_RADIUSD }
124
125 %postun
126 %{insserv_cleanup}
127
128 %clean
129 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
130
131 %files
132 # doc
133 %doc doc/* LICENSE COPYRIGHT CREDITS README 
134 %doc src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql
135 %doc scripts/create-users.pl
136 %doc scripts/cryptpasswd scripts/exec-program-wait scripts/radiusd2ldif.pl
137 # SuSE
138 %config /etc/init.d/radiusd
139 %config /etc/pam.d/radiusd
140 %config /etc/logrotate.d/radiusd
141 /usr/sbin/rcradiusd
142 # configs
143 %dir /etc/raddb
144 %config(noreplace) /etc/raddb/acct_users
145 %config(noreplace) /etc/raddb/attrs
146 %attr(640,root,root) %config(noreplace) /etc/raddb/clients
147 %attr(640,root,root) %config(noreplace) /etc/raddb/clients.conf
148 %config /etc/raddb/diction*
149 %config(noreplace) /etc/raddb/hints
150 %config(noreplace) /etc/raddb/huntgroups
151 %config(noreplace) /etc/raddb/ldap.attrmap
152 %attr(640,root,root) %config(noreplace) /etc/raddb/mssql.conf
153 %config(noreplace) /etc/raddb/naslist
154 %attr(640,root,root) %config(noreplace) /etc/raddb/naspasswd
155 %attr(640,root,root) %config(noreplace) /etc/raddb/postgresql.conf
156 %attr(640,root,root) %config(noreplace) /etc/raddb/preproxy_users
157 %attr(640,root,root) %config(noreplace) /etc/raddb/proxy.conf
158 %config(noreplace) /etc/raddb/radiusd.conf
159 %config(noreplace) /etc/raddb/realms
160 %attr(640,root,root) %config(noreplace) /etc/raddb/snmp.conf
161 %attr(640,root,root) %config(noreplace) /etc/raddb/sql.conf
162 %attr(640,root,root) %config(noreplace) /etc/raddb/users
163 %config(noreplace) /etc/raddb/x99.conf
164 %attr(640,root,root) %config(noreplace) /etc/raddb/x99passwd.sample
165 # binaries
166 /usr/bin/*
167 /usr/sbin/check-radiusd-config
168 /usr/sbin/checkrad
169 /usr/sbin/radiusd
170 #/usr/sbin/radwatch
171 # shared libs
172 /%{_libdir}/*.so*
173 /%{_libdir}/*.la*
174 # man-pages
175 %doc %{_mandir}/man1/*
176 %doc %{_mandir}/man5/*
177 %doc %{_mandir}/man8/*
178 # logs
179 %attr(700,root,root) %dir /var/log/radius/
180 %attr(700,root,root) %dir /var/log/radius/radacct/
181 %attr(700,root,root) %dir /var/run/radiusd/
182 /var/log/radius/radutmp
183 %ghost /var/log/radius/radwtmp
184 %ghost /var/log/radius/radius.log
185 #%ghost /var/log/radius/radwatch.log
186
187 %files devel
188 /%{_libdir}/*.a
189
190 %changelog -n freeradius
191 * Fri Nov 8 2002 - nix@susesecurity.com
192 - Removed radwatch from the spec file as it's no longer supported.
193 * Thu Nov 7 2002 - nix@susesecurity.com
194 - Merged some changes from stark@suse.de including if statement to
195   take care of > SuSE 8.0
196 * Wed Nov 6 2002 - nix@susesecurity.com
197 - Finally got modules working on SuSE 8.0
198 - added /var/run/radiusd to spec file
199 * Mon Nov 4 2002 - nix@susesecurity.com
200 - Received this spec file from stark@suse.de who said he had managed to hack it
201   enough to get a working FreeRadius0.8pre
202 - After commenting out some SuSE 8.1 specific and PPC specific stuff I managed
203   to get it to build on SuSE 8.0
204 - Modules still don't work