]>
Commit | Line | Data |
---|---|---|
03001d2c | 1 | # TODO: jbigkit, zstd support |
fc43d37a JB |
2 | Summary: Library for handling TIFF files - cross MinGW32 version |
3 | Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie TIFF - wersja skrośna MinGW32 | |
9a892315 JB |
4 | %define realname libtiff |
5 | Name: crossmingw32-%{realname} | |
03001d2c | 6 | Version: 4.0.10 |
258cbce6 | 7 | Release: 1 |
aaf747bd | 8 | License: BSD-like |
9c36ab3b | 9 | Group: Development/Libraries |
51c63957 | 10 | Source0: http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz |
03001d2c | 11 | # Source0-md5: 114192d7ebe537912a2b97408832e7fd |
51c63957 | 12 | Patch0: %{realname}-glut.patch |
aaf747bd | 13 | URL: http://www.remotesensing.org/libtiff/ |
51c63957 | 14 | BuildRequires: autoconf >= 2.64 |
ede1b237 | 15 | BuildRequires: automake >= 1:1.11 |
99ba0ced | 16 | BuildRequires: crossmingw32-gcc-c++ |
aaf747bd | 17 | BuildRequires: crossmingw32-libjpeg |
03001d2c | 18 | BuildRequires: crossmingw32-libwebp |
aaf747bd | 19 | BuildRequires: crossmingw32-zlib |
51c63957 | 20 | BuildRequires: libtool >= 2:2.2 |
9c36ab3b | 21 | Requires: crossmingw32-libjpeg |
03001d2c | 22 | Requires: crossmingw32-libwebp |
51c63957 | 23 | Requires: crossmingw32-xz |
9c36ab3b | 24 | Requires: crossmingw32-zlib |
aaf747bd | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
aaf747bd | 27 | %define no_install_post_strip 1 |
28 | ||
29 | %define target i386-mingw32 | |
30 | %define target_platform i386-pc-mingw32 | |
aaf747bd | 31 | |
32 | %define _sysprefix /usr | |
33 | %define _prefix %{_sysprefix}/%{target} | |
9a892315 | 34 | %define _libdir %{_prefix}/lib |
51c63957 | 35 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
899284cc | 36 | %define _dlldir /usr/share/wine/windows/system |
aaf747bd | 37 | %define __cc %{target}-gcc |
38 | %define __cxx %{target}-g++ | |
70c709b6 | 39 | %define __pkgconfig_provides %{nil} |
98db55d9 | 40 | %define __pkgconfig_requires %{nil} |
aaf747bd | 41 | |
ede1b237 JB |
42 | %ifnarch %{ix86} |
43 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
44 | %define optflags -O2 | |
45 | %endif | |
49e1f909 | 46 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
ede1b237 | 47 | %define filterout_ld -Wl,-z,.* |
49e1f909 JB |
48 | %define filterout_c -f[-a-z0-9=]* |
49 | %define filterout_cxx -f[-a-z0-9=]* | |
ede1b237 | 50 | |
aaf747bd | 51 | %description |
9c36ab3b | 52 | This package is a library of functions that manipulate TIFF images |
fc43d37a | 53 | (cross MinGW32 version). |
aaf747bd | 54 | |
55 | %description -l pl.UTF-8 | |
56 | Ten pakiet zawiera bibliotekę pozwalającą manipulować plikami w | |
fc43d37a | 57 | formacie TIFF (w wersji skrośnej MinGW32). |
9c36ab3b JB |
58 | |
59 | %package static | |
fc43d37a JB |
60 | Summary: Static libtiff library (cross MinGW32 version) |
61 | Summary(pl.UTF-8): Statyczna biblioteka libtiff (wersja skrośna MinGW32) | |
9c36ab3b JB |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description static | |
fc43d37a | 66 | Static libtiff library (cross MinGW32 version). |
9c36ab3b JB |
67 | |
68 | %description static -l pl.UTF-8 | |
fc43d37a | 69 | Statyczna biblioteka libtiff (wersja skrośna MinGW32). |
aaf747bd | 70 | |
9c36ab3b JB |
71 | %package dll |
72 | Summary: DLL libtiff library for Windows | |
73 | Summary(pl.UTF-8): Biblioteka DLL libtiff dla Windows | |
74 | Group: Applications/Emulators | |
75 | Requires: wine | |
76 | Requires: crossmingw32-libjpeg-dll | |
03001d2c | 77 | Requires: crossmingw32-libwebp-dll |
51c63957 | 78 | Requires: crossmingw32-xz-dll |
9c36ab3b JB |
79 | Requires: crossmingw32-zlib-dll |
80 | ||
81 | %description dll | |
82 | DLL libtiff library for Windows. | |
83 | ||
84 | %description dll -l pl.UTF-8 | |
85 | Biblioteka DLL libtiff dla Windows. | |
aaf747bd | 86 | |
87 | %package cxx | |
fc43d37a JB |
88 | Summary: libtiff C++ streams library (cross MinGW32 version) |
89 | Summary(pl.UTF-8): Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32) | |
9c36ab3b | 90 | Group: Development/Libraries |
aaf747bd | 91 | Requires: %{name} = %{version}-%{release} |
92 | ||
93 | %description cxx | |
fc43d37a | 94 | libtiff C++ streams library (cross MinGW32 version). |
aaf747bd | 95 | |
96 | %description cxx -l pl.UTF-8 | |
fc43d37a | 97 | Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32). |
9c36ab3b JB |
98 | |
99 | %package cxx-static | |
fc43d37a JB |
100 | Summary: Static libtiff C++ streams library (cross MinGW32 version) |
101 | Summary(pl.UTF-8): Statyczna biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32) | |
9c36ab3b JB |
102 | Group: Development/Libraries |
103 | Requires: %{name}-cxx = %{version}-%{release} | |
104 | ||
105 | %description cxx-static | |
fc43d37a | 106 | Static libtiff C++ streams library (cross MinGW32 version). |
9c36ab3b JB |
107 | |
108 | %description cxx-static -l pl.UTF-8 | |
109 | Statyczna biblioteka strumieni C++ dla libtiff (wersja skrośna | |
fc43d37a | 110 | MinGW32). |
9c36ab3b JB |
111 | |
112 | %package cxx-dll | |
113 | Summary: DLL libtiff C++ streams library for Windows | |
114 | Summary(pl.UTF-8): Biblioteka DLL strumieni C++ libtiff dla Windows | |
115 | Group: Applications/Emulators | |
116 | Requires: %{name}-dll = %{version}-%{release} | |
117 | ||
118 | %description cxx-dll | |
119 | DLL libtiff C++ streams library for Windows. | |
120 | ||
121 | %description cxx-dll -l pl.UTF-8 | |
122 | Biblioteka DLL strumieni C++ libtiff dla Windows. | |
aaf747bd | 123 | |
124 | %prep | |
125 | %setup -q -n tiff-%{version} | |
aaf747bd | 126 | %patch0 -p1 |
aaf747bd | 127 | |
128 | %build | |
aaf747bd | 129 | %{__libtoolize} |
130 | %{__aclocal} -I m4 | |
131 | %{__autoconf} | |
132 | %{__autoheader} | |
133 | %{__automake} | |
134 | %configure \ | |
9c36ab3b | 135 | lt_cv_deplibs_check_method=pass_all \ |
aaf747bd | 136 | --target=%{target} \ |
4a078997 | 137 | --host=%{target} \ |
138 | --enable-static | |
aaf747bd | 139 | %{__make} |
140 | ||
141 | %install | |
142 | rm -rf $RPM_BUILD_ROOT | |
aaf747bd | 143 | |
144 | %{__make} install \ | |
145 | DESTDIR=$RPM_BUILD_ROOT | |
146 | ||
9c36ab3b JB |
147 | install -d $RPM_BUILD_ROOT%{_dlldir} |
148 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
149 | ||
150 | %if 0%{!?debug:1} | |
151 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
152 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
153 | %endif | |
154 | ||
51c63957 JB |
155 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,man} |
156 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe | |
aaf747bd | 157 | |
158 | %clean | |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
161 | %files | |
162 | %defattr(644,root,root,755) | |
03001d2c | 163 | %doc COPYRIGHT ChangeLog README.md TODO |
9c36ab3b | 164 | %{_libdir}/libtiff.dll.a |
aaf747bd | 165 | %{_libdir}/libtiff.la |
aaf747bd | 166 | %{_includedir}/tiff*.h |
51c63957 | 167 | %{_pkgconfigdir}/libtiff-4.pc |
aaf747bd | 168 | |
9c36ab3b JB |
169 | %files static |
170 | %defattr(644,root,root,755) | |
171 | %{_libdir}/libtiff.a | |
172 | ||
173 | %files dll | |
174 | %defattr(644,root,root,755) | |
175 | %{_dlldir}/libtiff-*.dll | |
176 | ||
aaf747bd | 177 | %files cxx |
178 | %defattr(644,root,root,755) | |
9c36ab3b | 179 | %{_libdir}/libtiffxx.dll.a |
aaf747bd | 180 | %{_libdir}/libtiffxx.la |
aaf747bd | 181 | %{_includedir}/tiffio.hxx |
9c36ab3b JB |
182 | |
183 | %files cxx-static | |
184 | %defattr(644,root,root,755) | |
185 | %{_libdir}/libtiffxx.a | |
186 | ||
187 | %files cxx-dll | |
188 | %defattr(644,root,root,755) | |
189 | %{_dlldir}/libtiffxx-*.dll |