#
# spec file for package libICE
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#


Name:           libICE
%define lname	libICE6
Version:        1.0.10
Release:        1.7
Summary:        X11 Inter-Client Exchange Library
License:        MIT
Group:          Development/Libraries/C and C++
Url:            http://xorg.freedesktop.org/

#Git-Clone:	git://anongit.freedesktop.org/xorg/lib/libICE
#Git-Web:	http://cgit.freedesktop.org/xorg/lib/libICE/
Source:         http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2
Source1:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#git#BuildRequires:	autoconf >= 2.60, automake, libtool
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(xorg-macros) >= 1.12
BuildRequires:  pkgconfig(xproto)
BuildRequires:  pkgconfig(xtrans)

%description
There are numerous possible inter-client protocols, with many
similarities and common needs - authentication, version negotiation,
byte order negotiation, and so on.
The Inter-Client Exchange (ICE) protocol is intended to provide a
framework for building such protocols, allowing them to make use of
common negotiation mechanisms and to be multiplexed over a single
transport connection.

%package -n %lname
Summary:        X11 Inter-Client Exchange Library
# O/P added for 12.2
Group:          System/Libraries
Provides:       xorg-x11-libICE = 7.6_%version-%release
Obsoletes:      xorg-x11-libICE < 7.6_%version-%release

%description -n %lname
The Inter-Client Exchange (ICE) protocol is intended to provide a
framework for building such protocols, allowing them to make use of
common negotiation mechanisms and to be multiplexed over a single
transport connection.

%package devel
Summary:        Development files for the X11 Inter-Client Exchange Library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
# O/P added for 12.2
Provides:       xorg-x11-libICE-devel = 7.6_%version-%release
Obsoletes:      xorg-x11-libICE-devel < 7.6_%version-%release

%description devel
The Inter-Client Exchange (ICE) protocol is intended to provide a
framework for building such protocols, allowing them to make use of
common negotiation mechanisms and to be multiplexed over a single
transport connection.

This package contains the development headers for the library found
in %lname.

%prep
%setup -q

%build
autoreconf -fi
%configure --docdir=%_docdir/%name --disable-static
make %{?_smp_mflags}

%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libICE.so.6*

%files devel
%defattr(-,root,root)
%_includedir/X11/*
%_libdir/libICE.so
%_libdir/pkgconfig/ice.pc
%_docdir/%name

%changelog
* Mon Jul 15 2019 Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.0.10
  * This release provides a fix for CVE-2017-2626 for platforms
    which don't have arc4random_buf() in their default libraries
    but do have getentropy(), such as Linux platforms with a kernel
    version of 3.17 or newer and a glibc version of 2.25 or newer.
    (libICE 1.0.9 already ensured that arc4random_buf() is used on
    platforms that have it to provide sufficient entropy in ICE
    key generation, but left other platforms with the weaker methods.
    Linux platforms could also have linked against libbsd to use
    arc4random_buf() with libICE 1.0.9 for stronger keys.)
- supersedes U_Use-getentropy-if-arc4random_buf-is-not-available.patch
* Sun Jun 11 2017 sndirsch@suse.com
- U_Use-getentropy-if-arc4random_buf-is-not-available.patch
  * Use getentropy() if arc4random_buf() is not available
    (bnc#1025068, CVE-2017-2626)
- tagged baselibs.conf as source in specfile
* Tue Jun 10 2014 sndirsch@suse.com
- Update to version 1.0.9
  * This release fixes a number of issues found by static analysis and
    compiler warnings, and other minor code cleanups.  On systems with
    arc4random() in either libc or libbsd, it will now use that function
    for generating authentication cookies.
* Sun Feb 17 2013 jengelh@inai.de
- Use more robust make install call
* Wed Apr 11 2012 vuntz@opensuse.org
- Update to version 1.0.8:
  + Fix a number of issues found by static analysis and compiler
    warnings
  + Large set of cleanups and improvements to the DocBook format
    specs for the protocol and docs for the API.
* Sat Feb 11 2012 jengelh@medozas.de
- Fix typo in baselibs.conf: should be libICE, not libFS
- Provide package descriptions and update homepage URL
- Add Obsoletes/Provides to baselibs.conf as well
* Fri Feb 10 2012 sndirsch@suse.com
- back to previous provides/obsoletes for xorg-x11-libICE(-devel)
* Fri Feb 10 2012 sndirsch@suse.com
- provide/obsolete xorg-x11-libICE(-devel), no matter which version
  number
* Thu Feb  9 2012 jengelh@medozas.de
- Rename xorg-x11-libICE to libICE and utilize shlib policy
* Sun Nov 20 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Tue Dec 21 2010 sndirsch@novell.com
- bumped version number to 7.6
* Wed Dec  1 2010 jslaby@suse.de
- revert 'export only public API symbols'
- it breaks everything
* Tue Nov 30 2010 cristian.rodriguez@opensuse.org
- export only public API symbols
- disable silent rules, defeat the purpose of post build checks
* Wed Oct 20 2010 sndirsch@novell.com
- libICE-1.0.7
* Sun Apr  4 2010 sndirsch@suse.de
- libICE 1.0.6
- bumped version number to 7.5
* Mon Dec 14 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Sat May  2 2009 eich@suse.de
- revert static library and .la file removal
  for SUSE versions <= 11.1.
* Tue Apr 21 2009 crrodriguez@suse.de
- remove static libraries
* Tue Mar  3 2009 sndirsch@suse.de
- libICE 1.0.5
* Thu Sep 11 2008 sndirsch@suse.de
- bumped release number to 7.4
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Tue Jan  1 2008 crrodriguez@suse.de
- fix library-without-ldconfig-* error
- add missing PreReq coreutils
* Sat Sep 29 2007 sndirsch@suse.de
- bumped version to 7.3
* Fri Aug 24 2007 sndirsch@suse.de
- libICE 1.0.4
  * Coverity #1085: Double free of pointer "*listenObjsRet"
  * Coverity #1086: Double free of pointer "*listenObjsRet"
  * Convert authutil.c static helpers to ANSI C prototypes to clear
    sparse warnings
  * Provide ANSI C prototypes for more static functions
  * Replace many malloc(strlen()); strcpy() pairs with strdup()
* Sat Dec 16 2006 sndirsch@suse.de
- update to release 1.0.3
  * Makefile.am: make ChangeLog hook safer
* Tue Oct 24 2006 dmueller@suse.de
- strip .la file
* Sat Oct 14 2006 sndirsch@suse.de
- update to X.Org 7.2RC1
* Wed Aug  2 2006 sndirsch@suse.de
- fix setup line
* Fri Jul 28 2006 sndirsch@suse.de
- use "-fno-strict-aliasing"
* Thu Jul 27 2006 sndirsch@suse.de
- use $RPM_OPT_FLAGS
- remove existing /usr/include/X11 symlink in %%pre
* Thu Jun 22 2006 sndirsch@suse.de
- created package