]>
Commit | Line | Data |
---|---|---|
1 | # TODO: use system libraries (if possible): | |
2 | # libjpeg 9a | |
3 | # libpng 1.6.16 | |
4 | # libtiff 4.0.4+CVS | |
5 | # libraw 0.17-alpha1 | |
6 | # openjpeg 2.1.0+svn | |
7 | # zlib 1.2.8 | |
8 | # libwebp 0.4.2+git | |
9 | # LibJXR 1.1+git | |
10 | # OpenEXR 2.2.0 | |
11 | %define fver %(echo %{version} | tr -d .) | |
12 | Summary: Library for handling different graphics files formats | |
13 | Summary(pl.UTF-8): Biblioteka do manipulacji różnymi formatami plików graficznych | |
14 | Name: FreeImage | |
15 | Version: 3.17.0 | |
16 | Release: 2 | |
17 | License: GPL and FIPL v1.0 (see the license-fi.txt) | |
18 | Group: Libraries | |
19 | Source0: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.zip | |
20 | # Source0-md5: 459e15f0ec75d6efa3c7bd63277ead86 | |
21 | Source1: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf | |
22 | # Source1-md5: 9d7e12d5062b51082407a6d69aa7d020 | |
23 | Patch0: %{name}-libwebp-cpp.patch | |
24 | URL: http://freeimage.sourceforge.net/index.html | |
25 | BuildRequires: libstdc++-devel | |
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 | ||
35 | %description -l pl.UTF-8 | |
36 | FreeImage jest projektem biblioteki dla programistów chcących | |
37 | obsługiwać popularne formaty plików graficznych takie jak PNG, BMP, | |
38 | JPEG, TIFF i inne wykorzystywane w aplikacjach multimedialnych. | |
39 | FreeImage jest łatwy w użyciu, szybki, wielowątkowy i bezpieczny. | |
40 | ||
41 | %package devel | |
42 | Summary: Header files for FreeImage library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeImage | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | ||
47 | %description devel | |
48 | Header files for FreeImage library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki FreeImage. | |
52 | ||
53 | %package static | |
54 | Summary: Static FreeImage library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka FreeImage | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static FreeImage library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka FreeImage. | |
64 | ||
65 | %prep | |
66 | %setup -q -n %{name} | |
67 | %patch0 -p1 | |
68 | ||
69 | %build | |
70 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ | |
71 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
72 | %{__make} \ | |
73 | CC="%{__cc}" \ | |
74 | CXX="%{__cxx}" | |
75 | ||
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 | ||
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 | ||
93 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} | |
94 | ln -sf libfreeimage-%{version}.so \ | |
95 | $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so | |
96 | ln -sf libfreeimageplus-%{version}.so \ | |
97 | $RPM_BUILD_ROOT%{_libdir}/libfreeimageplus.so | |
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 | |
109 | %attr(755,root,root) %ghost %{_libdir}/libfreeimage.so.3 | |
110 | %attr(755,root,root) %{_libdir}/libfreeimageplus-*.*.*.so | |
111 | %attr(755,root,root) %ghost %{_libdir}/libfreeimageplus.so.3 | |
112 | ||
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
115 | %doc FreeImage%{fver}.pdf | |
116 | %attr(755,root,root) %{_libdir}/libfreeimage.so | |
117 | %attr(755,root,root) %{_libdir}/libfreeimageplus.so | |
118 | %{_includedir}/FreeImage.h | |
119 | %{_includedir}/FreeImagePlus.h | |
120 | %{_examplesdir}/%{name}-%{version} | |
121 | ||
122 | %files static | |
123 | %defattr(644,root,root,755) | |
124 | %{_libdir}/libfreeimage.a | |
125 | %{_libdir}/libfreeimageplus.a |