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