]>
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 JB |
15 | Version: 3.17.0 |
16 | Release: 1 | |
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 |
941b4a25 | 23 | URL: http://freeimage.sourceforge.net/index.html |
7dc0d81d | 24 | BuildRequires: libstdc++-devel |
941b4a25 | 25 | BuildRequires: unzip |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | FreeImage is a library project for developers who would like to | |
30 | support popular graphics image formats like PNG, BMP, JPEG, TIFF and | |
31 | others as needed by multimedia applications. FreeImage is easy to use, | |
32 | fast, multithreading, safe. | |
33 | ||
9c7860e7 | 34 | %description -l pl.UTF-8 |
12be9d48 JB |
35 | FreeImage jest projektem biblioteki dla programistów chcących |
36 | obsługiwać popularne formaty plików graficznych takie jak PNG, BMP, | |
941b4a25 | 37 | JPEG, TIFF i inne wykorzystywane w aplikacjach multimedialnych. |
9c7860e7 | 38 | FreeImage jest łatwy w użyciu, szybki, wielowątkowy i bezpieczny. |
941b4a25 | 39 | |
40 | %package devel | |
41 | Summary: Header files for FreeImage library | |
30392037 | 42 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeImage |
941b4a25 | 43 | Group: Development/Libraries |
44 | Requires: %{name} = %{version}-%{release} | |
45 | ||
46 | %description devel | |
47 | Header files for FreeImage library. | |
48 | ||
9c7860e7 JR |
49 | %description devel -l pl.UTF-8 |
50 | Pliki nagłówkowe biblioteki FreeImage. | |
941b4a25 | 51 | |
52 | %package static | |
53 | Summary: Static FreeImage library | |
30392037 | 54 | Summary(pl.UTF-8): Statyczna biblioteka FreeImage |
941b4a25 | 55 | Group: Development/Libraries |
56 | Requires: %{name}-devel = %{version}-%{release} | |
57 | ||
58 | %description static | |
59 | Static FreeImage library. | |
60 | ||
9c7860e7 | 61 | %description static -l pl.UTF-8 |
941b4a25 | 62 | Statyczna biblioteka FreeImage. |
63 | ||
64 | %prep | |
65 | %setup -q -n %{name} | |
66 | ||
67 | %build | |
1deef207 JB |
68 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
69 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
941b4a25 | 70 | %{__make} \ |
39cd7938 | 71 | CC="%{__cc}" \ |
1deef207 | 72 | CXX="%{__cxx}" |
941b4a25 | 73 | |
d68b93b3 JB |
74 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
75 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
76 | %{__make} -f Makefile.fip \ | |
77 | CC="%{__cc}" \ | |
78 | CXX="%{__cxx}" | |
79 | ||
941b4a25 | 80 | %install |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} | |
83 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
84 | ||
85 | install Dist/libfreeimage* $RPM_BUILD_ROOT%{_libdir} | |
86 | install Dist/*.h $RPM_BUILD_ROOT%{_includedir} | |
87 | ||
88 | cp -rf Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
89 | cp -f %{SOURCE1} . | |
90 | ||
1deef207 | 91 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} |
941b4a25 | 92 | ln -sf libfreeimage-%{version}.so \ |
93 | $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so | |
d68b93b3 JB |
94 | ln -sf libfreeimageplus-%{version}.so \ |
95 | $RPM_BUILD_ROOT%{_libdir}/libfreeimageplus.so | |
941b4a25 | 96 | |
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post -p /sbin/ldconfig | |
101 | %postun -p /sbin/ldconfig | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc README.linux Whatsnew.txt license-fi.txt | |
106 | %attr(755,root,root) %{_libdir}/libfreeimage-*.*.*.so | |
1deef207 | 107 | %attr(755,root,root) %ghost %{_libdir}/libfreeimage.so.3 |
d68b93b3 JB |
108 | %attr(755,root,root) %{_libdir}/libfreeimageplus-*.*.*.so |
109 | %attr(755,root,root) %ghost %{_libdir}/libfreeimageplus.so.3 | |
941b4a25 | 110 | |
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
40c56dec | 113 | %doc FreeImage%{fver}.pdf |
941b4a25 | 114 | %attr(755,root,root) %{_libdir}/libfreeimage.so |
d68b93b3 | 115 | %attr(755,root,root) %{_libdir}/libfreeimageplus.so |
39cd7938 | 116 | %{_includedir}/FreeImage.h |
d68b93b3 | 117 | %{_includedir}/FreeImagePlus.h |
941b4a25 | 118 | %{_examplesdir}/%{name}-%{version} |
119 | ||
120 | %files static | |
121 | %defattr(644,root,root,755) | |
39cd7938 | 122 | %{_libdir}/libfreeimage.a |
d68b93b3 | 123 | %{_libdir}/libfreeimageplus.a |