File imlib2.spec of Package imlib2

#
# spec file for package imlib2 (Version 1.4.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           imlib2
BuildRequires:  freetype2-devel giflib-devel libpng-devel libtiff-devel xorg-x11-devel
Summary:        Image handling and conversion library.
Version:        1.4.4
Release:        1
License:        BSD3c(or similar)
Group:          Development/Libraries/X11
Source:         %name-%version.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://sourceforge.net/projects/enlightenment/
Recommends:     imlib2-loaders

%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.



Authors:
--------
    Rasterman <raster@rasterman.com>

%package devel
License:        BSD3c(or similar)
Summary:        Imlib 2 - development libraries
Group:          Development/Libraries/X11
Requires:       %{name} = %{version} glibc-devel xorg-x11-devel freetype2-devel zlib-devel libpng-devel

%description devel
These are the development headers and library for imlib2.



Authors:
--------
    Rasterman <raster@rasterman.com>

%package filters
License:        BSD3c(or similar)
Summary:        Imlib 2 - plugin filters
Group:          Development/Libraries/X11
Requires:       %{name} = %{version}

%description filters
This package has the basic set of plugin filters that come with Imlib2.



Authors:
--------
    Rasterman <raster@rasterman.com>

%package loaders
License:        BSD3c(or similar)
Summary:        Imlib 2 - image loaders
Group:          Development/Libraries/X11
Provides:       imlib2-loader_jpeg imlib2-loader_png imlib2-loader_argb imlib2-loader_tiff imlib2-loader_gif imlib2-loader_zlib imlib2-loader_bz2 imlib2-loader_pnm imlib2-loader_bmp imlib2-loader_xpm imlib2-loader_tga

%description loaders
This package contains the imlib2 image loaders for: argb, bmp, gif,
jpeg, png, pnm, tga, tiff, xpm



Authors:
--------
    Rasterman <raster@rasterman.com>

%prep
%setup -q

%build
autoreconf --force --install
%configure --prefix=%{_prefix} \
%ifarch %ix86
	--enable-mmx \
%else
	--disable-mmx \
%endif
%ifarch x86_64
	--enable-amd64 \
%endif
	--bindir=%{_bindir} \
	--libdir=%{_libdir} \
	--includedir=%{_includedir} \
	--with-ttf=/usr \
	--enable-shared \
	--enable-visibility-hiding \
	--disable-static
make %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
pushd $RPM_BUILD_ROOT%_bindir/
 for i in *imlib2-config ; do
  test "$i" != "imlib2-config" || continue
  ln -s $i imlib2-config
 done
popd
# find $RPM_BUILD_ROOT -name \*.la | xargs perl -pi -e "s@$RPM_BUILD_DIR@.@g"
# find $RPM_BUILD_ROOT/%{_libdir}/imlib2_loaders -name \*.la | xargs rm

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING doc/index.html 
%doc doc/imlib2.gif doc/blank.gif
%_libdir/lib*.so.*
%_bindir/imlib2_bumpmap
%_bindir/imlib2_colorspace
%_bindir/imlib2_conv
%_bindir/imlib2_poly
%_bindir/imlib2_show
%_bindir/imlib2_test
%_bindir/imlib2_view
%_bindir/imlib2_grab
%attr(755,root,root) %dir %{_prefix}/share/imlib2
%{_prefix}/share/imlib2/*

%files devel
%defattr(-,root,root,0755)
%_libdir/*.la
%_libdir/pkgconfig/imlib2.pc
%_includedir/*
%_libdir/lib*.so
%_bindir/imlib2-config

%files filters
%attr(755,root,root) %dir %{_libdir}/imlib2
%attr(755,root,root) %{_libdir}/imlib2/filters

%files loaders
%attr(755,root,root) %dir %{_libdir}/imlib2
%attr(755,root,root) %{_libdir}/imlib2/loaders

%changelog