- updated to 4.0.10, added dependencies for webp support
[packages/crossmingw32-libtiff.git] / crossmingw32-libtiff.spec
1 # TODO: jbigkit, zstd support
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
4 %define         realname   libtiff
5 Name:           crossmingw32-%{realname}
6 Version:        4.0.10
7 Release:        1
8 License:        BSD-like
9 Group:          Development/Libraries
10 Source0:        http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz
11 # Source0-md5:  114192d7ebe537912a2b97408832e7fd
12 Patch0:         %{realname}-glut.patch
13 URL:            http://www.remotesensing.org/libtiff/
14 BuildRequires:  autoconf >= 2.64
15 BuildRequires:  automake >= 1:1.11
16 BuildRequires:  crossmingw32-gcc-c++
17 BuildRequires:  crossmingw32-libjpeg
18 BuildRequires:  crossmingw32-libwebp
19 BuildRequires:  crossmingw32-zlib
20 BuildRequires:  libtool >= 2:2.2
21 Requires:       crossmingw32-libjpeg
22 Requires:       crossmingw32-libwebp
23 Requires:       crossmingw32-xz
24 Requires:       crossmingw32-zlib
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         no_install_post_strip   1
28
29 %define         target                  i386-mingw32
30 %define         target_platform         i386-pc-mingw32
31
32 %define         _sysprefix              /usr
33 %define         _prefix                 %{_sysprefix}/%{target}
34 %define         _libdir                 %{_prefix}/lib
35 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
36 %define         _dlldir                 /usr/share/wine/windows/system
37 %define         __cc                    %{target}-gcc
38 %define         __cxx                   %{target}-g++
39 %define         __pkgconfig_provides    %{nil}
40 %define         __pkgconfig_requires    %{nil}
41
42 %ifnarch %{ix86}
43 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
44 %define         optflags        -O2
45 %endif
46 # -z options are invalid for mingw linker, most of -f options are Linux-specific
47 %define         filterout_ld    -Wl,-z,.*
48 %define         filterout_c     -f[-a-z0-9=]*
49 %define         filterout_cxx   -f[-a-z0-9=]*
50
51 %description
52 This package is a library of functions that manipulate TIFF images
53 (cross MinGW32 version).
54
55 %description -l pl.UTF-8
56 Ten pakiet zawiera bibliotekę pozwalającą manipulować plikami w
57 formacie TIFF (w wersji skrośnej MinGW32).
58
59 %package static
60 Summary:        Static libtiff library (cross MinGW32 version)
61 Summary(pl.UTF-8):      Statyczna biblioteka libtiff (wersja skrośna MinGW32)
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64
65 %description static
66 Static libtiff library (cross MinGW32 version).
67
68 %description static -l pl.UTF-8
69 Statyczna biblioteka libtiff (wersja skrośna MinGW32).
70
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
77 Requires:       crossmingw32-libwebp-dll
78 Requires:       crossmingw32-xz-dll
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.
86
87 %package cxx
88 Summary:        libtiff C++ streams library (cross MinGW32 version)
89 Summary(pl.UTF-8):      Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32)
90 Group:          Development/Libraries
91 Requires:       %{name} = %{version}-%{release}
92
93 %description cxx
94 libtiff C++ streams library (cross MinGW32 version).
95
96 %description cxx -l pl.UTF-8
97 Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32).
98
99 %package cxx-static
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)
102 Group:          Development/Libraries
103 Requires:       %{name}-cxx = %{version}-%{release}
104
105 %description cxx-static
106 Static libtiff C++ streams library (cross MinGW32 version).
107
108 %description cxx-static -l pl.UTF-8
109 Statyczna biblioteka strumieni C++ dla libtiff (wersja skrośna
110 MinGW32).
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.
123
124 %prep
125 %setup -q -n tiff-%{version}
126 %patch0 -p1
127
128 %build
129 %{__libtoolize}
130 %{__aclocal} -I m4
131 %{__autoconf}
132 %{__autoheader}
133 %{__automake}
134 %configure \
135         lt_cv_deplibs_check_method=pass_all \
136         --target=%{target} \
137         --host=%{target} \
138         --enable-static
139 %{__make}
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
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
155 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,man}
156 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe
157
158 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %files
162 %defattr(644,root,root,755)
163 %doc COPYRIGHT ChangeLog README.md TODO
164 %{_libdir}/libtiff.dll.a
165 %{_libdir}/libtiff.la
166 %{_includedir}/tiff*.h
167 %{_pkgconfigdir}/libtiff-4.pc
168
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
177 %files cxx
178 %defattr(644,root,root,755)
179 %{_libdir}/libtiffxx.dll.a
180 %{_libdir}/libtiffxx.la
181 %{_includedir}/tiffio.hxx
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
This page took 0.076037 seconds and 3 git commands to generate.