mingw64-filesystem/mingw64-filesystem.spec

157 lines
5.4 KiB
RPMSpec

%define debug_package %{nil}
Name: mingw64-filesystem
Version: 43
Release: 0
Summary: MinGW base filesystem and environment
Group: Development/Libraries
License: GPLv2+
URL: http://hg.et.redhat.com/misc/fedora-mingw--devel/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source0: COPYING
Source1: macros.mingw64
Source2: mingw64.sh
Source3: mingw64-find-debuginfo.sh
Source4: mingw64-find-requires.sh
Source5: mingw64-find-provides.sh
Source6: mingw64-scripts.sh
Source7: mingw64-rpmlint.config
Source8: mingw64-install-post.sh
Requires: rpm
#!BuildIgnore: post-build-checks
# Note about 'Provides: mingw64(foo.dll)'
# ------------------------------------------------------------
#
# We want to be able to build & install mingw64 libraries without
# necessarily needing to install wine. (And certainly not needing to
# install Windows!) There is no requirement to have wine installed in
# order to use the mingw toolchain to develop software (ie. to
# compile more stuff on top of it), so why require that?
#
# So for expediency, this base package provides the "missing" DLLs
# from Windows. Another way to do it would be to exclude these
# proprietary DLLs in our find-requires checking script - essentially
# it comes out the same either way.
#
Provides: mingw64(advapi32.dll)
Provides: mingw64(comctl32.dll)
Provides: mingw64(comdlg32.dll)
Provides: mingw64(dnsapi.dll)
Provides: mingw64(gdi32.dll)
Provides: mingw64(glut32.dll)
Provides: mingw64(imm32.dll)
Provides: mingw64(kernel32.dll)
Provides: mingw64(mscoree.dll)
Provides: mingw64(msimg32.dll)
Provides: mingw64(msvcrt.dll)
Provides: mingw64(mswsock.dll)
Provides: mingw64(ole32.dll)
Provides: mingw64(oleaut32.dll)
Provides: mingw64(shell32.dll)
Provides: mingw64(shlwapi.dll)
Provides: mingw64(user32.dll)
Provides: mingw64(winmm.dll)
Provides: mingw64(wldap32.dll)
Provides: mingw64(ws2_32.dll)
%description
This package contains the base filesystem layout, RPM macros and
environment for all Fedora MinGW packages.
This environment is maintained by the Fedora MinGW SIG at:
http://fedoraproject.org/wiki/SIGs/MinGW
%prep
%setup -q -c -T
cp %{SOURCE0} COPYING
sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw64-find-requires.sh
%build
# nothing
%install
mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/lib/mingw64-scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
pushd $RPM_BUILD_ROOT%{_bindir}
for i in mingw64-configure mingw64-make ; do
ln -s %{_prefix}/lib/mingw64-scripts $i
done
popd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.mingw64
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32
# GCC requires these directories, even though they contain links
# to binaries which are also installed in /usr/bin etc. These
# contain Fedora native binaries.
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/bin
# The MinGW system root which will contain Windows native binaries
# and Windows-specific header files, pkgconfig, etc.
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/include
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/include/sys
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/aclocal
(cd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32 && ln -s sys-root/mingw/include include && ln -s sys-root/mingw/lib lib)
(cd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root && ln -s mingw x86_64-pc-mingw32)
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/doc
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/info
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/man
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,9,n}
# NB. NOT _libdir
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/rpm
install -m 0755 mingw64-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
install -m 0755 %{SOURCE8} $RPM_BUILD_ROOT/usr/lib/rpm
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING
%{_sysconfdir}/rpm/macros.mingw64
%{_sysconfdir}/profile.d/mingw64.sh
%{_sysconfdir}/rpmlint/mingw64-rpmlint.config
%{_bindir}/mingw64-*
%{_prefix}/lib/mingw64-scripts
%{_prefix}/x86_64-pc-mingw32/
/usr/lib/rpm/mingw64-*
%changelog