]> git.pld-linux.org Git - packages/crossmingw32-jasper.git/blob - crossmingw32-jasper.spec
- set CMAKE_CROSSCOMPILING
[packages/crossmingw32-jasper.git] / crossmingw32-jasper.spec
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
3 Name:           crossmingw32-jasper
4 Version:        2.0.12
5 Release:        1
6 License:        BSD-like
7 Group:          Development/Libraries
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:  b839a8bf418a64aa2d06413b23dd5ab3
11 Patch0:         jasper-nodocs.patch
12 URL:            http://www.ece.uvic.ca/~frodo/jasper/
13 BuildRequires:  cmake >= 2.8.11
14 BuildRequires:  crossmingw32-gcc
15 BuildRequires:  crossmingw32-libjpeg
16 Requires:       crossmingw32-libjpeg
17 Obsoletes:      crossmingw32-jasper-static
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
28 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
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,.*
39 %define         filterout_c     -f[-a-z0-9=]*
40 %define         filterout_cxx   -f[-a-z0-9=]*
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
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}
74 %patch0 -p1
75
76 %build
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} \
88         -DJPEG_LIBRARY=%{_libdir}/libjpeg.dll.a
89
90 %{__make}
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %{__make} -C builddir install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 install -d $RPM_BUILD_ROOT%{_dlldir}
99 %{__mv} $RPM_BUILD_ROOT%{_bindir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
100
101 %if 0%{!?debug:1}
102 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
103 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
104 %endif
105
106 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe \
107         $RPM_BUILD_ROOT%{_mandir}/man1/*.1
108 %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/{README,*.pdf,html}
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %files
114 %defattr(644,root,root,755)
115 %doc ChangeLog LICENSE README doc/jasper.pdf doc/jpeg2000.pdf
116 %{_libdir}/libjasper.dll.a
117 %{_includedir}/jasper
118 %{_pkgconfigdir}/jasper.pc
119
120 %files dll
121 %defattr(644,root,root,755)
122 %{_dlldir}/libjasper.dll
This page took 0.096773 seconds and 3 git commands to generate.