Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 8ba8145a05e3b947366c84c3a482fd66 > files > 3

libglpng-1.45-4mdv2010.0.src.rpm

%define major		1
%define libname		%mklibname glpng %{major}
%define develname	%mklibname glpng -d

Summary:	A toolkit for loading PNG images as OpenGL textures
Name:		libglpng
Version:	1.45
Release:	%{mkrel 4}
License:	MIT
Group:		System/Libraries
# Upstream's dead
Source0:	http://ftp.de.debian.org/debian/pool/main/libg/%{name}/%{name}_%{version}.orig.tar.gz
# From Debian - a Makefile. Yay.
Source1:	libglpng-1.45-makefile
# Debian patch, couple of small fixes.
Patch0:		libglpng-1.45-debian.patch
URL:		http://packages.debian.org/libglpng
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:	png-devel
BuildRequires:	GL-devel

%description
glpng is a small toolkit to make loading PNG image files as an OpenGL
texture as easy as possible.

%package -n %{libname}
Summary:	Shared library for %{name}
Group:		System/Libraries

%description -n %{libname}
glpng is a small toolkit to make loading PNG image files as an OpenGL
texture as easy as possible.

%package -n %{develname}
Summary:	Development headers for %{name}
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{develname}
glpng is a small toolkit to make loading PNG image files as an OpenGL
texture as easy as possible.

%prep
%setup -q -n %{name}-%{version}.orig
%patch0 -p1 -b .debian
install -m 0644 %{SOURCE1} ./Makefile

%build
%make CFLAGS="%{optflags} -fPIC -I ./include"

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot}%{_prefix} install
rm -rf %{buildroot}%{_docdir}
%ifarch x86_64
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir}
%endif

%clean
rm -rf %{buildroot}

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%doc glpng.htm Example/
%defattr(-,root,root)
%{_includedir}/GL/glpng.h
%{_libdir}/%{name}.so
%{_libdir}/%{name}.*a



%changelog
* Sun Sep 27 2009 Olivier Blin <oblin@mandriva.com> 1.45-4mdv2010.0
+ Revision: 449879
- rediff patch (from Arnaud Patard)

* Tue Dec 09 2008 Adam Williamson <awilliamson@mandriva.org> 1.45-3mdv2009.1
+ Revision: 312108
- quick fix for x86-64
- build with -fPIC (needed for x86-64)
- buildrequires GL-devel
- fix leftover buildrequires
- import libglpng