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