141 lines
4.8 KiB
RPMSpec
141 lines
4.8 KiB
RPMSpec
#######################################################################
|
||
#
|
||
# Copyright (C) 2004 Novell, Inc.
|
||
#
|
||
# This program is free software; you can redistribute it and/or
|
||
# modify it under the terms of the GNU General Public
|
||
# License as published by the Free Software Foundation; either
|
||
# version 2 of the License, or (at your option) any later version.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
# General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public
|
||
# License along with this program; if not, write to the Free
|
||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
#
|
||
# Author: Juan Carlos Luciani <jluciani@novell.com>
|
||
#
|
||
#######################################################################
|
||
|
||
# SuSE Specific autobuild tags
|
||
# neededforbuild pkgconfig glib2 glib2-devel libicu26
|
||
|
||
%define prefix /opt/Novell/LoginCapture
|
||
|
||
Summary: LoginCapture
|
||
Name: @PACKAGE@
|
||
Version: @VERSION@
|
||
Release: @RELEASE@
|
||
Copyright: GPL
|
||
Group: Applications/Productivity
|
||
Source: %{name}-%{version}.tar.gz
|
||
URL: http://forge.novell.com/modules/xfmod/project/?isecure
|
||
#Distribution :
|
||
Vendor: <unknown>
|
||
Packager: <unknown>
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||
|
||
#Requires: secretstorewallet
|
||
Obsoletes: %{name} <= %{version}
|
||
#=============================================================================
|
||
%Description
|
||
LoginCapture provides a way for applications using the SecretStore Wallet
|
||
to leverage the password entered by the user to login to the desktop when
|
||
authenticating to backend services. The use of this feature in cases where
|
||
the username and password used to login to the desktop are synchronized with
|
||
the backend username and password database should result in fewer requests to
|
||
the user to enter its credentials.
|
||
|
||
#=============================================================================
|
||
%ChangeLog
|
||
|
||
|
||
#=============================================================================
|
||
%Prep
|
||
%setup -n %{name}-%{version}
|
||
|
||
|
||
#=============================================================================
|
||
%Build
|
||
./configure --prefix=%{prefix}
|
||
make
|
||
|
||
#=============================================================================
|
||
%Install
|
||
%{__rm} -rf $RPM_BUILD_ROOT
|
||
make DESTDIR=$RPM_BUILD_ROOT install
|
||
|
||
#=============================================================================
|
||
%Clean
|
||
%{__rm} -rf $RPM_BUILD_ROOT
|
||
|
||
#=============================================================================
|
||
%Post
|
||
# Do not run script if this is an upgrade
|
||
if test "$1" != 1; then
|
||
#echo "LoginCapture install script does not run during upgrade"
|
||
exit 0
|
||
fi
|
||
|
||
echo "Running LoginCapture install script..."
|
||
|
||
# Create a symbolic link to our library in the /lib/security folder
|
||
ln -s "%{prefix}/lib/pam_pwcapture.so" /lib/security/pam_pwcapture.so
|
||
|
||
# Determine what Window Manager is in use
|
||
if [ -f /etc/sysconfig/desktop ]; then
|
||
if [ -n "<EFBFBD>grep GNOME /etc/sysconfig/desktop<EFBFBD>" ]; then
|
||
windows_mgr=/etc/pam.d/gdm
|
||
echo "Windows Mgr = gdm"
|
||
elif [ -n "<EFBFBD>grep KDE /etc/sysconfig/desktop<EFBFBD>" ]; then
|
||
windows_mgr=/etc/pam.d/kdm
|
||
echo "Windows Mgr = kdm"
|
||
elif [ -n "<EFBFBD>grep AnotherLevel /etc/sysconfig/desktop<EFBFBD>" ]; then
|
||
windows_mgr=/etc/pam.d/xdm
|
||
echo "Windows Mgr = xdm"
|
||
else
|
||
echo "Unknown windows manager, unable to update windows manager PAM configuration!"
|
||
exit 0
|
||
fi
|
||
if [ -f $windows_mgr ]; then
|
||
/opt/Novell/LoginCapture/bin/modinstall -i $windows_mgr
|
||
else
|
||
echo "Windows manager PAM config file not found!"
|
||
fi
|
||
else
|
||
echo "Missing desktop file, unable to update windows manager PAM configuration!"
|
||
exit 0
|
||
fi
|
||
|
||
echo "done running LoginCapture install script!"
|
||
|
||
#=============================================================================
|
||
%Preun
|
||
# Do not run script if this is an upgrade
|
||
if test "$1" == 1; then
|
||
#echo "LoginCapture un-install script does not run during upgrade"
|
||
exit 0
|
||
fi
|
||
|
||
echo "Running LoginCapture un-install script..."
|
||
|
||
# Uninstall our module from all of the PAM configuration files onto which it
|
||
# has been installed by our utility.
|
||
for i in `grep -l pam_pwcapture /etc/pam.d/*`;do /opt/Novell/LoginCapture/bin/modinstall -u $i; done
|
||
|
||
# Remove symbolic link to our library from the /lib/security folder
|
||
rm -f /lib/security/pam_pwcapture.so
|
||
|
||
echo "done running LoginCapture un-install script!"
|
||
|
||
#=============================================================================
|
||
%Files
|
||
%defattr(-,root,root)
|
||
%{prefix}/*
|
||
#%{prefix}/lib/*
|
||
#%{prefix}/share/*
|
||
|