]> git.pld-linux.org Git - packages/freeradius.git/blob - freeradius.spec
e3f019bd277fd4496a60fd1f23b0ba7927c84d29
[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 %description
33 The FreeRADIUS Server Project is an attempt to create a
34 high-performance and highly configurable GPL'd RADIUS server. It is
35 generally similar to the Livingston 2.0 RADIUS server, but has a lot
36 more features, and is much more configurable.
37
38 %description -l pl
39 Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce
40 konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do
41 Livingston 2.0 RADIUS server ale ma o wiele wiêcej ficzersów i jest
42 bardziej podatny na konfiguracjê.
43
44 %prep 
45 %setup -q
46
47 # FIXME: some folks prefer -dist files ... rename them or not?
48 #cd raddb
49 #chmod 640 clients naspasswd radiusd.conf.in
50 #cd ..
51
52 %build
53 #libtoolize --copy --force
54 #aclocal
55 #autoconf
56 #automake -a -c
57
58 %configure2_13 --localstatedir=%{_localstatedir} \
59         --with-threads \
60         --with-thread-pool \
61         --with-gnu-ld \
62         --disable-ltdl-install
63 %{__make}
64
65 libtool --finish %{_libdir}
66
67 %install
68 # prepare $RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,rc.d/init.d}
71
72 # install files
73 %{__make} install R=$RPM_BUILD_ROOT
74 # done here & put noreplace in %files to avoid messing up existing installations
75 for i in radutmp radwtmp  radius.log radwatch.log checkrad.log
76 do
77   touch  $RPM_BUILD_ROOT%{_localstatedir}/log/$i
78   echo  $RPM_BUILD_ROOT%{_localstatedir}/log/$i
79   #who the hell should own logfiles/ and what sgid should have radiusd ?
80 # do we need %{_sysconfdir}/shadow do be +r for wheel ? or better use PAM ?
81   # Hunter
82 done
83
84
85 # remove unneeded stuff
86 rm -f $RPM_BUILD_ROOT%{_prefix}/{man/man8/builddbm.8,sbin/rc.radiusd}
87
88 cd redhat
89 install -m 555 rc.radiusd-redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/radiusd
90 install radiusd-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
91 install radiusd-pam       $RPM_BUILD_ROOT/etc/pam.d/radius
92 cd ..
93
94 gzip -9nf doc/ChangeLog doc/README* COPYRIGHT
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 /sbin/chkconfig --add radiusd.init
101
102 %preun
103 if [ "$1" = "0" ]; then
104         /sbin/chkconfig --del radiusd.init
105 fi
106
107 %files
108 %defattr(644,root,root,755)
109 %doc doc/ChangeLog.gz doc/README*.gz todo COPYRIGHT.gz
110 %config(noreplace) %verify(not size mtime md5) /etc/pam.d/radius
111 %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/radiusd
112 %config(noreplace) %verify(not size mtime md5) /etc/rc.d/init.d/radiusd
113 %config %{_sysconfdir}/raddb/*
114 %{_mandir}/*
115 %attr(755,root,root) %{_bindir}/*
116 %attr(755,root,root) %{_sbindir}/*
117 %{_libdir}/*
118 %dir %{_localstatedir}/log/radacct/
119 %config(missingok noreplace) %{_localstatedir}/log/checkrad.log
120 %config(missingok noreplace) %{_localstatedir}/log/radwatch.log
121 %config(missingok noreplace) %{_localstatedir}/log/radius.log
122 %config(missingok noreplace) %{_localstatedir}/log/radwtmp
123 %config(missingok noreplace) %{_localstatedir}/log/radutmp
This page took 0.088903 seconds and 3 git commands to generate.