%define lib_major 1 %define lib_name %{name}%{lib_major} %define buildsolib 1 %define name liblcms %define fname lcms %define version 1.08 %define versioninfo 1:8:0 %define release 3mdk Name: %{name} Summary: Little cms color engine Version: %{version} Release: %{release} License: LGPL Source0: http://www.littlecms.com/%{fname}-%{version}.tar.bz2 URL: http://www.littlecms.com Group: Graphics BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc %description This is a CMM engine to deal with color management stuff. %if %{buildsolib} %package -n %{lib_name} Summary: Little cms color engine Group: System/Libraries Obsoletes: %{name} Provides: %{name} %description -n %{lib_name} This package contains the library needed to run programs dynamically linked with liblcms. %endif %package -n %{lib_name}-devel Summary: Header files and static library for development with LCMS Group: Development/C Requires: %{lib_name} = %{version} Provides: %{name}-devel Obsoletes: %{name}-devel %description -n %{lib_name}-devel This package is only needed if you plan to develop or compile applications which requires the LCMS library. %prep %setup -n %{fname}-%{version} %build CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-fast-math -I ../include -DNDEBUG" export CC CFLAGS (cd src $CC $CFLAGS -c *.c ar cru liblcms.a *.o ranlib liblcms.a) # %if %{buildsolib} (cd src for i in *.c; do libtool --mode=compile $CC $CFLAGS -c $i; done libtool --mode=link $CC $CFLAGS -o liblcms.la \ -rpath %{_libdir} -version-info %{versioninfo} *.lo -lm) %endif # (cd testbed $CC $CFLAGS -I ../src testcms.c ../src/liblcms.a -o testcms -lm ./testcms) mv -f doc samples %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} \ $RPM_BUILD_ROOT%{_libdir} \ $RPM_BUILD_ROOT%{_includedir}/lcms \ $RPM_BUILD_ROOT%{_datadir}/lcms-%{version} cp -a testbed/*.icm $RPM_BUILD_ROOT%{_datadir}/lcms-%{version} (cd src install -m 644 ../include/lcms.h ../include/icc34.h $RPM_BUILD_ROOT%{_includedir}/lcms install -m 644 liblcms.a $RPM_BUILD_ROOT%{_libdir}) # %if %{buildsolib} (cd src libtool --mode=install install -c liblcms.la \ $RPM_BUILD_ROOT%{_libdir}/liblcms.la) %endif # (cd testbed install -m 755 testcms $RPM_BUILD_ROOT%{_bindir}) %clean rm -rf $RPM_BUILD_ROOT %if %{buildsolib} %post -p /sbin/ldconfig -n %{lib_name} %postun -p /sbin/ldconfig -n %{lib_name} %files -n %{lib_name} %defattr(-,root,root) %doc COPYING README %{_datadir}/lcms-%{version} %{_libdir}/*.so.* %endif %files -n %{lib_name}-devel %defattr(-,root,root) %doc AUTHORS COPYING INSTALL NEWS README samples %dir %{_includedir}/lcms %{_bindir}/* %attr(644,root,root) %{_includedir}/lcms/* %{_libdir}/*.a %if %{buildsolib} %{_libdir}/*.la %{_libdir}/*.so %else %{_datadir}/lcms-%{version} %endif %changelog * Sat Feb 16 2002 Stefan van der Eijk <stefan@eijk.nu> 1.08-3mdk - BuildRequires * Sun Jan 20 2002 Daouda LO <daouda@mandrakesoft.com> 1.08-2mdk - rebuild liblcms. * Mon Jan 07 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.08-1mdk - updated to release 1.08. * Wed Mar 09 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.07-3mdk - added dynamic lib package again to calm the cooker ML... ;-) * Fri Mar 09 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.07-2mdk - removed dynamic lib package. * Wed Mar 07 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.07-1mdk - moved include files to /usr/include/lcms - 1.06 -> 1.07. - dynamic libraries no longer built. * Thu Jan 25 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.06-3mdk - new libname scheme. * Sun Jan 14 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.06-2mdk - reverted %%make to make. * Tue Dec 26 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.06-1mdk - initial release.