]> git.pld-linux.org Git - SPECS.git/blob - tacacs.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / tacacs.spec
1
2 %bcond_with     skey            # with S/KEY support
3 #skey_fn.c: In function 'skey_fn':
4 #skey_fn.c:167: error: too many arguments to function 'skeychallenge'
5
6 Summary:        TACACS+ daemon
7 Summary(pl.UTF-8):      Demon TACACS+
8 Name:           tacacs
9 Version:        F4.0.4.27a
10 Release:        1
11 License:        BSD-like, GPL
12 Group:          Networking/Daemons
13 Source0:        ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-%{version}.tar.gz
14 # Source0-md5:  55c9aaac4ea5263438919594bf537666
15 Source1:        %{name}.cfg
16 Source2:        %{name}.init
17 Source3:        %{name}.pam
18 Source6:        %{name}.rotate
19 Source8:        %{name}.sysconfig
20 URL:            http://www.shrubbery.net/tac_plus/
21 BuildRequires:  bison
22 BuildRequires:  flex
23 BuildRequires:  libtool
24 BuildRequires:  libwrap-devel
25 BuildRequires:  pam-devel
26 BuildRequires:  perl-base
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.268
29 %{?with_skey:BuildRequires:     skey-devel}
30 Requires(post,preun):   /sbin/chkconfig
31 Requires(postun):       /usr/sbin/groupdel
32 Requires(postun):       /usr/sbin/userdel
33 Requires(pre):  /bin/id
34 Requires(pre):  /usr/bin/getgid
35 Requires(pre):  /usr/sbin/groupadd
36 Requires(pre):  /usr/sbin/useradd
37 Requires(pre):  fileutils
38 Requires:       rc-scripts
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 # library use symbols provided by the binary
42 %define         skip_post_check_so      .*lib.*/libtacacs.so.*
43
44 %description
45 TACACS+ daemon using with Cisco's NASs (or other vendors) for AAA
46 (Authentication, Authorization and Accounting) propose.
47
48 %description -l pl.UTF-8
49 Demon TACACS+ używany wraz z NAS-ami Cisco (lub innych producentów) do
50 celów uwierzytelniania, autoryzacji i rozliczania (AAA -
51 Authentication, Authorization and Accounting).
52
53 %package devel
54 Summary:        Header files for tacacs+ library
55 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki tacacs+
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58
59 %description devel
60 Header files for tacacs+ library.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki tacacs+.
64
65 %package static
66 Summary:        Static tacacs+ library
67 Summary(pl.UTF-8):      Statyczna biblioteka tacacs+
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
72 Static tacacs+ library.
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka tacacs+.
76
77 %prep
78 %setup -q -n %{name}+-%{version}
79
80 %build
81 %configure \
82         --enable-finger \
83         --enable-maxsess \
84         --with-userid=29 \
85         --with-groupid=29 \
86         %{?with_skey:--with-skey}
87
88 %{__make} \
89         %{?with_skey:INCLUDES="-I%{_includedir}/security"}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/{logrotate.d,pam.d,rc.d/init.d,sysconfig},/var/log}
94
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
99 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
100 install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/tac_plus
101 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
102 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
103
104 for n in tac_plus.acct tac_plus.log tacwho.log; do
105         :> $RPM_BUILD_ROOT/var/log/$n
106 done
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %pre
112 %groupadd -g 29 -r -f radius
113 %useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g radius radius
114
115 %post
116 /sbin/ldconfig
117 for n in /var/log/{tac_plus.acct,tac_plus.log,tacwho.log}; do
118         [ -f $n ] && continue
119         touch $n
120         chmod 660 $n
121         chown root:radius $n
122 done
123 /sbin/chkconfig --add %{name}
124 %service %{name} restart
125
126 %preun
127 if [ "$1" = "0" ]; then
128         %service %{name} stop
129         /sbin/chkconfig --del %{name}
130 fi
131
132 %postun
133 /sbin/ldconfig
134 if [ "$1" = "0" ]; then
135         %userremove radius
136         %groupremove radius
137 fi
138
139 %files
140 %defattr(644,root,root,755)
141 %doc CHANGES COPYING FAQ users_guide
142 %attr(755,root,root) %{_bindir}/tac_p*
143 %dir %{_sysconfdir}/%{name}
144 %attr(640,root,radius) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/tacacs.cfg
145 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
146 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/tac_plus
147 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
148 %attr(754,root,root) /etc/rc.d/init.d/%{name}
149 %{_mandir}/man5/tac_p*.5*
150 %{_mandir}/man8/tac_p*.8*
151 %attr(755,root,root) %{_libdir}/libtacacs.so.1.*.*
152 %attr(755,root,root) %ghost %{_libdir}/libtacacs.so.?
153 %{_datadir}/%{name}+
154 %attr(660,root,radius) %ghost /var/log/tac*
155
156 %files devel
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libtacacs.so
159 %{_includedir}/tacacs.h
160
161 %files static
162 %defattr(644,root,root,755)
163 %{_libdir}/libtacacs.a
164 %{_libdir}/libtacacs.la
This page took 0.292074 seconds and 3 git commands to generate.