- Fix defattr line.
[fedora-mingw.git] / jasper / mingw32-jasper.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-jasper
8 Version:        1.900.1
9 Release:        8%{?dist}
10 Summary:        MinGW Windows Jasper library
11
12 License:        JasPer
13 Group:          Development/Libraries
14
15 URL:            http://www.ece.uvic.ca/~mdadams/jasper/
16 Source0:        http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-%{version}.zip
17
18 # Patches from Fedora native package.
19 # OpenGL is disabled in this build, so we don't need this patch:
20 #Patch1:         jasper-1.701.0-GL.patch
21 # Note patch2 appears in native package, but is not applied:
22 #Patch2:         jasper-1.701.0-GL-ac.patch
23 Patch3:         patch-libjasper-stepsizes-overflow.diff
24
25 # MinGW-specific patches.
26 # This patch adds '-no-undefined' flag to libtool line:
27 Patch1000:      jasper-1.900.1-mingw32.patch
28 # This patch is a bit of a hack, but it's just there to fix a demo program:
29 Patch1001:      jasper-1.900.1-sleep.patch
30
31 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
32 BuildArch:      noarch
33
34 BuildRequires:  mingw32-filesystem >= 23
35 BuildRequires:  mingw32-gcc
36 BuildRequires:  mingw32-binutils
37 BuildRequires:  mingw32-libjpeg
38 BuildRequires:  mingw32-dlfcn
39
40
41 %description
42 MinGW Windows Jasper library.
43
44
45 %prep
46 %setup -q -n jasper-%{version}
47 %patch3 -p1 -b .CVE-2007-2721
48
49 %patch1000 -p1 -b .mingw32
50 %patch1001 -p1 -b .sleep
51
52
53 %build
54 %{_mingw32_configure} \
55   --disable-opengl --enable-libjpeg --disable-static --enable-shared
56 make %{?_smp_mflags}
57
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 make DESTDIR=$RPM_BUILD_ROOT install mandir=%{_mingw32_mandir}
63
64 # Remove the manual pages - don't duplicate documentation which
65 # is in the native Fedora package.
66 rm $RPM_BUILD_ROOT%{_mingw32_mandir}/man1/*
67
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72
73 %files
74 %defattr(-,root,root,-)
75 %doc COPYRIGHT LICENSE NEWS README
76 %{_mingw32_bindir}/i686-pc-mingw32-imgcmp.exe
77 %{_mingw32_bindir}/i686-pc-mingw32-imginfo.exe
78 %{_mingw32_bindir}/i686-pc-mingw32-jasper.exe
79 %{_mingw32_bindir}/i686-pc-mingw32-tmrdemo.exe
80 %{_mingw32_bindir}/libjasper-1.dll
81 %{_mingw32_libdir}/libjasper.dll.a
82 %{_mingw32_libdir}/libjasper.la
83 %{_mingw32_includedir}/jasper/
84
85
86 %changelog
87 * Mon Mar  9 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-8
88 - Fix defattr line.
89 - Remove the enable-shared patch, and just use --enable-shared on
90   the configure line.
91 - Disable the GL patch since OpenGL is disabled.
92 - Document what the patches are for in the spec file.
93 - Only patch Makefile.in so we don't have to rerun autotools, and
94   remove autotools dependency.
95
96 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-7
97 - Rebuild for mingw32-gcc 4.4
98
99 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-6
100 - Use _smp_mflags.
101 - Disable static libraries.
102 - Include documentation.
103 - Use the same patches as Fedora native package.
104 - Just run autoconf instead of autoreconf so we don't upgrade libtool.
105 - +BR mingw32-dlfcn.
106 - Don't need the manual pages.
107
108 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-5
109 - Rename mingw -> mingw32.
110
111 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-4
112 - Add overflow patch from rawhide
113
114 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-3
115 - Run autoreconf after changing configure.ac script and add BRs for autotools
116
117 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-2
118 - Enable DLLs.
119 - Remove static libraries.
120
121 * Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-1
122 - Initial RPM release