CASA/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.spec.in
2006-10-19 15:23:23 +00:00

501 lines
18 KiB
RPMSpec

#
# spec file for the CASA_auth_token native ( Version @VERSION@ )
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: CASA_auth_token_native
%define cfg Release
%define debug_opt ""
URL: http://www.novell.com/products
BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel krb5-devel libgcc libgssapi libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-1_5_0-ibm java-1_5_0-ibm-devel java-1_5_0-ibm-alsa sysvinit insserv curl-devel glade-sharp glade-sharp2
%define prefix /usr
License: LGPL
Group: System/Libraries
Autoreqprov: on
%define bldno @VERSION@
Version: @VERSION@
Release: 1
Summary: Novell CASA Authentication Token Libraries for C/C++ Server Applications
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: expat binutils java-1_5_0-ibm CASA_auth_token_jaas_support sysvinit insserv
PreReq: %fillup_prereq %insserv_prereq
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
%description
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information is made available to the consuming services. The amount of
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token_native package contains the authentication token
verification library for C/C++ applications. It is recommended that
this library not be invoked directly by applications, instead it is
recomended that appplication invoke its services through the support
modules provided to integrate with PAM or the Apache Web Server.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
%package -n CASA_auth_token_client
Summary: Novell CASA Authentication Token Libraries for Client Applications
Group: System/Libraries
Requires: CASA >= 1.7.877 krb5 curl
%description -n CASA_auth_token_client
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token_client package contains the necessary library and
configuration files for client applications to obtain authentication
tokens.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
Todd Throne
Jim Norman
%package -n CASA_auth_token_pam_support
Summary: Novell CASA Authentication Token PAM Support Components
Group: System/Libraries
Requires: CASA_auth_token_native pam
%description -n CASA_auth_token_pam_support
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token_pam_support package contains the CASA (Common
Authentication Services Adapter) authentication token infrastructure
PAM module for token verification.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
%package -n CASA_auth_token_apache2_2_support
Summary: Novell CASA Authentication Token Apache2_2 Support Components
Group: System/Libraries
Requires: apache2 CASA_auth_token_native
%description -n CASA_auth_token_apache2_2_support
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token_apache2_2_support package contains the CASA (Common
Authentication Services Adapter) authentication token infrastructure
Apache v2.2 authentication provider module for token verification. The
module expects that users authenticate utilizing the HTTP Basic
authentication scheme and that the password utilized consist of a CASA
authentication token. Information about the authenticated identity is
environment variable.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
%package -n CASA_auth_token-devel
Summary: Novell CASA Authentication Token Server Development Files
Group: Development/Libraries/C and C++
Requires: CASA-devel CASA_auth_token_native CASA_auth_token_jaas_support CASA_auth_token_pam_support CASA_auth_token_apache2_2_support CASA_auth_token_svc
%description -n CASA_auth_token-devel
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token-devel package contains the files necessary for the
development of server applications that utilize the CASA (Common
Authentication Service Adapter) authentication token infrastructure for
authentication.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
%package -n CASA_auth_token_client-devel
Summary: Novell CASA Authentication Token Client Development Files
Group: Development/Libraries/C and C++
Requires: CASA-devel CASA_auth_token_client
%description -n CASA_auth_token_client-devel
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.
A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".
The CASA_auth_token-client-devel package contains the files necessary
for the development of client applications that utilize the CASA
(Common Authentication Service Adapter) authentication token
infrastructure for authentication.
Authors:
--------
Juan Carlos Luciani - jluciani@novell.com
%prep
%setup -q
#%patch
%if %{_lib} == "lib64"
%define binsource bin64
%else
%define binsource bin
%endif
%build
export PATH=.:$PATH:/usr/%_lib/qt3/bin
%if %suse_version > 1000
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fstack-protector"
%endif
./autogen.sh
make
%install
export NO_BRP_CHECK_BYTECODE_VERSION="true"
## Prime the file system ##
install -d %{buildroot}%{prefix}
install -d %{buildroot}%{prefix}/bin
install -d %{buildroot}%{prefix}/sbin
install -d %{buildroot}%{prefix}/%{_lib}
install -d %{buildroot}%{prefix}/%{_lib}/CASA
install -d %{buildroot}%{prefix}/%{_lib}/CASA/authtoken
install -d %{buildroot}/%{_lib}/security
install -d %{buildroot}%{prefix}/include
install -d %{buildroot}/etc/init.d
install -d %{buildroot}/etc/ld.so.conf.d
install -d %{buildroot}/var
install -d %{buildroot}/var/lib
install -d -m 755 %{buildroot}/var/lib/CASA
install -d -m 755 %{buildroot}/var/lib/CASA/authtoken
install -d -m 755 %{buildroot}/var/lib/CASA/authtoken/validate
install -d -m 755 %{buildroot}/etc/CASA
install -d -m 755 %{buildroot}/etc/CASA/authtoken
install -d -m 755 %{buildroot}/etc/CASA/authtoken/validate
install -d -m 755 %{buildroot}/etc/CASA/authtoken/modules
install -d -m 755 %{buildroot}/etc/CASA/authtoken/client
install -d -m 755 %{buildroot}/etc/CASA/authtoken/client/mechanisms
## CASA_auth_token_native ##
# Libs
install -m 755 %{_lib}/%{cfg}/libcasa_s_authtoken.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/casa_iden_token.so %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/libcasa_c_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/libcasa_s_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
# Symbolic Links
ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so
ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1
# Bins
install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/casa_atvd
# Others
install -m 644 %{_lib}/%{cfg}/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken/modules/CasaIdentityToken.conf
install -m 755 server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD %{buildroot}/etc/init.d/casa_atvd
install -m 750 server/AuthTokenValidate/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/validate/
ln -sf casa_atvd %{buildroot}%{prefix}/sbin/rccasa_atvd
## CASA_auth_token_client ##
# Libs
install -m 755 %{_lib}/%{cfg}/libcasa_c_authtoken.so %{buildroot}%{prefix}/%{_lib}/libcasa_c_authtoken.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/krb5mech.so %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/pwmech.so %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/pwmech.so.%{bldno}
# Symbolic Links
ln -sf krb5mech.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so
ln -sf krb5mech.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so.1
ln -sf pwmech.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/pwmech.so
ln -sf pwmech.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/pwmech.so.1
# Others
install -m 644 client/client.conf %{buildroot}/etc/CASA/authtoken/client/client.conf
install -m 644 %{_lib}/%{cfg}/Krb5Authenticate.conf %{buildroot}/etc/CASA/authtoken/client/mechanisms/Krb5Authenticate.conf
install -m 644 %{_lib}/%{cfg}/PwdAuthenticate.conf %{buildroot}/etc/CASA/authtoken/client/mechanisms/PwdAuthenticate.conf
## CASA_auth_token_pam_support ##
# Libs
install -m 755 %{_lib}/%{cfg}/pam_casaauthtok.so %{buildroot}/%{_lib}/security/pam_casaauthtok.so
## CASA_auth_token_apache2_2_support ##
# Libs
install -m 755 %{_lib}/%{cfg}/mod_authn_casa.so %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so.%{bldno}
## CASA_auth_token-devel ##
# Header Files
install -m 644 include/casa_s_authtoken.h %{buildroot}%{prefix}/include
install -m 644 include/casa_c_ipc.h %{buildroot}%{prefix}/include
install -m 644 include/casa_s_ipc.h %{buildroot}%{prefix}/include
# Symbolic Links for CASA_auth_token_native files
ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so
ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.1
ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so
ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.1
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.1
# Symbolic Links for CASA_auth_token_apache2_2_support files
ln -sf mod_authn_casa.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so
ln -sf mod_authn_casa.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so.1
## CASA_auth_token_client-devel ##
# Header Files
install -m 644 include/casa_c_authtoken.h %{buildroot}%{prefix}/include
# Symbolic Links for CASA_auth_token_client files
ln -sf libcasa_c_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_authtoken.so
ln -sf libcasa_c_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_authtoken.so.1
%clean
rm -rf $RPM_BUILD_ROOT
## CASA_auth_token_native ##
%pre
# Do necessary user and group administration
group_present=`getent group | grep ^casaauth`
if [ -z "$group_present" ] ; then
/usr/sbin/groupadd -r casaauth
fi
user_present=`getent passwd | grep ^casaatvd`
if [ -z "$user_present" ] ; then
/usr/sbin/useradd -c "casa_atvd System User" -s /bin/false -r -d /var/lib/CASA/authtoken/validate -g casaauth casaatvd 2> /dev/null || :
fi
%post
/sbin/ldconfig
# Install casa_atvd init script, set it to start by default.
%{fillup_and_insserv casa_atvd}
%preun
%stop_on_removal casa_atvd
%postun
%restart_on_update casa_atvd
%insserv_cleanup
/sbin/ldconfig
# Do not do anything else if this is an upgrade
if test "$1" == 1; then
exit 0
fi
# Delete the casaatvd user
userdel casaatvd
# Delete the var files
rm -rf /var/lib/CASA/authtoken/validate
%files
%defattr(-,root,root)
%dir %{prefix}/%{_lib}/CASA
%dir %{prefix}/%{_lib}/CASA/authtoken
%dir /var/lib/CASA
%dir /var/lib/CASA/authtoken
%dir %attr(-, casaatvd, casaauth) /var/lib/CASA/authtoken/validate
%dir /etc/CASA
%dir /etc/CASA/authtoken
%dir /etc/CASA/authtoken/validate
%dir /etc/CASA/authtoken/modules
%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1
%{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno}
%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
%{prefix}/bin/casa_atvd
%config /etc/CASA/authtoken/validate/envvars
%config /etc/CASA/authtoken/modules/CasaIdentityToken.conf
/etc/init.d/casa_atvd
/usr/sbin/rccasa_atvd
## CASA_auth_token_client ##
%pre -n CASA_auth_token_client
# Nothing to do in this pre script
%post -n CASA_auth_token_client
/sbin/ldconfig
%preun -n CASA_auth_token_client
# Nothing to do in this preun script
%postun -n CASA_auth_token_client
/sbin/ldconfig
%files -n CASA_auth_token_client
%defattr(-,root,root)
%dir %{prefix}/%{_lib}/CASA
%dir %{prefix}/%{_lib}/CASA/authtoken
%dir /etc/CASA
%dir /etc/CASA/authtoken
%dir /etc/CASA/authtoken/client
%dir /etc/CASA/authtoken/client/mechanisms
%{prefix}/%{_lib}/libcasa_c_authtoken.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so
%{prefix}/%{_lib}/CASA/authtoken/krb5mech.so.1
%{prefix}/%{_lib}/CASA/authtoken/pwmech.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/pwmech.so
%{prefix}/%{_lib}/CASA/authtoken/pwmech.so.1
%config /etc/CASA/authtoken/client/client.conf
%config /etc/CASA/authtoken/client/mechanisms/Krb5Authenticate.conf
%config /etc/CASA/authtoken/client/mechanisms/PwdAuthenticate.conf
## CASA_auth_token_pam_support ##
%pre -n CASA_auth_token_pam_support
# Nothing to do in this pre script
%post -n CASA_auth_token_pam_support
/sbin/ldconfig
%preun -n CASA_auth_token_pam_support
# Nothing to do in this preun script
%postun -n CASA_auth_token_pam_support
/sbin/ldconfig
%files -n CASA_auth_token_pam_support
%defattr(-,root,root)
%dir /%{_lib}/security
/%{_lib}/security/pam_casaauthtok.so
## CASA_auth_token_apache2_2_support ##
%pre -n CASA_auth_token_apache2_2_support
# Nothing to do in this pre script
%post -n CASA_auth_token_apache2_2_support
/sbin/ldconfig
%preun -n CASA_auth_token_apache2_2_support
# Nothing to do in this preun script
%postun -n CASA_auth_token_apache2_2_support
/sbin/ldconfig
%files -n CASA_auth_token_apache2_2_support
%defattr(-,root,root)
%{prefix}/%{_lib}/mod_authn_casa.so.%{bldno}
## CASA_auth_token-devel ##
%pre -n CASA_auth_token-devel
# Nothing to do in this pre script
%post -n CASA_auth_token-devel
# Nothing to do in this post script
%preun -n CASA_auth_token-devel
# Nothing to do in this preun script
%postun -n CASA_auth_token-devel
# Nothing to do in this postun script
%files -n CASA_auth_token-devel
%defattr(-,root,root)
%{prefix}/include/casa_s_authtoken.h
%{prefix}/include/casa_c_ipc.h
%{prefix}/include/casa_s_ipc.h
%{prefix}/%{_lib}/libcasa_s_authtoken.so
%{prefix}/%{_lib}/libcasa_s_authtoken.so.1
%{prefix}/%{_lib}/libcasa_c_ipc.so
%{prefix}/%{_lib}/libcasa_c_ipc.so.1
%{prefix}/%{_lib}/libcasa_s_ipc.so
%{prefix}/%{_lib}/libcasa_s_ipc.so.1
%{prefix}/%{_lib}/mod_authn_casa.so
%{prefix}/%{_lib}/mod_authn_casa.so.1
## CASA_auth_token_client-devel ##
%pre -n CASA_auth_token_client-devel
# Nothing to do in this pre script
%post -n CASA_auth_token_client-devel
# Nothing to do in this post script
%preun -n CASA_auth_token_client-devel
# Nothing to do in this preun script
%postun -n CASA_auth_token_client-devel
# Nothing to do in this postun script
%files -n CASA_auth_token_client-devel
%defattr(-,root,root)
%{prefix}/include/casa_c_authtoken.h
%{prefix}/%{_lib}/libcasa_c_authtoken.so
%{prefix}/%{_lib}/libcasa_c_authtoken.so.1
%changelog -n CASA_auth_token_native