packages: tacacs/tacacs.spec - use radius/radius, enabled finger and maxses...

gotar gotar at pld-linux.org
Thu Sep 23 00:19:36 CEST 2010


Author: gotar                        Date: Wed Sep 22 22:19:36 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use radius/radius, enabled finger and maxsess,
- packaged COPYING and FAQ, narrower wildcards, 640 for logrotate script,
  restored -devel and -static (with .la file moved to the latter),
- S/KEY won't compile (dynamic with proper _libdir), BR: libtool, cosmetics
- shouldn't this be named tacacs+?

---- Files affected:
packages/tacacs:
   tacacs.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/tacacs/tacacs.spec
diff -u packages/tacacs/tacacs.spec:1.3 packages/tacacs/tacacs.spec:1.4
--- packages/tacacs/tacacs.spec:1.3	Fri May 14 02:21:49 2010
+++ packages/tacacs/tacacs.spec	Thu Sep 23 00:19:31 2010
@@ -1,15 +1,14 @@
 # $Revision$, $Date$
-# TODO:
-#	-devel and -static subpackages
 
-%bcond_with     skey		# with S/KEY support
+%bcond_with	skey		# with S/KEY support
+#skey_fn.c: In function 'skey_fn':
+#skey_fn.c:167: error: too many arguments to function 'skeychallenge'
 
-Summary:	TACACS+ Daemon
+Summary:	TACACS+ daemon
 Summary(pl.UTF-8):	Demon TACACS+
 Name:		tacacs
 Version:	F4.0.4.19
 Release:	1
-Epoch:		0
 License:	BSD-like, GPL
 Group:		Networking/Daemons
 Source0:	ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-%{version}.tar.gz
@@ -22,21 +21,24 @@
 URL:		http://www.shrubbery.net/tac_plus/
 BuildRequires:	bison
 BuildRequires:	flex
+BuildRequires:	libtool
 BuildRequires:	libwrap-devel
 BuildRequires:	pam-devel
 BuildRequires:	perl-base
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.268
-%if %{with skey}
-BuildRequires:	skey-static
-%endif
+%{?with_skey:BuildRequires:	skey-devel}
 Requires(post,preun):	/sbin/chkconfig
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
 Requires(pre):	fileutils
 Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%undefine	__cxx
-
 %description
 TACACS+ daemon using with Cisco's NASs (or other vendors) for AAA
 (Authentication, Authorization and Accounting) propose.
@@ -46,70 +48,107 @@
 celów uwierzytelniania, autoryzacji i rozliczania (AAA -
 Authentication, Authorization and Accounting).
 
+%package devel
+Summary:	Header files for tacacs+ library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki tacacs+
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+
+%description devel
+Header files for tacacs+ library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki tacacs+.
+
+%package static
+Summary:        Static tacacs+ library
+Summary(pl.UTF-8):      Statyczna biblioteka tacacs+
+Group:          Development/Libraries
+Requires:       %{name}-devel = %{version}-%{release}
+
+%description static
+Static tacacs+ library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka tacacs+.
+
 %prep
 %setup -q -n %{name}+-%{version}
 
 %build
-%configure
+%configure \
+	--enable-finger \
+	--enable-maxsess \
+	--with-userid=29 \
+	--with-groupid=29 \
+	%{?with_skey:--with-skey}
 
-%{__make} -j1 \
-	%{?with_skey:DEFINES="-DSKEY" LIBS="/usr/lib/libskey.a" INCLUDES="-I/usr/include/security/"}
+%{__make} \
+	%{?with_skey:INCLUDES="-I%{_includedir}/security"}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/{logrotate.d,pam.d,rc.d/init.d,sysconfig}}
 
-%{__make} -j1 install \
+%{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/tacacs,/etc/{logrotate.d,pam.d,rc.d/init.d,sysconfig}}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/tacacs
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tacacs
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/tac_plus
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/tacacs
-install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/tacacs
+install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 29 -r -f radius
+%useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g radius radius
+
 %post
-/sbin/chkconfig --add tacacs
-%service tacacs restart
+/sbin/chkconfig --add %{name}
+%service %{name} restart
 
 %preun
 if [ "$1" = "0" ]; then
-	%service tacacs stop
-	/sbin/chkconfig --del tacacs
+	%service %{name} stop
+	/sbin/chkconfig --del %{name}
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+	%userremove radius
+	%groupremove radius
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc users_guide CHANGES
-%attr(755,root,root) %{_bindir}/*
-%dir %{_sysconfdir}/tacacs
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tacacs/tacacs.cfg
-%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/tacacs
+%doc CHANGES COPYING FAQ users_guide
+%attr(755,root,root) %{_bindir}/tac_p*
+%dir %{_sysconfdir}/%{name}
+%attr(640,root,radius) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/tacacs.cfg
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/tac_plus
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/tacacs
-%attr(754,root,root) /etc/rc.d/init.d/tacacs
-%{_mandir}/man5/*
-%{_mandir}/man8/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%{_mandir}/man5/tac_p*.5*
+%{_mandir}/man8/tac_p*.8*
 %attr(755,root,root) %{_libdir}/libtacacs.so.1.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtacacs.so.?
-%{_datadir}/tacacs+
+%{_datadir}/%{name}+
 
-%if 0
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtacacs.so
-%{_libdir}/libtacacs.la
 %{_includedir}/tacacs.h
-%{_mandir}/man3/*
+# doesn't it conflict with erlang?
+%{_mandir}/man3/regexp.3*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libtacacs.a
-%endif
-
+%{_libdir}/libtacacs.la
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -117,6 +156,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2010/09/22 22:19:31  gotar
+- use radius/radius, enabled finger and maxsess,
+- packaged COPYING and FAQ, narrower wildcards, 640 for logrotate script,
+  restored -devel and -static (with .la file moved to the latter),
+- S/KEY won't compile (dynamic with proper _libdir), BR: libtool, cosmetics
+- shouldn't this be named tacacs+?
+
 Revision 1.3  2010/05/14 00:21:49  sparky
 - BR: bison, flex, perl-base, rpm-pythonprov
 - dropped unused BR: autoconf, automake, openldap-devel
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/tacacs/tacacs.spec?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list