Blob Blame History Raw
Name:           DevIL
Version:        1.6.8
Release:        0.13.rc2%{?dist}
Summary:        A cross-platform image library
Group:          System Environment/Libraries
License:        LGPLv2
URL:            http://openil.sourceforge.net/
Source0:        http://dl.sf.net/openil/%{name}-%{version}-rc2.tar.bz2
Patch0:         DevIL-1.6.8-rc2-allegropicfix.patch
Patch1:         DevIL-1.6.8-rc2-ilut_h.patch
Patch2:         DevIL-1.6.8-rc2-il_wrap_h.patch
Patch3:         DevIL-1.6.8-rc2-ilu_region.patch
Patch4:         DevIL-1.6.8-rc2-il_endian_h.patch
Patch5:         DevIL-1.6.8-rc2-il_io_c.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  allegro-devel
BuildRequires:  lcms-devel
BuildRequires:  libGLU-devel
BuildRequires:  libICE-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libmng-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  SDL-devel => 1.2.5

%description
Developer's Image Library (DevIL) is a programmer's library to develop
applications with very powerful image loading capabilities, yet is easy for a
developer to learn and use. Ultimate control of images is left to the
developer, so unnecessary conversions, etc. are not performed. DevIL utilizes
a simple, yet powerful, syntax. DevIL can load, save, convert, manipulate,
filter and display a wide variety of image formats.


%package devel
Summary:        Development files for DevIL
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
Development files for DevIL


%package ILUT
Summary:        The libILUT component of DevIL
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}

%description ILUT
The libILUT component of DevIL


%package ILUT-devel
Summary:        Development files for the libILUT component of DevIL
Group:          Development/Libraries
Requires:       %{name}-ILUT = %{version}-%{release}
Requires:       %{name}-devel = %{version}-%{release}
Requires:       allegro-devel
Requires:       libGLU-devel

%description ILUT-devel
Development files for the libILUT component of DevIL


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# Convert to UTF8
iconv -f iso8859-1 CREDITS -t utf8 > CREDITS.conv \
    && /bin/mv -f CREDITS.conv CREDITS


%build
%configure
make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

#Some cleanups
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/*.a

#Replace autoconf generated config.h to avoid potential define collisions
cat >%{buildroot}%{_includedir}/IL/config.h <<EOF
/* Support Allegro API */
#define ILUT_USE_ALLEGRO

/* Support OpenGL API */
#define ILUT_USE_OPENGL

/* Support SDL API */
#define ILUT_USE_SDL
EOF


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%post ILUT -p /sbin/ldconfig
%postun ILUT -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%{_libdir}/libIL.so.*
%{_libdir}/libILU.so.*
%doc AUTHORS ChangeLog COPYING CREDITS README TODO


%files devel
%defattr(-,root,root,-)
%{_libdir}/libIL.so
%{_libdir}/libILU.so
%dir %{_includedir}/IL
%{_includedir}/IL/devil_internal_exports.h
%{_includedir}/IL/il.h
%{_includedir}/IL/ilu.h
%{_includedir}/IL/ilu_region.h


%files ILUT
%{_libdir}/libILUT.so.*


%files ILUT-devel
%{_libdir}/libILUT.so
%{_includedir}/IL/config.h
%{_includedir}/IL/ilut.h
%{_includedir}/IL/il_wrap.h


%changelog
* Wed Aug 22 2007 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.13.rc2
- Release bump for F8 mass rebuild
- Added patch to fix BZ #253639

* Tue Aug 07 2007 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.12.rc2
- Split libILUT into separate package. See BZ #250734
- Removed some old provides:
- Convert the CREDITS to UTF8
- Updated license field due to new guidelines

* Tue Jan 02 2007 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.11.rc2
- Added patch to fix endian issues with some SGI files. Courtesy of Scott A.
  Friedman (BZ #220417)

* Thu Sep 07 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.10.rc2
- Upgrade to 1.6.8-rc2
- Added libICE-devel buildrequire
- Dropped DevIL-1.6.8-rc1-64bit.patch, fixed upstream
- Updated allegropicfix.patch for new version
- Updated and split header fixes into separate files for easier maintenance

* Mon Aug 28 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.9.rc1
- Release bump for FC6 mass rebuild

* Fri Jun 09 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.8.rc1
- Added patch courtesy of Hans de Goede to fix crashes on 64bit systems

* Wed May 31 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.7.rc1
- Added libGLU-devel to buildrequires
- Dropped libGL-devel from requires for devel package

* Sun May 28 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.6.rc1.iss
- Dropped xorg-x11-devel as a buildrequire
- Dropped zlib-devel as a buildrequire
- Dropped xorg-x11-devel as a require for the devel package
- Added libGL-devel and libGLU-devel as requires for devel package
- Dropped superfluous documentation from devel package
- Added provides to offer lower case alias in preparation for probable
  policy change
- Replace autoconf generated config.h in devel package to avoid potential
  define collisions
- Replace source URL with primary sf site, rather than a mirror
- Fix ilu_region.h to use IL\il.h and not ilu_internal.h and roll into
  a single patch incorporating previous header fixes.

* Sat May 27 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.5.rc1.iss
- Added patch to stop linking against alleg_unsharable, otherwise non PIC code
  is included in the library
- Use %%{?dist} for most recent changelog entry - avoids incoherent changelog
  versions if %%{?dist} macro is missing or different.

* Fri May 26 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.4.rc1.iss
- Made zlib-devel and xorg-x11-devel explicit buildrequires
- Corrected release name format to 0.%%{X}.%%{alphatag} from 0.%%{alphatag}.%%{X}
- Added -q to %%setup
- Added %%{version}-%%{release} to provides field

* Sun May 21 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.RC1.3.iss
- Use Fedora's libtool, seems to fix rpaths problem on x86_64.

* Sun May 14 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.RC1.2.iss
- Now compiled against allegro

* Sat May 13 2006 Ian Chapman <packages@amiga-hardware.com> 1.6.8-0.RC1.1.iss
- Initial Release