New patches from Fedora.
[fedora-mingw.git] / mingw64-filesystem / mingw64-filesystem.spec
1 %define debug_package %{nil}
2
3 Name:           mingw64-filesystem
4 Version:        10
5 Release:        1%{?dist}
6 Summary:        MinGW base filesystem and environment
7
8 Group:          Development/Libraries
9 License:        GPLv2+
10 URL:            http://hg.et.redhat.com/misc/fedora-mingw--devel/
11 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 BuildArch:      noarch
13
14 Source0:        COPYING
15 Source1:        macros.mingw64
16 Source2:        mingw64.sh
17 #Source3:        mingw64.csh
18 Source4:        mingw64-find-requires.sh
19 Source5:        mingw64-find-provides.sh
20 Source6:        mingw64-scripts.sh
21 Source7:        mingw64-rpmlint.config
22
23 Requires:       setup
24 Requires:       rpm
25 Requires:       rpmlint >= 0.85-2
26
27 BuildRequires:  rpmlint >= 0.85-2
28
29 # Note about 'Provides: mingw64(foo.dll)'
30 # ------------------------------------------------------------
31 #
32 # We want to be able to build & install mingw64 libraries without
33 # necessarily needing to install wine.  (And certainly not needing to
34 # install Windows!)  There is no requirement to have wine installed in
35 # order to use the mingw toolchain to develop software (ie. to
36 # compile more stuff on top of it), so why require that?
37 #
38 # So for expediency, this base package provides the "missing" DLLs
39 # from Windows.  Another way to do it would be to exclude these
40 # proprietary DLLs in our find-requires checking script - essentially
41 # it comes out the same either way.
42 #
43 #Provides:       mingw64(gdi32.dll)
44
45
46 %description
47 This package contains the base filesystem layout, RPM macros and
48 environment for all Fedora MinGW packages.
49
50 This environment is maintained by the Fedora MinGW SIG at:
51
52   http://fedoraproject.org/wiki/SIGs/MinGW
53
54
55 %prep
56 %setup -q -c -T
57 cp %{SOURCE0} COPYING
58 sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw64-find-requires.sh
59
60
61 %build
62 # nothing
63
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 mkdir -p $RPM_BUILD_ROOT
69
70 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
71 install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/mingw64-scripts
72
73 mkdir -p $RPM_BUILD_ROOT%{_bindir}
74 pushd $RPM_BUILD_ROOT%{_bindir}
75 for i in mingw64-configure mingw64-make; do
76   ln -s %{_libexecdir}/mingw64-scripts $i
77 done
78 popd
79
80 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
81 install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
82 #install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
83
84 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
85 install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.mingw64
86
87 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint
88 install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/
89
90 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32
91
92 # These directories are used by GCC for cross-compilation.
93 # NOTE different contents from mingw32.
94 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/bin
95 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib
96
97 # The system root which will contain Windows native binaries
98 # and Windows-specific header files, pkgconfig, etc.
99 # NOTE different from mingw32.
100 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
101 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/bin
102 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include
103 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include/sys
104 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib
105 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib/pkgconfig
106
107 # GCC wants to look in include64/ directory for some reason.
108 pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
109 ln -s include include64
110 popd
111
112 # We don't normally package manual pages and info files, except
113 # where those are not supplied by a Fedora native package.  So we
114 # need to create the directories.
115 #
116 # Note that some packages try to install stuff in
117 #   /usr/x86_64-pc-mingw32/sys-root/man and
118 #   /usr/x86_64-pc-mingw32/sys-root/doc
119 # but those are both packaging bugs.
120 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share
121 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/doc
122 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/info
123 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man
124 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man/man{1,2,3,4,5,6,7,8,l,n}
125 mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/aclocal
126
127 pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
128 ln -s . mingw
129 popd
130
131
132 # NB. NOT _libdir
133 mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
134 install -m 0755 mingw64-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
135 install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
136
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141
142 %files
143 %defattr(-,root,root,-)
144 %doc COPYING
145 %config(noreplace) %{_sysconfdir}/rpm/macros.mingw64
146 %config(noreplace) %{_sysconfdir}/profile.d/mingw64.sh
147 #%config(noreplace) %{_sysconfdir}/profile.d/mingw64.csh
148 %config(noreplace) %{_sysconfdir}/rpmlint/mingw64-rpmlint.config
149 %{_bindir}/mingw64-configure
150 %{_bindir}/mingw64-make
151 %{_libexecdir}/mingw64-scripts
152 %{_prefix}/x86_64-pc-mingw32/
153 /usr/lib/rpm/mingw64-*
154
155
156 %changelog
157 * Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 10-1
158 - Start mingw64 development.
159
160 * Sun Feb  1 2009 Richard W.M. Jones <rjones@redhat.com> - 46-1
161 - Unset PKG_CONFIG_PATH because /usr/lib/rpm/macros sets it (Erik van
162   Pienbroek).
163
164 * Wed Jan 28 2009 Richard W.M. Jones <rjones@redhat.com> - 45-1
165 - Use PKG_CONFIG_LIBDIR instead of PKG_CONFIG_PATH so that native pkgconfig
166   is never searched.
167
168 * Mon Jan 26 2009 Richard W.M. Jones <rjones@redhat.com> - 44-1
169 - Install rpmlint overrides file to suppress some rpmlint warnings.
170
171 * Sat Jan 24 2009 Richard W.M. Jones <rjones@redhat.com> - 43-6
172 - Don't claim C++ compiler exists if it's not installed, as this
173   breaks autoconf and (in particular) libtool.
174
175 * Wed Jan 14 2009 Richard W.M. Jones <rjones@redhat.com> - 42-1
176 - Add pseudo-provides secur32.dll
177
178 * Wed Dec 17 2008 Levente Farkas <lfarkas@lfarkas.org> - 41-1
179 - Re-add mingw32-make
180
181 * Sat Dec  6 2008 Levente Farkas <lfarkas@lfarkas.org> - 40-2
182 - Rewrite mingw32-scripts to run in the current shell
183 - (Re-add mingw32-make) - Removed by RWMJ.
184 - Add mingw32-env to mingw32.sh
185
186 * Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 39-3
187 - Unify mingw32-filesystem packages from all three branches again, and test.
188 - Fix mingw32-scripts so it can handle extra parameters correctly.
189 - Remove mingw32-env & mingw32-make since neither of them actually work.
190
191 * Sun Nov 23 2008 Richard Jones <rjones@redhat.com> - 38-1
192 - Added mingw32(glut32.dll).
193
194 * Wed Nov 19 2008 Richard Jones <rjones@redhat.com> - 37-1
195 - Revert part of the 36-1 patch.  --build option to configure was wrong.
196
197 * Wed Nov 19 2008 Richard Jones <rjones@redhat.com> - 36-1
198 - Greatly improved macros (Levente Farkas).
199 - Added -mms-bitfields.
200
201 * Thu Nov 13 2008 Richard Jones <rjones@redhat.com> - 35-1
202 - Added mingw32(wldap32.dll) pseudo-provides.
203
204 * Wed Oct 29 2008 Richard Jones <rjones@redhat.com> - 34-1
205 - Set --prefix correctly.
206
207 * Wed Oct 29 2008 Richard Jones <rjones@redhat.com> - 33-1
208 - Remove mingw32.{sh,csh} which are unused.
209
210 * Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 32-1
211 - Add mingw32-configure script.
212
213 * Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 31-1
214 - Update the spec file with explanation of the 'Provides: mingw32(...)'
215   lines for Windows system DLLs.
216
217 * Mon Oct  6 2008 Richard Jones <rjones@redhat.com> - 30-1
218 - Added _mingw32_cxx.
219
220 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 29-1
221 - Added _mingw32_as, _mingw32_dlltool, _mingw32_windres.
222
223 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 27-1
224 - Begin the grand renaming of mingw -> mingw32.
225 - Added mingw32(mscoree.dll).
226
227 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 25-1
228 - Add shared aclocal directory.
229
230 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 24-1
231 - Remove mingw-defs, since no longer used.
232 - Add _mingw_infodir.
233
234 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 23-1
235 - Add macros for find-provides/requires scripts
236
237 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 22-1
238 - Windows provides OLE32.DLL.
239
240 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 21-1
241 - Allow '.' in dll names for find-requires
242 - Windows provides GDI32.DLL.
243
244 * Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 20-1
245 - On 64 bit install in /usr/lib/rpm always.
246
247 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 19-1
248 - 'user32.dll' is provided by Windows.
249 - Allow '-' in DLL names.
250 - More accurate detection of DLLs in requires/provides scripts.
251
252 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 17-1
253 - Automatically add mingw-filesystem and mingw-runtime requires.
254 - Add --prefix to _mingw_configure macro.
255 - Three backslashes required on each continuation line in RPM macros.
256
257 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 14-1
258 - Fix path to mingw-find-requires/provides scripts.
259
260 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 12-1
261 - Put CFLAGS on a single line to avoid problems in some configure scripts.
262
263 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 10-1
264 - Provides certain base Windows DLLs (not literally).
265
266 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 9-1
267 - Include RPM dependency generators and definitions.
268
269 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4-1
270 - Add _mingw_cc/cflags/etc. and _mingw_configure macros.
271
272 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3-1
273 - Add _mingw_host macro.
274
275 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2-1
276 - Add _mingw_sysroot macro.
277 - Add _mingw_target macro.
278
279 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1-1
280 - Basic filesystem layout.