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