File mingw32-filesystem.spec of Package mingw32-filesystem

# spec file for package mingw32-filesystem
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define debug_package %{nil}
Name:           mingw32-filesystem
Version:        20170720
Release:        0
Summary:        MinGW base filesystem and environment
License:        GPL-2.0+
Group:          Development/Libraries
Source0:        COPYING
Source1:        macros.mingw32
Source7:        mingw32-rpmlint.config
Source10:       languages
Provides:       mingw32(dbghelp.dll)
Provides:       mingw32(mpr.dll)
Provides:       mingw32(userenv.dll)
Provides:       mingw32(uxtheme.dll)
Requires:       mingw32-cross-breakpad-tools
Requires:       rpm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
#!BuildIgnore: post-build-checks

This package contains the base filesystem layout, RPM macros and
environment for all MinGW packages.

This environment is maintained by the Fedora MinGW SIG at:

%setup -q -c -T
sed 's/@VERSION@/%{version}/' < %{SOURCE4} >

# nothing

mkdir -p %{buildroot}

mkdir -p %{buildroot}%{_prefix}/lib
install -m 755 %{SOURCE6} %{buildroot}%{_libexecdir}/mingw32-scripts

mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_bindir}
for i in mingw32-configure mingw32-make mingw32-cmake ; do
  ln -s %{_libexecdir}/mingw32-scripts $i

mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/

mkdir -p %{buildroot}%{_sysconfdir}/rpm
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.mingw32

mkdir -p %{buildroot}%{_sysconfdir}/rpmlint
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rpmlint/

mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32

# GCC requires these directories, even though they contain links
# to binaries which are also installed in /usr/bin etc.  These
# contain native binaries.
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/bin
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/lib

# The MinGW system root which will contain Windows native binaries
# and Windows-specific header files, pkgconfig, etc.
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/bin
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/include
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/include/sys
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/var
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw%{_localstatedir}/lib
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw%{_localstatedir}/lib/rpm-state
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw%{_localstatedir}/lib/rpm-state/gconf

(cd %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root && ln -s mingw i686-w64-mingw32)

# Let programs locate their plugins relative to the executable without using
# upward movement ("..") in those packages, cf. libdbi, libenchant.
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/bin/lib
ln -s ../../lib "%buildroot/%_prefix/i686-w64-mingw32/sys-root/mingw/bin/lib/i386-pc"

mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/doc
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/info
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,9,n}

# NB. NOT _libdir
mkdir -p %{buildroot}%{_libexecdir}/rpm
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/rpm
install -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/rpm
install -m 0755 %{SOURCE5} %{buildroot}%{_libexecdir}/rpm
install -m 0755 %{SOURCE8} %{buildroot}%{_libexecdir}/rpm
install -m 0755 %{SOURCE9} %{buildroot}%{_libexecdir}/rpm

# Create the locale directories:
while read LANG ; do
  mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/locale/$LANG/LC_MESSAGES
  mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/help/$LANG
done < %{SOURCE10}
# Create the locale directories for man:
while read LANG ; do
  mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man/$LANG
  for sec in 1 2 3 4 5 6 7 8 9 n; do
    mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man/$LANG/man$sec
done < %{SOURCE11}

%config %{_sysconfdir}/rpm/macros.mingw32
%config %{_sysconfdir}/profile.d/
%config %{_sysconfdir}/rpmlint/mingw32-rpmlint.config
%dir %{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/cmake

openSUSE Build Service is sponsored by