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