- Update the spec file with explanation of the 'Provides: mingw32(...)'
[fedora-mingw.git] / filesystem / mingw32-filesystem.spec
1 %define debug_package %{nil}
2
3 Name:           mingw32-filesystem
4 Version:        31
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:        mingw32-COPYING
15 Source1:        mingw32-macros.mingw32
16 Source2:        mingw32.sh
17 Source3:        mingw32.csh
18 Source4:        mingw32-find-requires.sh
19 Source5:        mingw32-find-provides.sh
20
21 Requires:       setup
22 Requires:       rpm
23
24 # Note about 'Provides: mingw32(foo.dll)'
25 # ------------------------------------------------------------
26 #
27 # We want to be able to build & install mingw32 libraries without
28 # necessarily needing to install wine.  (And certainly not needing to
29 # install Windows!)  There is no requirement to have wine installed in
30 # order to use the mingw toolchain to develop software (ie. to
31 # compile more stuff on top of it), so why require that?
32 #
33 # So for expediency, this base package provides the "missing" DLLs
34 # from Windows.  Another way to do it would be to exclude these
35 # proprietary DLLs in our find-requires checking script - essentially
36 # it comes out the same either way.
37 #
38 Provides:       mingw32(gdi32.dll)
39 Provides:       mingw32(kernel32.dll)
40 Provides:       mingw32(ole32.dll)
41 Provides:       mingw32(mscoree.dll)
42 Provides:       mingw32(msvcrt.dll)
43 Provides:       mingw32(user32.dll)
44
45 Obsoletes:      mingw-filesystem = %{version}-%{release}
46 Provides:       mingw-filesystem < 26
47
48
49 %description
50 This package contains the base filesystem layout, RPM macros and
51 environment for all Fedora MinGW packages.
52
53 This environment is maintained by the Fedora MinGW SIG at:
54
55   http://fedoraproject.org/wiki/SIGs/MinGW
56
57
58 %prep
59 %setup -q -c -T
60 cp %{SOURCE0} COPYING
61 sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw32-find-requires.sh
62
63
64 %build
65 # nothing
66
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 mkdir -p $RPM_BUILD_ROOT
72
73 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
74 install -m 644 %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
75
76 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
77 install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.mingw32
78
79 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32
80
81 # GCC requires these directories, even though they contain links
82 # to binaries which are also installed in /usr/bin etc.  These
83 # contain Fedora native binaries.
84 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/bin
85 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/lib
86
87 # The MinGW system root which will contain Windows native binaries
88 # and Windows-specific header files, pkgconfig, etc.
89 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw
90 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin
91 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/include
92 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/sys
93 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib
94 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
95
96 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/aclocal
97
98 # We don't normally package manual pages and info files, except
99 # where those are not supplied by a Fedora native package.  So we
100 # need to create the directories.
101 #
102 # Note that some packages try to install stuff in
103 #   /usr/i686-pc-mingw32/sys-root/mingw/man and
104 #   /usr/i686-pc-mingw32/sys-root/mingw/doc
105 # but those are both packaging bugs.
106 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share
107 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc
108 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/info
109 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man
110 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,l,n}
111
112 # NB. NOT _libdir
113 mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
114 install -m 0755 mingw32-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
115 install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
116
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121
122 %files
123 %defattr(-,root,root,-)
124 %doc COPYING
125 %config(noreplace) %{_sysconfdir}/rpm/macros.mingw32
126 %config(noreplace) %{_sysconfdir}/profile.d/mingw32.sh
127 %config(noreplace) %{_sysconfdir}/profile.d/mingw32.csh
128 %{_prefix}/i686-pc-mingw32/
129 /usr/lib/rpm/mingw32-*
130
131
132 %changelog
133 * Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 31-1
134 - Update the spec file with explanation of the 'Provides: mingw32(...)'
135   lines for Windows system DLLs.
136
137 * Mon Oct  6 2008 Richard Jones <rjones@redhat.com> - 30-1
138 - Added _mingw32_cxx.
139
140 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 29-1
141 - Added _mingw32_as, _mingw32_dlltool, _mingw32_windres.
142
143 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 27-1
144 - Begin the grand renaming of mingw -> mingw32.
145 - Added mingw32(mscoree.dll).
146
147 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 25-1
148 - Add shared aclocal directory.
149
150 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 24-1
151 - Remove mingw-defs, since no longer used.
152 - Add _mingw_infodir.
153
154 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 23-1
155 - Add macros for find-provides/requires scripts
156
157 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 22-1
158 - Windows provides OLE32.DLL.
159
160 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 21-1
161 - Allow '.' in dll names for find-requires
162 - Windows provides GDI32.DLL.
163
164 * Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 20-1
165 - On 64 bit install in /usr/lib/rpm always.
166
167 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 19-1
168 - 'user32.dll' is provided by Windows.
169 - Allow '-' in DLL names.
170 - More accurate detection of DLLs in requires/provides scripts.
171
172 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 17-1
173 - Automatically add mingw-filesystem and mingw-runtime requires.
174 - Add --prefix to _mingw_configure macro.
175 - Three backslashes required on each continuation line in RPM macros.
176
177 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 14-1
178 - Fix path to mingw-find-requires/provides scripts.
179
180 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 12-1
181 - Put CFLAGS on a single line to avoid problems in some configure scripts.
182
183 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 10-1
184 - Provides certain base Windows DLLs (not literally).
185
186 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 9-1
187 - Include RPM dependency generators and definitions.
188
189 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4-1
190 - Add _mingw_cc/cflags/etc. and _mingw_configure macros.
191
192 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3-1
193 - Add _mingw_host macro.
194
195 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2-1
196 - Add _mingw_sysroot macro.
197 - Add _mingw_target macro.
198
199 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1-1
200 - Basic filesystem layout.