Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 7071d90b5f13e4dfc799312142c4b309 > files > 5

imlib2-1.0.6-4.2.100mdk.src.rpm

%define	version		1.0.6
%define release		4.2.100mdk

%define lib_major	_1
%define lib_name	%mklibname %{name} %{lib_major}

%define enable_mmx 0
%{?_with_mmx: %global enable_mmx 1}

Summary:	Powerful image loading and rendering library
Name:		imlib2
Version:	%{version}
Release:	%{release}
License:	BSD
URL:		http://www.rasterman.com/raster/imlib.htm
Group:		System/Libraries
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

Source:		%{name}-%{version}.tar.bz2
Patch0:		%{name}-1.0.6-libtool.patch.bz2
Patch1:		imlib2-1.0.6-bmpfix.patch.bz2
Patch2:		imlib2-1.0.5-CAN-2004-1026.patch

BuildRequires:	freetype-devel
BuildRequires:	libjpeg-devel
BuildRequires:	libpng-devel
BuildRequires:	libtiff-devel
BuildRequires:	libungif-devel
BuildConflicts: freetds-devel

%description
Imlib2 is an advanced replacement library for libraries like libXpm that
provides many more features with much greater flexibility and speed than
standard libraries, including font rasterization, rotation, RGBA space
rendering and blending, dynamic binary filters, scripting, and more.

Build Options:
--with mmx      Enable mmx cpu detection (10% - 30% speedup)

# main package (contains *.so.[major].* only)
%package	-n %{lib_name}
Summary:	LibAST is the Library of Assorted Spiffy Things
Group:		System/Libraries
Provides:	%{name} = %{version}-%{release}
Requires:	%{lib_name}-filters = %{version}-%{release}
Requires:	%{lib_name}-loaders = %{version}-%{release}

%description	-n %{lib_name}
Imlib2 is an advanced replacement library for libraries like libXpm that
provides many more features with much greater flexibility and speed than
standard libraries, including font rasterization, rotation, RGBA space
rendering and blending, dynamic binary filters, scripting, and more.


# devel part of the bundle
%package	-n %{lib_name}-devel
Summary:	Imlib2 headers, static libraries and documentation
Group:		Development/C
Requires:	%{lib_name} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}

%description -n %{lib_name}-devel
Imlib2 is an advanced replacement library for libraries like libXpm that
provides many more features with much greater flexibility and speed than
standard libraries, including font rasterization, rotation, RGBA space
rendering and blending, dynamic binary filters, scripting, and more.

This package contains various headers and static libraries for %{name}.
You need this package if you want to compile or develop any applications
that need %{name}.


%package	-n %{lib_name}-filters
Summary:	Imlib2 basic plugin filters set
Group:		System/Libraries
Requires:	%{lib_name} = %{version}-%{release}

%description	-n %{lib_name}-filters
Basic set of plugin filters that come with Imlib2


%package	-n %{lib_name}-loaders
Summary:	Imlib2 loader for various graphic formats
Group:		System/Libraries
Requires:	%{lib_name} = %{version}-%{release}

%description	-n %{lib_name}-loaders
%{name} image loader/saver for various graphic formats, such as jpeg,
gif, tiff, xpm etc.


%prep
%setup -q
%patch0 -p1 -b .libtool-fix
%patch1 -p1 -b .bmp-fix
%patch2 -p1 -b .can-2004-1026
aclocal-1.4
%__libtoolize -c -f
autoconf-2.13
automake-1.4

if [ ! -f configure ]; then
  # can't build as root? gah. ;)
  # 1.0.6-4mdk (Abel) it's a good thing to discourage people to build it
  # as root
  #sed <autogen.sh 's@$USER@ANNOYING@' >autogen.sh1
  #mv -f autogen.sh1 autogen.sh
  #chmod 0700 autogen.sh
  #./autogen.sh --prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir} --includedir=%{_includedir}
  ./autogen.sh && rm -f config.cache
else
  touch configure
fi

%build
%configure2_5x \
%if %enable_mmx
	--enable-mmx=yes \
%else
	--enable-mmx=no \
%endif

%make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std

