Latest mingw64 packages.
[fedora-mingw.git] / mingw64-gcc / mingw64-gcc-bootstrap.spec
1 # This is the bootstrap GCC which is required for bootstrapping
2 # mingw64-runtime.
3
4 %define __os_install_post /usr/lib/rpm/brp-compress %{nil}
5
6 %define upstream_version 4.4-20090206
7
8 Name:           mingw64-gcc-bootstrap
9 Version:        4.4.0
10 Release:        0.20090206.6%{?dist}
11 Summary:        MinGW Windows cross-compiler (GCC) for C
12
13 License:        GPLv2+
14 Group:          Development/Languages
15 URL:            http://www.mingw.org/
16 Source0:        ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/4.4-20090206/gcc-core-4.4-20090206.tar.bz2
17
18 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
20 BuildRequires:  texinfo
21 BuildRequires:  mingw64-filesystem >= 6
22 BuildRequires:  mingw64-binutils
23 BuildRequires:  mingw64-headers
24 BuildRequires:  gmp-devel
25 %if 0%{?fedora} >= 9
26 BuildRequires:  mpfr-devel
27 %endif
28 BuildRequires:  libgomp
29
30 # NB: Explicit mingw64-filesystem dependency is REQUIRED here.
31 Requires:       mingw64-filesystem >= 6
32 Requires:       mingw64-binutils
33 Requires:       mingw64-headers
34 Requires:       mingw64-cpp-bootstrap
35
36
37 %description
38 MinGW Windows cross-compiler (GCC) for C
39
40
41 %package -n mingw64-cpp-bootstrap
42 Summary: MinGW Windows cross-C Preprocessor.
43 Group: Development/Languages
44
45
46 %description -n mingw64-cpp-bootstrap
47 MinGW Windows cross-C Preprocessor
48
49
50 %prep
51 %setup -q -c
52
53
54 %build
55 cd gcc-%{upstream_version}
56
57 mkdir -p build
58 cd build
59
60 languages="c"
61
62 CC="%{__cc} ${RPM_OPT_FLAGS}" \
63 ../configure \
64   --prefix=%{_prefix} \
65   --bindir=%{_bindir} \
66   --includedir=%{_includedir} \
67   --libdir=%{_libdir} \
68   --mandir=%{_mandir} \
69   --infodir=%{_infodir} \
70   --datadir=%{_datadir} \
71   --build=%_build --host=%_host \
72   --target=%{_mingw64_target} \
73   --with-gnu-as --with-gnu-ld --verbose \
74   --without-newlib \
75   --disable-multilib \
76   --with-system-zlib \
77   --disable-nls --without-included-gettext \
78   --disable-win32-registry \
79   --enable-version-specific-runtime-libs \
80   --with-sysroot=%{_mingw64_sysroot} \
81   --enable-languages="$languages" $optargs
82
83 make %{?_smp_mflags} all-gcc
84
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 cd gcc-%{upstream_version}
90 cd build
91 make DESTDIR=$RPM_BUILD_ROOT install-gcc
92
93 # These files conflict with existing installed files.
94 rm -rf $RPM_BUILD_ROOT%{_infodir}
95 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
96
97 mkdir -p $RPM_BUILD_ROOT/lib
98 ln -sf ..%{_prefix}/bin/x86_64-pc-mingw32-cpp \
99   $RPM_BUILD_ROOT/lib/x86_64-pc-mingw32-cpp
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104
105 %files
106 %defattr(-,root,root)
107 %{_bindir}/x86_64-pc-mingw32-gcc
108 %{_bindir}/x86_64-pc-mingw32-gcc-%{version}
109 %{_bindir}/x86_64-pc-mingw32-gccbug
110 %{_bindir}/x86_64-pc-mingw32-gcov
111 %dir %{_libdir}/gcc/x86_64-pc-mingw32
112 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
113 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include
114 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed
115 %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/README
116 %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/*.h
117 %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/*.h
118 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
119 %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
120 %dir %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
121 %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
122 %{_mandir}/man1/x86_64-pc-mingw32-gcc.1*
123 %{_mandir}/man1/x86_64-pc-mingw32-gcov.1*
124
125
126 %files -n mingw64-cpp-bootstrap
127 %defattr(-,root,root)
128 /lib/x86_64-pc-mingw32-cpp
129 %{_bindir}/x86_64-pc-mingw32-cpp
130 %{_mandir}/man1/x86_64-pc-mingw32-cpp.1*
131 %dir %{_libdir}/gcc/x86_64-pc-mingw32
132 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
133 %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/cc1
134 %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/collect2
135
136
137 %changelog
138 * Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-0.20090206.6
139 - Started mingw64 development.
140
141 * Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-12
142 - Rebuild against latest filesystem package.
143
144 * Fri Nov 21 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-11
145 - Remove obsoletes for a long dead package.
146
147 * Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-10
148 - Rebuild against mingw32-filesystem 37
149
150 * Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-9
151 - Rebuild against mingw32-filesystem 36
152
153 * Thu Oct 30 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-8
154 - Don't BR mpfr-devel for RHEL/EPEL-5 (Levente Farkas).
155
156 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-7
157 - Rename mingw -> mingw32.
158
159 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-6
160 - Use RPM macros from mingw-filesystem.
161
162 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-3
163 - Initial RPM release, largely based on earlier work from several sources.