File giflib.spec of Package libgif4

#
# spec file for package giflib
#
# Copyright (c) 2024 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           giflib
%define lname	libgif4
BuildRequires:  libtool
BuildRequires:  xorg-x11-libICE-devel
BuildRequires:  xorg-x11-libSM-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXau-devel
BuildRequires:  xorg-x11-libXdmcp-devel
BuildRequires:  xorg-x11-libXt-devel
BuildRequires:  xmlto
Url:            http://sourceforge.net/projects/giflib
Version:        4.2.3
Release:        34.1.1
Summary:        A Library for Working with GIF Images
License:        MIT
Group:          System/Libraries
Source:         giflib-%{version}.tar.bz2
Source2:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch1:         giflib-visibility.patch

%description
This Library allows manipulating GIF Image files. Since the LZW patents
have expired, giflib can again be used instead of libungif.

%package -n %lname
Summary:        A Library for Working with GIF Images
Group:          System/Libraries
Obsoletes:      giflib < %version-%release
Provides:       giflib = %version-%release
# bug437293
%ifarch ppc64
Obsoletes:      giflib-64bit
Obsoletes:      libungif-64bit
%endif
#
Provides:       libungif
%ifarch ia64 x86_64 s390x ppc64
Provides:       libungif.so.4()(64bit)
%else
Provides:       libungif.so.4
%endif
Obsoletes:      libungif

%description -n %lname
This Library allows manipulating GIF Image files. Since the LZW patents
have expired, giflib can again be used instead of libungif.

%package progs
Summary:        Tools for Working with the GIF Library
Group:          Productivity/Graphics/Convertors
Provides:       ungif
Obsoletes:      ungif

%description progs
A tool for converting GIFs to various formats.

%package devel
Summary:        Library for Working with GIF Images - Files Mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
# bug437293
%ifarch ppc64
Obsoletes:      giflib-devel-64bit
%endif
Obsoletes:      giflib-devel >= 5.0
#

%description devel
This Library allows manipulating GIF Image files. Since the LZW patents
have expired, giflib can again be used instead of libungif.

%prep
%setup -q
%patch -P 1 -p1

%build
# USE __TIMESTAMP__ instead of __DATE__ , __TIME__
# this change is pointless unless we preserve the original 
# file modification time
for file in `find util -name "*.c"`; do 
	touch -r $file $file.stamp; 
	sed -i -e s@'__DATE__ ",   " __TIME__'@__TIMESTAMP__@g $file; 
    touch -r $file.stamp $file;
    rm -v $file.stamp
done

mkdir m4;autoreconf -fiv
%configure --disable-static --with-pic --x-libraries=%{_libdir}
make %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT
chmod 755 $RPM_BUILD_ROOT/%{_libdir}/lib*.so.*
ln -sf libgif.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libungif.so.%{version}
ln -sf libungif.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libungif.so.4
ln -sf libungif.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libungif.so
#ln -sf libgif.a $RPM_BUILD_ROOT%{_libdir}/libungif.a
rm -f %{buildroot}%{_libdir}/*.la
find doc -name "Makefile*" -print -delete
nm -C -D %{buildroot}%{_libdir}/libg*.so

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

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

%files -n %lname
%defattr(-,root,root)
%doc COPYING
%{_libdir}/lib*.so.*

%files devel
%defattr(-,root,root)
/usr/include/gif_lib.h
%{_libdir}/lib*.so

%files progs
%defattr(-,root,root)
%doc COPYING NEWS README doc
/usr/bin/*

%changelog

* Sun Feb  5 2012 jengelh@medozas.de
- Remove redundant tags/sections
* Mon Oct 10 2011 crrodriguez@opensuse.org
- annotate functions from gif_lib_private.h with visibility
  hidden so they are not exported.
* Sat Oct  1 2011 coolo@suse.com
- add libtool as buildrequire to make the spec file more reliable
* Wed Sep 21 2011 jengelh@medozas.de
- Correct project URL
- Implement shlib naming (libgif4)
- Apply packaging guidelines (remove redundant/obsolete
  tags/sections from specfile, etc.)
* Sun Aug 29 2010 cristian.rodriguez@opensuse.org
- Do not use __Date__ and __TIME__ , make build-compare
  happier
* Thu Dec 17 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Tue Jan 13 2009 olh@suse.de
- obsolete old libungif-64bit on ppc64 (bnc#437293)
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
  (bnc#437293)
* Mon Nov 24 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Sat Aug 30 2008 crrodriguez@suse.de
- update to version 4.1.6, changes since 4.1.4 includes:
  * Fix segfault in utilities due to referencing ColorMaps in GifFiles that had
  no ColorMap present.
  * Fix gif2x11 to work on 24 bit displays.
  * Fix for giftext segfault when the GifFile does not store a global colormap.
  * Checks to fail gracefully when an image contains improper LZ codes.
  * Close file handles on failure in DGifOpenFileHandle()
  * Checks to operate on files in binary mode on WIN32 as well as MSDOS.
- kill "la" files and static libraries
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Wed Aug 16 2006 aj@suse.de
- Replace xorg-x11-devel BuildRequires with really needed libs.
- Fix configure call for X11 R7.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 nadvornik@suse.cz
- compile with -fstack-protector
* Tue Jan  3 2006 nadvornik@suse.cz
- updated to 4.1.4
* Tue Apr 26 2005 jw@suse.de
- fixed EGifCompressLine for 64bit archs,
  to make perl-Prima testcases happy.
* Tue Sep 14 2004 nadvornik@suse.cz
- fixed provides on 64bit architectures [#44842]
* Thu Sep  9 2004 nadvornik@suse.cz
- added Provides: libungif.so.4 [#44842]
* Wed Sep  1 2004 nadvornik@suse.cz
- updated to giflib 4.1.3: LZW is enabled again
- renamed libungif -> giflib
    ungif -> giflib-progs
- new subpackage giflib-devel
- added compatibility symlinks
* Tue Feb 24 2004 kukuk@suse.de
- Cleanup neededforbuild
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr and %%run_ldconfig
* Mon Feb 11 2002 schwab@suse.de
- Fix use of varargs.
* Wed Feb  6 2002 nadvornik@suse.cz
- updated to 4.1.0b1:
  - bugfix release
* Tue Jan  8 2002 nadvornik@suse.cz
- used macros %%{_lib} and %%{_libdir}
* Tue Jun 12 2001 ro@suse.de
- libtoolize to build
* Tue Jun  5 2001 schwab@suse.de
- Change DumpScreen2Gif parameters to long.
* Thu May 24 2001 pblaha@suse.cz
- fix cast pointer on ia64
* Wed Apr 18 2001 pblaha@suse.cz
- patch from nadvornik@suse.cz for bug in loading images
* Sun Apr  8 2001 ro@suse.de
- fixed group tag
* Wed May 17 2000 bubnikv@suse.cz
- fixed bug of $chmod 755 libungif.so* (missing $RPM_BUILD_ROOT)
- spec file cleanup
* Mon May 15 2000 nadvornik@suse.cz
- added BuildRoot
- added URL
* Tue Apr  4 2000 bk@suse.de
- config.{sub,guess} update macro needs automake
* Sat Apr  1 2000 bk@suse.de
- suse s390 team added required %%suse_update_config for s390
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Jun 29 1999 ro@suse.de
- split: ungif (containing the tools) is build as a separate package
* Tue Apr  6 1999 ro@suse.de
- initial package
openSUSE Build Service is sponsored by