- Cleanup a bit

- Remove obsolete sle10 deprecations
- Fix one tiny rpmlint warning

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/giflib?expand=0&rev=33
This commit is contained in:
Tomáš Chvátal 2015-01-15 13:38:33 +00:00 committed by Git OBS Bridge
parent d5c88ad31e
commit d76519621d
2 changed files with 34 additions and 33 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jan 15 13:36:49 UTC 2015 - tchvatal@suse.com
- Cleanup a bit
- Remove obsolete sle10 deprecations
- Fix one tiny rpmlint warning
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 14 22:39:16 UTC 2015 - p.drouand@gmail.com Wed Jan 14 22:39:16 UTC 2015 - p.drouand@gmail.com

View File

@ -16,20 +16,18 @@
# #
%define lname libgif7
Name: giflib Name: giflib
%define lname libgif7
Version: 5.1.1 Version: 5.1.1
Release: 0 Release: 0
Summary: A Library for Working with GIF Images Summary: A Library for Working with GIF Images
License: MIT License: MIT
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Url: http://giflib.sf.net/ Url: http://giflib.sf.net/
#Git-Clone: git://git.code.sf.net/p/giflib/code #Git-Clone: git://git.code.sf.net/p/giflib/code
#Freecode-URL: http://freecode.com/projects/giflib #Freecode-URL: http://freecode.com/projects/giflib
Source: http://downloads.sf.net/giflib/%name-%version.tar.bz2 Source: http://downloads.sf.net/giflib/%{name}-%{version}.tar.bz2
Source2: baselibs.conf Source2: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch1: giflib-visibility.patch Patch1: giflib-visibility.patch
Patch2: giflib-automake-1_13.patch Patch2: giflib-automake-1_13.patch
BuildRequires: libtool >= 2 BuildRequires: libtool >= 2
@ -39,28 +37,25 @@ BuildRequires: xorg-x11-libX11-devel
BuildRequires: xorg-x11-libXau-devel BuildRequires: xorg-x11-libXau-devel
BuildRequires: xorg-x11-libXdmcp-devel BuildRequires: xorg-x11-libXdmcp-devel
BuildRequires: xorg-x11-libXt-devel BuildRequires: xorg-x11-libXt-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
This Library allows manipulating GIF Image files. Since the LZW patents This Library allows manipulating GIF Image files. Since the LZW patents
have expired, giflib can again be used instead of libungif. have expired, giflib can again be used instead of libungif.
%package -n %lname %package -n %{lname}
Summary: A Library for Working with GIF Images Summary: A Library for Working with GIF Images
Group: System/Libraries Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: giflib-64bit
%endif
%description -n %lname %description -n %{lname}
This Library allows manipulating GIF Image files. Since the LZW patents This Library allows manipulating GIF Image files. Since the LZW patents
have expired, giflib can again be used instead of libungif. have expired, giflib can again be used instead of libungif.
%package progs %package progs
Summary: Tools for Working with the GIF Library Summary: Tools for Working with the GIF Library
Group: Productivity/Graphics/Convertors Group: Productivity/Graphics/Convertors
Provides: ungif Provides: ungif = %{version}
Obsoletes: ungif Obsoletes: ungif < %{version}
%description progs %description progs
A tool for converting GIFs to various formats. A tool for converting GIFs to various formats.
@ -68,12 +63,7 @@ A tool for converting GIFs to various formats.
%package devel %package devel
Summary: Library for Working with GIF Images - Files Mandatory for Development Summary: Library for Working with GIF Images - Files Mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %lname = %version Requires: %{lname} = %{version}
# bug437293
%ifarch ppc64
Obsoletes: giflib-devel-64bit
%endif
#
%description devel %description devel
This Library allows manipulating GIF Image files. Since the LZW patents This Library allows manipulating GIF Image files. Since the LZW patents
@ -84,44 +74,48 @@ have expired, giflib can again be used instead of libungif.
# LT_INIT requires libtool >= 2 # LT_INIT requires libtool >= 2
%patch -P 1 -P 2 -p1 %patch -P 1 -P 2 -p1
%build
# USE __TIMESTAMP__ instead of __DATE__ , __TIME__ # USE __TIMESTAMP__ instead of __DATE__ , __TIME__
# this change is pointless unless we preserve the original # this change is pointless unless we preserve the original
# file modification time # file modification time
for file in `find util -name "*.c"`; do for file in `find util -name "*.c"`; do
touch -r $file $file.stamp; touch -r $file $file.stamp;
sed -i -e s@'__DATE__ ", " __TIME__'@__TIMESTAMP__@g $file; sed -i -e s@'__DATE__ ", " __TIME__'@__TIMESTAMP__@g $file;
touch -r $file.stamp $file; touch -r $file.stamp $file;
rm -v $file.stamp rm -v $file.stamp
done done
mkdir -p m4; autoreconf -fiv mkdir -p m4; autoreconf -fiv
%configure --disable-static --with-pic --x-libraries=%{_libdir}
make %{?_smp_mflags} V=1 %build
%configure \
--disable-silent-rules \
--disable-static \
--with-pic \
--x-libraries=%{_libdir}
make %{?_smp_mflags}
%install %install
make install DESTDIR=$RPM_BUILD_ROOT make DESTDIR=%{buildroot} install %{?_smp_mflags}
#ln -sf libgif.a $RPM_BUILD_ROOT%{_libdir}/libungif.a find %{buildroot} -type f -name "*.la" -delete -print
rm -f %{buildroot}%{_libdir}/*.la
find doc -name "Makefile*" -print -delete find doc -name "Makefile*" -print -delete
%post -n %lname -p /sbin/ldconfig %post -n %{lname} -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig
%files -n %lname %files -n %{lname}
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING %doc COPYING
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%_includedir/gif_lib.h %{_includedir}/gif_lib.h
%{_libdir}/lib*.so %{_libdir}/lib*.so
%files progs %files progs
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING NEWS README doc %doc COPYING NEWS README doc
%_bindir/* %{_bindir}/*
%changelog %changelog