]>
Commit | Line | Data |
---|---|---|
1deef207 | 1 | # TODO: use system libraries (if possible): |
06ec3913 JB |
2 | # libjpeg 9c |
3 | # libpng 1.6.35 | |
4 | # libtiff 4.0.9+git | |
5 | # libraw 0.19 | |
1deef207 | 6 | # openjpeg 2.1.0+svn |
06ec3913 JB |
7 | # zlib 1.2.11 |
8 | # libwebp 1.0.0+git | |
1deef207 | 9 | # LibJXR 1.1+git |
06ec3913 | 10 | # OpenEXR 2.2.1 |
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 |
06ec3913 JB |
15 | Version: 3.18.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 |
06ec3913 | 20 | # Source0-md5: f8ba138a3be233a3eed9c456e42e2578 |
40c56dec | 21 | Source1: http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf |
06ec3913 | 22 | # Source1-md5: 01d2b93728273caec87f19949fcc4981 |
941b4a25 | 23 | URL: http://freeimage.sourceforge.net/index.html |
7dc0d81d | 24 | BuildRequires: libstdc++-devel |
06ec3913 | 25 | BuildRequires: rpmbuild(macros) >= 1.752 |
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} | |
06ec3913 | 46 | Requires: libstdc++-devel |
941b4a25 | 47 | |
48 | %description devel | |
49 | Header files for FreeImage library. | |
50 | ||
9c7860e7 JR |
51 | %description devel -l pl.UTF-8 |
52 | Pliki nagłówkowe biblioteki FreeImage. | |
941b4a25 | 53 | |
54 | %package static | |
55 | Summary: Static FreeImage library | |
30392037 | 56 | Summary(pl.UTF-8): Statyczna biblioteka FreeImage |
941b4a25 | 57 | Group: Development/Libraries |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Static FreeImage library. | |
62 | ||
9c7860e7 | 63 | %description static -l pl.UTF-8 |
941b4a25 | 64 | Statyczna biblioteka FreeImage. |
65 | ||
06ec3913 JB |
66 | %package apidocs |
67 | Summary: Documentation for FreeImage library | |
68 | Summary(pl.UTF-8): Dokumentacja do biblioteki FreeImage | |
69 | Group: Documentation | |
c4f175ae | 70 | BuildArch: noarch |
06ec3913 JB |
71 | |
72 | %description apidocs | |
73 | Documentation for FreeImage library. | |
74 | ||
75 | %description apidocs -l pl.UTF-8 | |
76 | Dokumentacja do biblioteki FreeImage. | |
77 | ||
941b4a25 | 78 | %prep |
79 | %setup -q -n %{name} | |
80 | ||
81 | %build | |
1deef207 JB |
82 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
83 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
941b4a25 | 84 | %{__make} \ |
39cd7938 | 85 | CC="%{__cc}" \ |
1deef207 | 86 | CXX="%{__cxx}" |
941b4a25 | 87 | |
d68b93b3 JB |
88 | CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \ |
89 | CXXFLAGS="%{rpmcxxflags} -fPIC -fvisibility=hidden -Wno-ctor-dtor-privacy" \ | |
90 | %{__make} -f Makefile.fip \ | |
91 | CC="%{__cc}" \ | |
92 | CXX="%{__cxx}" | |
93 | ||
941b4a25 | 94 | %install |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} | |
97 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
98 | ||
99 | install Dist/libfreeimage* $RPM_BUILD_ROOT%{_libdir} | |
100 | install Dist/*.h $RPM_BUILD_ROOT%{_includedir} | |
101 | ||
102 | cp -rf Examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
103 | cp -f %{SOURCE1} . | |
104 | ||
1deef207 | 105 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} |
941b4a25 | 106 | ln -sf libfreeimage-%{version}.so \ |
107 | $RPM_BUILD_ROOT%{_libdir}/libfreeimage.so | |
d68b93b3 JB |
108 | ln -sf libfreeimageplus-%{version}.so \ |
109 | $RPM_BUILD_ROOT%{_libdir}/libfreeimageplus.so | |
941b4a25 | 110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post -p /sbin/ldconfig | |
115 | %postun -p /sbin/ldconfig | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
06ec3913 JB |
119 | %doc README.linux README.md Whatsnew.txt license-fi.txt |
120 | %attr(755,root,root) %{_libdir}/libfreeimage-%{version}.so | |
1deef207 | 121 | %attr(755,root,root) %ghost %{_libdir}/libfreeimage.so.3 |
06ec3913 | 122 | %attr(755,root,root) %{_libdir}/libfreeimageplus-%{version}.so |
d68b93b3 | 123 | %attr(755,root,root) %ghost %{_libdir}/libfreeimageplus.so.3 |
941b4a25 | 124 | |
125 | %files devel | |
126 | %defattr(644,root,root,755) | |
941b4a25 | 127 | %attr(755,root,root) %{_libdir}/libfreeimage.so |
d68b93b3 | 128 | %attr(755,root,root) %{_libdir}/libfreeimageplus.so |
39cd7938 | 129 | %{_includedir}/FreeImage.h |
d68b93b3 | 130 | %{_includedir}/FreeImagePlus.h |
941b4a25 | 131 | %{_examplesdir}/%{name}-%{version} |
132 | ||
133 | %files static | |
134 | %defattr(644,root,root,755) | |
39cd7938 | 135 | %{_libdir}/libfreeimage.a |
d68b93b3 | 136 | %{_libdir}/libfreeimageplus.a |
06ec3913 JB |
137 | |
138 | %files apidocs | |
139 | %defattr(644,root,root,755) | |
140 | %doc FreeImage%{fver}.pdf |