]>
Commit | Line | Data |
---|---|---|
bfda6270 JB |
1 | Summary: JasPer library for images manipulation - MinGW32 cross version |
2 | Summary(pl.UTF-8): Biblioteka JasPer do obróbki obrazów - wersja skrośna dla MinGW32 | |
99735e94 | 3 | Name: crossmingw32-jasper |
6bc1029c JB |
4 | Version: 2.0.10 |
5 | Release: 1 | |
99735e94 JB |
6 | License: BSD-like |
7 | Group: Development/Libraries | |
6bc1029c JB |
8 | #Source0Download: http://www.ece.uvic.ca/~frodo/jasper/#download |
9 | Source0: http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.tar.gz | |
10 | # Source0-md5: 06882adcf92524eb493f3cf0d3f62c9a | |
11 | Patch0: %{name}-libname.patch | |
12 | URL: http://www.ece.uvic.ca/~frodo/jasper/ | |
13 | BuildRequires: cmake >= 2.8.11 | |
1e64b50d | 14 | BuildRequires: crossmingw32-gcc |
99735e94 | 15 | BuildRequires: crossmingw32-libjpeg |
99735e94 | 16 | Requires: crossmingw32-libjpeg |
6bc1029c | 17 | Obsoletes: crossmingw32-jasper-static |
99735e94 JB |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %define no_install_post_strip 1 | |
21 | ||
22 | %define target i386-mingw32 | |
23 | %define target_platform i386-pc-mingw32 | |
24 | ||
25 | %define _sysprefix /usr | |
26 | %define _prefix %{_sysprefix}/%{target} | |
27 | %define _libdir %{_prefix}/lib | |
6bc1029c | 28 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
99735e94 JB |
29 | %define _dlldir /usr/share/wine/windows/system |
30 | %define __cc %{target}-gcc | |
31 | %define __cxx %{target}-g++ | |
32 | ||
33 | %ifnarch %{ix86} | |
34 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
35 | %define optflags -O2 | |
36 | %endif | |
37 | # -z options are invalid for mingw linker | |
38 | %define filterout_ld -Wl,-z,.* | |
0c098d73 JR |
39 | %define filterout_c -f[-a-z0-9=]* |
40 | %define filterout_cxx -f[-a-z0-9=]* | |
99735e94 JB |
41 | |
42 | %description | |
43 | JasPer is a collection of software (i.e., a library and application | |
44 | programs) for the coding and manipulation of images. This software can | |
45 | handle image data in a variety of formats. One such format supported | |
46 | by JasPer is the JPEG-2000 code stream format defined in ISO/IEC | |
47 | 15444-1:2000 (but JasPer contains only partial implementation). | |
48 | ||
49 | This package contains the cross version of library for Win32. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | JasPer to zestaw oprogramowania (biblioteka i aplikacje) do kodowania | |
53 | i obróbki obrazków w różnych formatach. Jednym z nich jest JPEG-2000 | |
54 | zdefiniowany w ISO/IEC 15444-1:2000 (JasPer zawiera tylko częściową | |
55 | implementację tego formatu). | |
56 | ||
57 | Ten pakiet zawiera wersję skrośną biblioteki dla Win32. | |
58 | ||
99735e94 JB |
59 | %package dll |
60 | Summary: DLL JasPer library for Windows | |
61 | Summary(pl.UTF-8): Biblioteka DLL JasPer dla Windows | |
62 | Group: Applications/Emulators | |
63 | Requires: crossmingw32-libjpeg-dll | |
64 | Requires: wine | |
65 | ||
66 | %description dll | |
67 | DLL JasPer library for Windows. | |
68 | ||
69 | %description dll -l pl.UTF-8 | |
70 | Biblioteka DLL JasPer dla Windows. | |
71 | ||
72 | %prep | |
73 | %setup -q -n jasper-%{version} | |
6bc1029c | 74 | %patch0 -p1 |
99735e94 JB |
75 | |
76 | %build | |
6bc1029c JB |
77 | # there is upstream directory named "build", use different name |
78 | install -d builddir | |
79 | cd builddir | |
80 | # note: build/jasper.pc.in expects CMAKE_INSTALL_INCLUDEDIR and CMAKE_INSTALL_LIBDIR relative to CMAKE_INSTALL_PREFIX | |
81 | %cmake .. \ | |
82 | -DCMAKE_INSTALL_INCLUDEDIR:PATH=include \ | |
83 | -DCMAKE_INSTALL_LIBDIR:PATH=lib \ | |
84 | -DCMAKE_SYSTEM_NAME=Windows \ | |
85 | -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=FALSE \ | |
86 | -DJAS_ENABLE_OPENGL=FALSE \ | |
87 | -DJPEG_INCLUDE_DIR:PATH=%{_includedir} | |
99735e94 JB |
88 | |
89 | %{__make} | |
90 | ||
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
6bc1029c | 94 | %{__make} -C builddir install \ |
99735e94 JB |
95 | DESTDIR=$RPM_BUILD_ROOT |
96 | ||
97 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
6bc1029c | 98 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} |
99735e94 JB |
99 | |
100 | %if 0%{!?debug:1} | |
101 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
102 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
103 | %endif | |
104 | ||
6bc1029c JB |
105 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe \ |
106 | $RPM_BUILD_ROOT%{_mandir}/man1/*.1 | |
107 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/{README,*.pdf,html} | |
108 | ||
99735e94 JB |
109 | %clean |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
6bc1029c | 114 | %doc ChangeLog LICENSE README doc/jasper.pdf doc/jpeg2000.pdf |
99735e94 | 115 | %{_libdir}/libjasper.dll.a |
99735e94 | 116 | %{_includedir}/jasper |
6bc1029c | 117 | %{_pkgconfigdir}/jasper.pc |
99735e94 JB |
118 | |
119 | %files dll | |
120 | %defattr(644,root,root,755) | |
6bc1029c | 121 | %{_dlldir}/libjasper.dll |