File libgssglue.spec of Package libgssglue

#
# spec file for package libgssglue (Version 0.1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libgssglue
Url:            http://www.citi.umich.edu/projects/nfsv4/linux
Summary:        Generic GSSAPI Library
Version:        0.1
Release:        16
Group:          Development/Libraries/C and C++
License:        BSD3c(or similar) ; MIT License (or similar)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config
%define debug_package_requires libgssglue1 = %{version}-%{release}
PreReq:         %fillup_prereq %insserv_prereq
AutoReqProv:    on
Source:         %{name}-%{version}.tar.bz2
Patch:          %{name}-fclose.patch

%description
This library exports a gssapi interface, but does not implement any
gssapi mechanisms itself. Instead it calls gssapi routines in other
libraries, depending on the mechanism.



Authors:
--------
    Kevin W. Coffman, based on code
    from Sun Microsystems distributed
    with the MIT Kerberos distribution

%package -n libgssglue1
Group:          Development/Libraries/C and C++
License:        BSD3c(or similar) ; MIT License (or similar)
Summary:        Generic GSSAPI Library

%description -n libgssglue1
This library exports a gssapi interface, but does not implement any
gssapi mechanisms itself. Instead it calls gssapi routines in other
libraries, depending on the mechanism.



Authors:
--------
    Kevin W. Coffman, based on code
    from Sun Microsystems distributed
    with the MIT Kerberos distribution

%package devel
Group:          Development/Libraries/C and C++
License:        BSD3c(or similar) ; MIT License (or similar)
Summary:        Generic GSSAPI Library
# last used 11.0
Provides:       libgssapi = %{version}
Obsoletes:      libgssapi <= 0.11
Requires:       libgssglue1 = %{version} glibc-devel

%description devel
This library exports a gssapi interface, but does not implement any
gssapi mechanisms itself. Instead it calls gssapi routines in other
libraries, depending on the mechanism.



Authors:
--------
    Kevin W. Coffman, based on code
    from Sun Microsystems distributed
    with the MIT Kerberos distribution

%prep
%setup -q
%patch

%build
%{?suse_update_config:%{suse_update_config -f }}
autoconf
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" 
%configure --libdir=/%_lib --disable-static
%{__make} %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
#rm -f $RPM_BUILD_ROOT/usr/local/include/gssglue/gssapi/gssapi.h
install -d $RPM_BUILD_ROOT/etc
sed -e "s@/lib/@/%_lib/@" doc/gssapi_mech.conf > $RPM_BUILD_ROOT/etc/gssapi_mech.conf
%{__mkdir_p} %{buildroot}%{_libdir}
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/%{name}.so) %{buildroot}%{_libdir}/%{name}.so
%{__rm} -v %{buildroot}/%{_lib}/%{name}.{so,la}
%{__mv} -v $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libgssglue1 -p /sbin/ldconfig

%postun -n libgssglue1 -p /sbin/ldconfig

%files -n libgssglue1
%defattr(-,root,root)
%config /etc/gssapi_mech.conf
/%{_lib}/libgssglue.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/libgssglue.so
%{_libdir}/pkgconfig/libgssglue.pc
%dir %{_includedir}/gssglue/
%{_includedir}/gssglue/*

%changelog