a2e0fb16316dbfc7a3b60821754e3b7960891ff2
[fedora-mingw.git] / filesystem / mingw-filesystem.spec
1 %define debug_package %{nil}
2
3 Name:           mingw-filesystem
4 Version:        25
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:        mingw-COPYING
15 Source1:        mingw-macros.mingw
16 Source2:        mingw.sh
17 Source3:        mingw.csh
18 Source4:        mingw-find-requires.sh
19 Source5:        mingw-find-provides.sh
20
21 Requires:       setup
22 Requires:       rpm
23
24 # These are actually provided by Windows itself, or Wine.
25 Provides:       mingw(msvcrt.dll)
26 Provides:       mingw(kernel32.dll)
27 Provides:       mingw(user32.dll)
28 Provides:       mingw(gdi32.dll)
29 Provides:       mingw(ole32.dll)
30
31
32 %description
33 This package contains the base filesystem layout, RPM macros and
34 environment for all Fedora MinGW packages.
35
36 This environment is maintained by the Fedora MinGW SIG at:
37
38   http://fedoraproject.org/wiki/SIGs/MinGW
39
40
41 %prep
42 %setup -q -c -T
43 cp %{SOURCE0} COPYING
44 sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw-find-requires.sh
45
46
47 %build
48 # nothing
49
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53
54 mkdir -p $RPM_BUILD_ROOT
55
56 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
57 install -m 644 %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
58
59 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
60 install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.mingw
61
62 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32
63
64 # GCC requires these directories, even though they contain links
65 # to binaries which are also installed in /usr/bin etc.  These
66 # contain Fedora native binaries.
67 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/bin
68 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/lib
69
70 # The MinGW system root which will contain Windows native binaries
71 # and Windows-specific header files, pkgconfig, etc.
72 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw
73 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin
74 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/include
75 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/sys
76 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib
77 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
78
79 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/aclocal
80
81 # We don't normally package manual pages and info files, except
82 # where those are not supplied by a Fedora native package.  So we
83 # need to create the directories.
84 #
85 # Note that some packages try to install stuff in
86 #   /usr/i686-pc-mingw32/sys-root/mingw/man and
87 #   /usr/i686-pc-mingw32/sys-root/mingw/doc
88 # but those are both packaging bugs.
89 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share
90 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc
91 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/info
92 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man
93 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}
94
95 # NB. NOT _libdir
96 mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
97 install -m 0755 mingw-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
98 install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
99
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104
105 %files
106 %defattr(-,root,root,-)
107 %doc COPYING
108 %config(noreplace) %{_sysconfdir}/rpm/macros.mingw
109 %config(noreplace) %{_sysconfdir}/profile.d/mingw.sh
110 %config(noreplace) %{_sysconfdir}/profile.d/mingw.csh
111 %{_prefix}/i686-pc-mingw32/
112 /usr/lib/rpm/mingw-*
113
114
115 %changelog
116 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 25-1
117 - Add shared aclocal directory.
118
119 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 24-1
120 - Remove mingw-defs, since no longer used.
121 - Add _mingw_infodir.
122
123 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 23-1
124 - Add macros for find-provides/requires scripts
125
126 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 22-1
127 - Windows provides OLE32.DLL.
128
129 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 21-1
130 - Allow '.' in dll names for find-requires
131 - Windows provides GDI32.DLL.
132
133 * Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 20-1
134 - On 64 bit install in /usr/lib/rpm always.
135
136 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 19-1
137 - 'user32.dll' is provided by Windows.
138 - Allow '-' in DLL names.
139 - More accurate detection of DLLs in requires/provides scripts.
140
141 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 17-1
142 - Automatically add mingw-filesystem and mingw-runtime requires.
143 - Add --prefix to _mingw_configure macro.
144 - Three backslashes required on each continuation line in RPM macros.
145
146 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 14-1
147 - Fix path to mingw-find-requires/provides scripts.
148
149 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 12-1
150 - Put CFLAGS on a single line to avoid problems in some configure scripts.
151
152 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 10-1
153 - Provides certain base Windows DLLs (not literally).
154
155 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 9-1
156 - Include RPM dependency generators and definitions.
157
158 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4-1
159 - Add _mingw_cc/cflags/etc. and _mingw_configure macros.
160
161 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3-1
162 - Add _mingw_host macro.
163
164 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2-1
165 - Add _mingw_sysroot macro.
166 - Add _mingw_target macro.
167
168 * Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1-1
169 - Basic filesystem layout.