]>
Commit | Line | Data |
---|---|---|
0605af56 | 1 | # TODO: use system libraries (if possible) |
40c56dec | 2 | %define fver %(echo %{version} | tr -d .) |
941b4a25 | 3 | Summary: Library for handling different graphics files formats |
30392037 | 4 | Summary(pl.UTF-8): Biblioteka do manipulacji różnymi formatami plików graficznych |
941b4a25 | 5 | Name: FreeImage |
0605af56 | 6 | Version: 3.15.4 |
0104bc9d | 7 | Release: 1 |
40c56dec | 8 | License: GPL and FIPL v1.0 (see the license-fi.txt) |
941b4a25 | 9 | Group: Libraries |
40c56dec | 10 | Source0: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.zip |
0605af56 | 11 | # Source0-md5: 9f9a3b2c3c1b4fd24fe479e8aaee86b1 |
40c56dec | 12 | Source1: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf |
0605af56 JB |
13 | # Source1-md5: acfbb9bcf5f5ee5ab77824c666a39a15 |
14 | Patch0: %{name}-includes.patch | |
941b4a25 | 15 | URL: http://freeimage.sourceforge.net/index.html |
7dc0d81d | 16 | BuildRequires: libstdc++-devel |
941b4a25 | 17 | BuildRequires: unzip |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
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. | |
25 | ||
9c7860e7 | 26 | %description -l pl.UTF-8 |
12be9d48 JB |
27 | FreeImage jest projektem biblioteki dla programistów chcących |
28 | obsługiwać popularne formaty plików graficznych takie jak PNG, BMP, | |
941b4a25 | 29 | JPEG, TIFF i inne wykorzystywane w aplikacjach multimedialnych. |
9c7860e7 | 30 | FreeImage jest łatwy w użyciu, szybki, wielowątkowy i bezpieczny. |
941b4a25 | 31 | |
32 | %package devel | |
33 | Summary: Header files for FreeImage library | |
30392037 | 34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FreeImage |
941b4a25 | 35 | Group: Development/Libraries |
36 | Requires: %{name} = %{version}-%{release} | |
37 | ||
38 | %description devel | |
39 | Header files for FreeImage library. | |
40 | ||
9c7860e7 JR |
41 | %description devel -l pl.UTF-8 |
42 | Pliki nagłówkowe biblioteki FreeImage. | |
941b4a25 | 43 | |
44 | %package static | |
45 | Summary: Static FreeImage library | |
30392037 | 46 | Summary(pl.UTF-8): Statyczna biblioteka FreeImage |
941b4a25 | 47 | Group: Development/Libraries |
48 | Requires: %{name}-devel = %{version}-%{release} | |
49 | ||
50 | %description static | |
51 | Static FreeImage library. | |
52 | ||
9c7860e7 | 53 | %description static -l pl.UTF-8 |
941b4a25 | 54 | Statyczna biblioteka FreeImage. |
55 | ||
56 | %prep | |
57 | %setup -q -n %{name} | |
0605af56 | 58 | %patch0 -p1 |
941b4a25 | 59 | |
60 | %build | |
61 | %{__make} \ | |
39cd7938 JB |
62 | CC="%{__cc}" \ |
63 | CXX="%{__cxx}" \ | |
40c56dec JB |
64 | CFLAGS='%{rpmcflags} -fPIC -fvisibility=hidden -DNO_LCMS $(INCLUDE)' \ |
65 | CXXFLAGS='%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy $(INCLUDE)' | |
941b4a25 | 66 | |
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} | |
70 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
71 | ||
72 | install Dist/libfreeimage* $RPM_BUILD_ROOT%{_libdir} | |
73 | install Dist/*.h $RPM_BUILD_ROOT%{_includedir} | |
74 | ||
75 | cp -rf Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
76 | cp -f %{SOURCE1} . | |
77 | ||
941b4a25 | 78 | ln -sf libfreeimage-%{version}.so \ |
79 | $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post -p /sbin/ldconfig | |
85 | %postun -p /sbin/ldconfig | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc README.linux Whatsnew.txt license-fi.txt | |
90 | %attr(755,root,root) %{_libdir}/libfreeimage-*.*.*.so | |
91 | ||
92 | %files devel | |
93 | %defattr(644,root,root,755) | |
40c56dec | 94 | %doc FreeImage%{fver}.pdf |
941b4a25 | 95 | %attr(755,root,root) %{_libdir}/libfreeimage.so |
39cd7938 | 96 | %{_includedir}/FreeImage.h |
941b4a25 | 97 | %{_examplesdir}/%{name}-%{version} |
98 | ||
99 | %files static | |
100 | %defattr(644,root,root,755) | |
39cd7938 | 101 | %{_libdir}/libfreeimage.a |