]> git.pld-linux.org Git - packages/freeradius.git/blob - freeradius.spec
- changed to %%%configure2_13, to make it build
[packages/freeradius.git] / freeradius.spec
1 # FIXME: find a way of getting rid of "-" on versions ... rpm will be happy
2 Summary:        High-performance and highly configurable RADIUS server
3 Summary(pl):    Szybki i wysoce konfigurowalny serwer RADIUS.
4 Name:           freeradius
5 Version:        0.1
6 Release:        0
7 License:        GPL
8 Group:          Networking/Daemons
9 Group(de):      Netzwerkwesen/Server
10 Group(pl):      Sieciowe/Serwery
11 Source0:        ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz
12 URL:            http://www.freeradius.org/
13 Prereq:         /sbin/chkconfig
14 # FIXME: snmpwalk, snmpget and rusers POSSIBLY needed by checkrad
15 Requires:       libtool
16 BuildRequires:  libltdl-devel
17 BuildRequires:  openldap-devel
18 #someone's help needed:split&test into %{name}-{mysql,pgsql,common,devel,static,ldap,pam?} hunter.
19 BuildRequires:  mysql-devel
20 BuildRequires:  postgresql-devel
21 BuildRequires:  pam-devel
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Obsoletes:      cistron-radius
24
25 %define         _localstatedir  /var/radius
26
27 # FIXME: won't be good to include these contrib examples?
28 # Source1:      http://www.ping.de/~fdc/radius/radacct-replay
29 # Source2:      http://www.ping.de/~fdc/radius/radlast-0.03
30 # Source3:      ftp://ftp.freeradius.org/pub/radius/contrib/radwho.cgi
31
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 The FreeRADIUS Server Project is an attempt to create a
36 high-performance and highly configurable GPL'd RADIUS server. It is
37 generally similar to the Livingston 2.0 RADIUS server, but has a lot
38 more features, and is much more configurable.
39
40 %description(pl)
41 Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce
42 konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do
43 Livingston 2.0 RADIUS server ale ma o wiele wiêcej ficzersów i jest
44 bardziej podatny na konfiguracjê.
45
46 %prep 
47 %setup -q
48
49 # FIXME: some folks prefer -dist files ... rename them or not?
50 #cd raddb
51 #chmod 640 clients naspasswd radiusd.conf.in
52 #cd ..
53
54 %build
55 CFLAGS="%{rpmcflags}" 
56 #libtoolize --copy --force
57 #aclocal
58 #autoconf
59 #automake -a -c
60
61 %configure2_13 --localstatedir=%{_localstatedir} \
62         --with-threads \
63         --with-thread-pool \
64         --with-gnu-ld \
65         --disable-ltdl-install
66 %{__make}
67
68 libtool --finish %{_libdir}
69
70 %install
71 # prepare $RPM_BUILD_ROOT
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,rc.d/init.d}
74
75 # install files
76 %{__make} install R=$RPM_BUILD_ROOT
77 # done here & put noreplace in %files to avoid messing up existing installations
78 for i in radutmp radwtmp  radius.log radwatch.log checkrad.log
79 do
80   touch  $RPM_BUILD_ROOT%{_localstatedir}/log/$i
81   echo  $RPM_BUILD_ROOT%{_localstatedir}/log/$i
82   #who the hell should own logfiles/ and what sgid should have radiusd ?
83 # do we need %{_sysconfdir}/shadow do be +r for wheel ? or better use PAM ?
84   # Hunter
85 done
86
87
88 # remove unneeded stuff
89 %{__rm} -f $RPM_BUILD_ROOT%{_prefix}/{man/man8/builddbm.8,sbin/rc.radiusd}
90
91 cd redhat
92 install -m 555 rc.radiusd-redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/radiusd
93 install radiusd-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
94 install radiusd-pam       $RPM_BUILD_ROOT/etc/pam.d/radius
95 cd ..
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %post
101 /sbin/chkconfig --add radiusd.init
102
103 %preun
104 if [ "$1" = "0" ]; then
105         /sbin/chkconfig --del radiusd.init
106 fi
107
108 %files
109 %defattr(644,root,root,755)
110 %doc doc/ChangeLog doc/README* todo/ COPYRIGHT INSTALL
111 %config /etc/pam.d/radius
112 %config /etc/logrotate.d/radiusd
113 %config /etc/rc.d/init.d/radiusd
114 %config %{_sysconfdir}/raddb/*
115 %{_prefix}/man/*
116 %attr(755,root,root) %{_bindir}/*
117 %attr(755,root,root) %{_sbindir}/*
118 %{_libdir}/*
119 %dir %{_localstatedir}/log/radacct/
120 %config(missingok noreplace) %{_localstatedir}/log/checkrad.log
121 %config(missingok noreplace) %{_localstatedir}/log/radwatch.log
122 %config(missingok noreplace) %{_localstatedir}/log/radius.log
123 %config(missingok noreplace) %{_localstatedir}/log/radwtmp
124 %config(missingok noreplace) %{_localstatedir}/log/radutmp
This page took 0.073563 seconds and 4 git commands to generate.