Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 05394b9638902234ccf32b1acdb6bd4f > files > 3

pnglite-0.1.17-3.mga3.src.rpm

# Upstream doesn't use a SONAME and nobody knows how stable the interface is
# Please take extra care when updating this package -- bump the following
# and rebuild dependencies (shouldn't be many) if you suspect an ABI change:
%define abi_major 0
%define abi_minor 1
%define libname %mklibname %name %abi_major
%define libnamedevel %mklibname -d %name

Name:           pnglite
Version:        0.1.17
Release:        %mkrel 3
Summary:        A lightweight C library for loading PNG images

Group:          System/Libraries
License:        Zlib
URL:            http://sourceforge.net/projects/pnglite/
Source0:        http://downloads.sourceforge.net/pnglite/%{name}-%{version}.zip
Patch0:         pnglite-0.1.17-zlib.patch

BuildRequires:  zlib-devel

%description
pnglite is a C library for loading PNG images. It was created as a
substitute for libpng in situations when libpng is more than enough. It
currently requires zlib for inflate and crc checking and it can read the
most common types of PNG images. The library has a small and simple to use
interface.

%package -n %libname
Summary:        A lightweight C library for loading PNG images
Group:          System/Libraries
Provides:       pnglite = %{version}-%{release}

%description -n %libname
pnglite is a C library for loading PNG images. It was created as a
substitute for libpng in situations when libpng is more than enough. It
currently requires zlib for inflate and crc checking and it can read the
most common types of PNG images. The library has a small and simple to use
interface.

%package -n %libnamedevel
Summary:        Files needed to build and link programs with pnglite
Group:          Development/C
Requires:       %libname = %{version}-%{release}
Provides:       pnglite-devel = %{version}-%{release}

%description -n %libnamedevel
This contains a header file and a link to library for the linker
to link against pnglite.

%prep
%setup -q -c
%patch0 -p1 -b .zlib
sed 's/\r//' -i pnglite.h

%build
gcc %{optflags} -shared -fPIC -Wl,--soname,libpnglite.so.%{abi_major} \
       -o libpnglite.so.%{abi_major}.%{abi_minor} pnglite.c

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_libdir}
install -d $RPM_BUILD_ROOT%{_includedir}

install -pm 0644 pnglite.h $RPM_BUILD_ROOT%{_includedir}
install libpnglite.so.%{abi_major}.%{abi_minor} $RPM_BUILD_ROOT%{_libdir}
ln -s libpnglite.so.%{abi_major}.%{abi_minor} $RPM_BUILD_ROOT%{_libdir}/libpnglite.so.%{abi_major}
ln -s libpnglite.so.%{abi_major}.%{abi_minor} $RPM_BUILD_ROOT%{_libdir}/libpnglite.so

%clean
rm -rf $RPM_BUILD_ROOT

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

%files -n %libnamedevel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/*.h



%changelog

* Sun Jan 13 2013 umeabot <umeabot> 0.1.17-3.mga3
+ Revision: 377978
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Mar 04 2011 obgr_seneca <obgr_seneca> 0.1.17-2.mga2
+ Revision: 64296
- imported package pnglite