##Cleaning la files for bad /home
#cd  $RPM_BUILD_ROOT%{_libdir}/loaders/image/
#for i in $(ls *la); do
#echo Patching $i
#perl -pi -e 's|\-L\/home\/vguardiola\/rpm\/BUILD\/imlib2\-1\.0\.6\/src||g' $i
#done

# remove files not bundled
rm -f	$RPM_BUILD_ROOT%{_libdir}/loaders/image/*.a \
	$RPM_BUILD_ROOT%{_libdir}/loaders/filter/*.a

%clean
rm -rf $RPM_BUILD_ROOT

%post  -n %{lib_name} -p /sbin/ldconfig

%postun -n %{lib_name} -p /sbin/ldconfig

%files -n %{lib_name}
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING
%{_libdir}/lib*.so.*

%files -n %{lib_name}-devel
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING ChangeLog doc/index.html doc/imlib2.gif doc/blank.gif
%{_bindir}/*
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_includedir}/*

%files -n %{lib_name}-filters
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING
%{_libdir}/loaders/filter

%files -n %{lib_name}-loaders
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING
%{_libdir}/loaders/image


%changelog
* Tue Jan 11 2005 Vincent Danen <vdanen@mandrakesoft.com> 1.0.6-4.2.100mdk
- security update for CAN-2004-1026

* Mon Aug 30 2004 Vincent Danen <vdanen@mandrakesoft.com> 1.0.6-4.1.100mdk
- security update for BMP crasher

* Tue Sep  2 2003 Abel Cheung <deaddog@deaddog.org> 1.0.6-4mdk
- mklibname
- remove RPM_BUILD_ROOT in install instead of prep
- remove various static module files not under $libdir
- remove packager tag
- how can rasterman's stuff be GPL'ed
- strip redundant BuildRequires and Requires
- configure2_5x, makeinstall_std
- DIRM fix
- remove duplicates in file lists
- convert this spec to UTF-8
- rpmlint fix (avoid non-pic library by overwriting libtool stuff with
  libtoolize)
- Patch0: Avoid /home in .la files
- Where should /usr/lib/loaders go? Can't please both distriblint and
  rpmlint

* Sat Jul 12 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.0.6-3mdk
- rebuild

* Fri Dec 06 2002 Vincent Guardiola <vguardiola@mandrakesoft.com> 1.0.6-2mdk
- Add Requires
- Clean spec file

* Fri Dec 06 2002 Vincent Guardiola <vguardiola@mandrakesoft.com> 1.0.6-1mdk
- - Release 1.0.6
- Fixing bad path in la files

* Fri Jun 14 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.0.5-2mdk
- rebuild for libintl2
- BuildConflicts freetds-devel

* Mon Mar 25 2002 Vincent Guardiola <vguardiola@mandrakesoft.com> 1.0.5-1mdk
- - Release 1.0.5

* Wed Jan 23 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.4-3mdk
- --disable-mmx in %%configure
- mandrakezicacion: macros and macros and macros

* Mon Jan 21 2002 Stefan van der Eijk <stefan@eijk.nu> 1.0.4-2mdk
- BuildRequires

* Wed Nov 28 2001 Vincent Guardiola  <vguardiola@mandrakesoft.com> 1.0.4-1mdk
- Initial package for MDK

* Tue Aug 28 2001 Alvaro Herrera <alvherre@dcc.uchile.cl>
- Remove loader_db since it's included in a different package.

* Mon Jan 8 2001 The Rasterman <raster@rasterman.com>
- Fix Requires & BuildRequires for freetype.

* Sat Sep 30 2000 Lyle Kempler <term@kempler.net>
- Bring back building imlib2 as root via autogen.sh for the lazy (me)
- Some minor changes

* Sat Sep 30 2000 Joakim Bodin <bodin@dreamhosted.com>
- Linux-Mandrake:ise the spec file

* Tue Sep 12 2000 The Rasterman <raster@rasterman.com>
- Redo spec file

* Wed Aug 30 2000 Lyle Kempler <kempler@utdallas.edu>
- Include imlib2-config

* Sat May 20 2000 Lyle Kempler <kempler@utdallas.edu>
- Fixed problems with requiring imlib2_view
- Went back to imlib2_view (not imlib2-view)

* Tue Nov 2 1999 Lyle Kempler <kempler@utdallas.edu>
- Mangled imlib 1.9.8 imlib spec file into imlib2 spec file