]> git.pld-linux.org Git - packages/freeradius.git/blob - freeradius.spec
- force to use openssl >= 0.9.7, idea by kloczek
[packages/freeradius.git] / freeradius.spec
1 %include        /usr/lib/rpm/macros.python
2 %include        /usr/lib/rpm/macros.perl
3 # FIXME: won't be good to include these contrib examples?
4 # Source1:      http://www.ping.de/~fdc/radius/radacct-replay
5 # Source2:      http://www.ping.de/~fdc/radius/radlast-0.03
6 # Source3:      ftp://ftp.freeradius.org/pub/radius/contrib/radwho.cgi
7 Summary:        High-performance and highly configurable RADIUS server
8 Summary(pl):    Szybki i wysoce konfigurowalny serwer RADIUS
9 Name:           freeradius
10 Version:        0.7
11 Release:        0
12 License:        GPL
13 Group:          Networking/Daemons
14 Source0:        ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz
15 Source1:        %{name}.logrotate
16 Source2:        %{name}.init
17 Source3:        %{name}.pam
18 URL:            http://www.freeradius.org/
19 Prereq:         /sbin/chkconfig
20 Requires:       libtool
21 BuildRequires:  gdbm-devel
22 BuildRequires:  libltdl-devel
23 BuildRequires:  mysql-devel
24 BuildRequires:  openldap-devel
25 BuildRequires:  openssl-devel >= 0.9.7
26 BuildRequires:  pam-devel
27 BuildRequires:  perl-devel
28 BuildRequires:  postgresql-backend-devel
29 BuildRequires:  postgresql-devel
30 BuildRequires:  python-devel
31 BuildRequires:  ucd-snmp-devel
32 BuildRequires:  ucd-snmp-utils
33 BuildRequires:  unixODBC-devel
34 BuildRequires:  rpm-perlprov
35 BuildRequires:  rpm-pythonprov
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Obsoletes:      cistron-radius
38
39 %define         _localstatedir  %{_var}/lib/freeradius
40
41 %description
42 The FreeRADIUS Server Project is an attempt to create a
43 high-performance and highly configurable GPL'd RADIUS server. It is
44 generally similar to the Livingston 2.0 RADIUS server, but has a lot
45 more features, and is much more configurable.
46
47 %description -l pl
48 Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce
49 konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do
50 Livingston 2.0 RADIUS server ale ma o wiele wiêcej ficzersów i jest
51 bardziej podatny na konfiguracjê.
52
53 %prep
54 %setup -q
55
56 %build
57 touch src/modules/rlm_eap/types/rlm_eap_tls/config.h
58
59 %configure2_13 \
60         --with-system-libtool \
61         --enable-strict-dependencies \
62         --with-logdir=%{_var}/log/freeradius \
63         --with-experimental-modules \
64         --with-threads \
65         --with-thread-pool \
66         --with-gnu-ld \
67         --with-ltdl-include=%{_includedir}/none \
68         --with-ltdl-lib=%{_libdir} \
69         --disable-ltdl-install \
70         --without-rlm_krb5
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,rc.d/init.d,raddb}
76 install -d $RPM_BUILD_ROOT%{_var}/log/radius
77
78 %{__make} install \
79         R=$RPM_BUILD_ROOT
80
81 rm -f $RPM_BUILD_ROOT{%{_mandir}/man8/builddbm.8,%{_sbindir}/rc.radiusd}
82 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/raddb/{clients,*.pl}
83
84 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
85 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
86 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/pam.d/radius
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %pre
92 if [ -n "`id -u radius 2>/dev/null`" ]; then
93         if [ "`id -u radius`" != "29" ]; then
94                 echo "Error: user radius doesn't have uid=29. Correct this before installing radius server." 1>&2
95                 exit 1
96         fi
97 else
98         /usr/sbin/useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g nobody radius 1>&2
99 fi
100         
101 %post
102 /sbin/chkconfig --add %{name}
103 if [ -f /var/lock/subsys/%{name} ]; then
104         /etc/rc.d/init.d/%{name} restart 1>&2
105 else
106         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
107 fi
108
109 %preun
110 if [ "$1" = "0" ]; then
111         if [ -f /var/lock/subsys/%{name} ]; then
112                 /etc/rc.d/init.d/%{name} stop 1>&2
113         fi
114         /sbin/chkconfig --del %{name}
115 fi
116
117 %postun
118 if [ "$1" = "0" ]; then
119         /usr/sbin/userdel %{name}
120 fi
121
122 %files
123 %defattr(644,root,root,755)
124 %doc doc/*
125 %attr(755,root,root) %{_bindir}/*
126 %attr(755,root,root) %{_sbindir}/*
127 %attr(755,root,root) %{_libdir}/*.so
128 %{_libdir}/*.la
129
130 %dir %{_sysconfdir}/raddb
131 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/raddb/*
132
133 %dir %{_var}/log/%{name}
134 %dir %{_var}/log/%{name}/radacct
135
136 %attr(754,root,root) /etc/rc.d/init.d/%{name}
137 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/*
138 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/*
139
140 %{_mandir}/man?/*
This page took 0.089505 seconds and 4 git commands to generate.