1 # TODO: use system libraries (if possible)
2 %define fver %(echo %{version} | tr -d .)
3 Summary: Library for handling different graphics files formats
4 Summary(pl.UTF-8): Biblioteka do manipulacji różnymi formatami plików graficznych
8 License: GPL and FIPL v1.0 (see the license-fi.txt)
10 Source0: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.zip
11 # Source0-md5: 9f9a3b2c3c1b4fd24fe479e8aaee86b1
12 Source1: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf
13 # Source1-md5: acfbb9bcf5f5ee5ab77824c666a39a15
14 Patch0: %{name}-includes.patch
15 URL: http://freeimage.sourceforge.net/index.html
16 BuildRequires: libstdc++-devel
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 FreeImage is a library project for developers who would like to
22 support popular graphics image formats like PNG, BMP, JPEG, TIFF and
23 others as needed by multimedia applications. FreeImage is easy to use,
24 fast, multithreading, safe.
26 %description -l pl.UTF-8
27 FreeImage jest projektem biblioteki dla programistów chcących
28 obsługiwać popularne formaty plików graficznych takie jak PNG, BMP,
29 JPEG, TIFF i inne wykorzystywane w aplikacjach multimedialnych.
30 FreeImage jest łatwy w użyciu, szybki, wielowątkowy i bezpieczny.
33 Summary: Header files for FreeImage library
34 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeImage
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
39 Header files for FreeImage library.
41 %description devel -l pl.UTF-8
42 Pliki nagłówkowe biblioteki FreeImage.
45 Summary: Static FreeImage library
46 Summary(pl.UTF-8): Statyczna biblioteka FreeImage
47 Group: Development/Libraries
48 Requires: %{name}-devel = %{version}-%{release}
51 Static FreeImage library.
53 %description static -l pl.UTF-8
54 Statyczna biblioteka FreeImage.
64 CFLAGS='%{rpmcflags} -fPIC -fvisibility=hidden -DNO_LCMS $(INCLUDE)' \
65 CXXFLAGS='%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy $(INCLUDE)'
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 install Dist/libfreeimage* $RPM_BUILD_ROOT%{_libdir}
73 install Dist/*.h $RPM_BUILD_ROOT%{_includedir}
75 cp -rf Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78 ln -sf libfreeimage-%{version}.so \
79 $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so
82 rm -rf $RPM_BUILD_ROOT
84 %post -p /sbin/ldconfig
85 %postun -p /sbin/ldconfig
88 %defattr(644,root,root,755)
89 %doc README.linux Whatsnew.txt license-fi.txt
90 %attr(755,root,root) %{_libdir}/libfreeimage-*.*.*.so
93 %defattr(644,root,root,755)
94 %doc FreeImage%{fver}.pdf
95 %attr(755,root,root) %{_libdir}/libfreeimage.so
96 %{_includedir}/FreeImage.h
97 %{_examplesdir}/%{name}-%{version}
100 %defattr(644,root,root,755)
101 %{_libdir}/libfreeimage.a