]>
Commit | Line | Data |
---|---|---|
1deef207 JB |
1 | # TODO: use system libraries (if possible): |
2 | # libjpeg 9a | |
b207da31 JB |
3 | # libpng 1.6.16 |
4 | # libtiff 4.0.4+CVS | |
5 | # libraw 0.17-alpha1 | |
1deef207 JB |
6 | # openjpeg 2.1.0+svn |
7 | # zlib 1.2.8 | |
b207da31 | 8 | # libwebp 0.4.2+git |
1deef207 | 9 | # LibJXR 1.1+git |
b207da31 | 10 | # OpenEXR 2.2.0 |
40c56dec | 11 | %define fver %(echo %{version} | tr -d .) |
941b4a25 | 12 | Summary: Library for handling different graphics files formats |
30392037 | 13 | Summary(pl.UTF-8): Biblioteka do manipulacji różnymi formatami plików graficznych |
941b4a25 | 14 | Name: FreeImage |
b207da31 | 15 | Version: 3.17.0 |
16d31c95 | 16 | Release: 2 |
40c56dec | 17 | License: GPL and FIPL v1.0 (see the license-fi.txt) |
941b4a25 | 18 | Group: Libraries |
40c56dec | 19 | Source0: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.zip |
b207da31 | 20 | # Source0-md5: 459e15f0ec75d6efa3c7bd63277ead86 |
40c56dec | 21 | Source1: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf |
b207da31 | 22 | # Source1-md5: 9d7e12d5062b51082407a6d69aa7d020 |
16d31c95 | 23 | Patch0: %{name}-libwebp-cpp.patch |
941b4a25 | 24 | URL: http://freeimage.sourceforge.net/index.html |
7dc0d81d | 25 | BuildRequires: libstdc++-devel |
941b4a25 | 26 | BuildRequires: unzip |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | FreeImage is a library project for developers who would like to | |
31 | support popular graphics image formats like PNG, BMP, JPEG, TIFF and | |
32 | others as needed by multimedia applications. FreeImage is easy to use, | |
33 | fast, multithreading, safe. | |
34 | ||
9c7860e7 | 35 | %description -l pl.UTF-8 |
12be9d48 JB |
36 | FreeImage jest projektem biblioteki dla programistów chcących |
37 | obsługiwać popularne formaty plików graficznych takie jak PNG, BMP, | |
941b4a25 | 38 | JPEG, TIFF i inne wykorzystywane w aplikacjach multimedialnych. |
9c7860e7 | 39 | FreeImage jest łatwy w użyciu, szybki, wielowątkowy i bezpieczny. |
941b4a25 | 40 | |
41 | %package devel | |
42 | Summary: Header files for FreeImage library | |
30392037 | 43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeImage |
941b4a25 | 44 | Group: Development/Libraries |
45 | Requires: %{name} = %{version}-%{release} | |
46 | ||
47 | %description devel | |
48 | Header files for FreeImage library. | |
49 | ||
9c7860e7 JR |
50 | %description devel -l pl.UTF-8 |
51 | Pliki nagłówkowe biblioteki FreeImage. | |
941b4a25 | 52 | |
53 | %package static | |
54 | Summary: Static FreeImage library | |
30392037 | 55 | Summary(pl.UTF-8): Statyczna biblioteka FreeImage |
941b4a25 | 56 | Group: Development/Libraries |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static FreeImage library. | |
61 | ||
9c7860e7 | 62 | %description static -l pl.UTF-8 |
941b4a25 | 63 | Statyczna biblioteka FreeImage. |
64 | ||
65 | %prep | |
66 | %setup -q -n %{name} | |
16d31c95 | 67 | %patch0 -p1 |
941b4a25 | 68 | |
69 | %build | |
1deef207 JB |
70 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
71 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
941b4a25 | 72 | %{__make} \ |
39cd7938 | 73 | CC="%{__cc}" \ |
1deef207 | 74 | CXX="%{__cxx}" |
941b4a25 | 75 | |
d68b93b3 JB |
76 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
77 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
78 | %{__make} -f Makefile.fip \ | |
79 | CC="%{__cc}" \ | |
80 | CXX="%{__cxx}" | |
81 | ||
941b4a25 | 82 | %install |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} | |
85 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
86 | ||
87 | install Dist/libfreeimage* $RPM_BUILD_ROOT%{_libdir} | |
88 | install Dist/*.h $RPM_BUILD_ROOT%{_includedir} | |
89 | ||
90 | cp -rf Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
91 | cp -f %{SOURCE1} . | |
92 | ||
1deef207 | 93 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} |
941b4a25 | 94 | ln -sf libfreeimage-%{version}.so \ |
95 | $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so | |
d68b93b3 JB |
96 | ln -sf libfreeimageplus-%{version}.so \ |
97 | $RPM_BUILD_ROOT%{_libdir}/libfreeimageplus.so | |
941b4a25 | 98 | |
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %post -p /sbin/ldconfig | |
103 | %postun -p /sbin/ldconfig | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %doc README.linux Whatsnew.txt license-fi.txt | |
108 | %attr(755,root,root) %{_libdir}/libfreeimage-*.*.*.so | |
1deef207 | 109 | %attr(755,root,root) %ghost %{_libdir}/libfreeimage.so.3 |
d68b93b3 JB |
110 | %attr(755,root,root) %{_libdir}/libfreeimageplus-*.*.*.so |
111 | %attr(755,root,root) %ghost %{_libdir}/libfreeimageplus.so.3 | |
941b4a25 | 112 | |
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
40c56dec | 115 | %doc FreeImage%{fver}.pdf |
941b4a25 | 116 | %attr(755,root,root) %{_libdir}/libfreeimage.so |
d68b93b3 | 117 | %attr(755,root,root) %{_libdir}/libfreeimageplus.so |
39cd7938 | 118 | %{_includedir}/FreeImage.h |
d68b93b3 | 119 | %{_includedir}/FreeImagePlus.h |
941b4a25 | 120 | %{_examplesdir}/%{name}-%{version} |
121 | ||
122 | %files static | |
123 | %defattr(644,root,root,755) | |
39cd7938 | 124 | %{_libdir}/libfreeimage.a |
d68b93b3 | 125 | %{_libdir}/libfreeimageplus.a |