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