#
# spec file for package libXau
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#


%define lname	libXau6
Name:           libXau
Version:        1.0.12
Release:        1.3
Summary:        X11 authorization protocol library
License:        MIT
Group:          Development/Libraries/C and C++
URL:            https://xorg.freedesktop.org/
#Git-Clone:	git://anongit.freedesktop.org/xorg/lib/libXau
#Git-Web:       http://cgit.freedesktop.org/xorg/lib/libXau/
Source:         http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.xz
Source1:        baselibs.conf
#git#BuildRequires:	autoconf >= 2.60, automake
BuildRequires:  fdupes
BuildRequires:  libtool
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(xorg-macros) >= 1.8
BuildRequires:  pkgconfig(xproto)

%description
libXau provides mechanisms for individual access to an X Window
System display. It uses existing core protocol and library hooks for
specifying authorization data in the connection setup block to
restrict use of the display to only those clients that show that they
know a server-specific key called a "magic cookie".

%package -n %{lname}
Summary:        X11 authorization protocol library
# O/P added for 12.2
Group:          System/Libraries
Provides:       xorg-x11-libXau = 7.6_%{version}-%{release}
Obsoletes:      xorg-x11-libXau < 7.6_%{version}-%{release}

%description -n %{lname}
libXau provides mechanisms for individual access to an X Window
System display. It uses existing core protocol and library hooks for
specifying authorization data in the connection setup block to
restrict use of the display to only those clients that show that they
know a server-specific key called a "magic cookie".

%package devel
Summary:        Development files for the X11 authorization protocol library
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}
# O/P added for 12.2
Provides:       xorg-x11-libXau-devel = 7.6_%{version}-%{release}
Obsoletes:      xorg-x11-libXau-devel < 7.6_%{version}-%{release}

%description devel
libXau provides mechanisms for individual access to an X Window
System display. It uses existing core protocol and library hooks for
specifying authorization data in the connection setup block to
restrict use of the display to only those clients that show that they
know a server-specific key called a "magic cookie".

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

%prep
%setup -q

%build
%meson
%meson_build

%install
%meson_install
%fdupes %{buildroot}/%{_prefix}

%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig

%files -n %{lname}
%license COPYING
%{_libdir}/libXau.so.6*

%files devel
%{_includedir}/X11/*
%{_libdir}/libXau.so
%{_libdir}/pkgconfig/xau.pc
%{_mandir}/man3/*

%changelog
* Sat Dec 14 2024 Stefan Dirsch <sndirsch@suse.com>
- update to 1.0.12
  * This release adds support for building with meson as well as
    autoconf, thanks to the work of Dylan Baker.
- switched to meson build system
* Thu Dec  8 2022 Dirk Müller <dmueller@suse.com>
- update to 1.0.11:
    configure: Use AC_SYS_LARGEFILE to enable large file support
- modernize spec file, install license into licensedir
* Sat Aug 27 2022 Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.0.10
  * gitlab CI: add a basic build test
  * Fix spelling/wording issues
  * Autest.c: Fix -Wdiscarded-qualifiers warnings
  * Remove unnnecessary casts from malloc() and free() calls
  * XauReadAuth: move failure handling code to a common code block
* Mon Feb 11 2019 sndirsch@suse.com
- Update to version 1.0.9:
  * Update configure.ac bug URL for gitlab migration
  * autogen.sh: use quoted string variables
  * autogen: add default patch prefix
  * autogen.sh: use exec instead of waiting for configure to finish
  * XauFileName: always go through buf allocation if buf is NULL
  * XauFileName: reset bsize when malloc failed
  * AuDispose.c:remove redundant null check on calling free()
  * AuFileName.c: remove redundant null check on calling free()
  * AuRead.c: remove redundant null check on calling free()
  * Avoid out of boundary read access
- supersedes U_0001-XauFileName-reset-bsize-when-malloc-failed.patch,
  U_0002-XauFileName-always-go-through-buf-allocation-if-buf-.patch
* Mon Sep 30 2013 sndirsch@suse.com
- U_0001-XauFileName-reset-bsize-when-malloc-failed.patch/
  U_0002-XauFileName-always-go-through-buf-allocation-if-buf-.patch
  * fixes regression in libXau 1.0.8, which resulted in a crash in
    Mozilla (bnc#831620,fdo#69929)
* Wed May 29 2013 tobias.johannes.klausmann@mni.thm.de
- Update to version 1.0.8:
  This maintenance release brings happiness by getting rid of things
  that make valgrind, clang, doclifter, automake, the GNOME build system,
  various other static analyzers, and obsessive developers be unhappy.
  Don't warn, be happy.
* Sun Feb 17 2013 jengelh@inai.de
- Use more robust make install call
- Avoid calling fdupes outside of /usr
* Wed Apr 11 2012 vuntz@opensuse.org
- Update to version 1.0.7:
  + Improve the handling of "normal" locking collisions
  + Documentation cleanups
  + Build configuration improvements
* Sat Feb 11 2012 jengelh@medozas.de
- Rename xorg-x11-libXau to libXau and utilize shlib policy
* Tue Dec 21 2010 sndirsch@novell.com
- bumped version number to 7.6_1.0.6
* Sat Sep  4 2010 sndirsch@novell.com
- libXau 1.0.6
  * This minor release includes a number of packaging updates
    accumulated over the last year, and a couple of documentation
    fixes.
- bumped version number to 7.5_1.0.6
- make use of %%fdupes macro
- fixed Summary/Group entries in -devel package
* Sun Apr  4 2010 sndirsch@suse.de
- libXau 1.0.5
- bumped version number to 7.5
* Mon Dec 14 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Fri May  1 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
* Thu Sep 11 2008 sndirsch@suse.de
- bumped release number to 7.4
* Wed Aug 27 2008 sndirsch@suse.de
- libXau 1.0.4
  * SVR4 (including Solaris) puts gethostbyname_r in libnsl instead
    of libc
  * Bug 17314: libXau's Makefile.am should have proper man creation
    rules
  * Bug #11097: libXau COPYING fix (add missing copyright dates)
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Fri Mar 14 2008 sndirsch@suse.de
- readded libXau.la for openSUSE <= 10.3 (bnc #371041)
* Tue Jan  1 2008 crrodriguez@suse.de
- fix library-without-ldconfig-* error
- add missing PreReq coreutils
- remove libXau.la (empty dependency_libs)
* Sat Sep 29 2007 sndirsch@suse.de
- bumped version to 7.3
* Mon Dec 18 2006 sndirsch@suse.de
- updated libXau to release 1.0.3
  * Makefile.am: make ChangeLog hook safer
* Thu Oct 26 2006 sndirsch@suse.de
- set version to 7.2 in specfile
* Wed Aug  2 2006 sndirsch@suse.de
- fix setup line
* Sat Jul 29 2006 sndirsch@suse.de
- updated libXau to release 1.0.2
* 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