Blob Blame History Raw
%?mingw_package_header

%global snapshot_date 20140912
%global snapshot_rev b08afbb5768898ae9c6d0d2798aaccf4f21de361
%global snapshot_rev_short %(echo %snapshot_rev | cut -c1-6)
%global branch trunk

# Run the testsuite
%global enable_tests 0

Name:           mingw-winstorecompat
Version:        3.9.999
Release:        0.1.%{branch}.git.%{snapshot_rev_short}.%{snapshot_date}%{?dist}
Summary:        MinGW library to help porting to Windows Store
License:        MIT
Group:          Development/Libraries

URL:            http://mingw-w64.sourceforge.net/
%if 0%{?snapshot_date}
# To regenerate a snapshot:
# Use your regular webbrowser to open https://sourceforge.net/p/mingw-w64/mingw-w64/ci/%{snapshot_rev}/tarball
# This triggers the SourceForge instructure to generate a snapshot
# After that you can pull in the archive with:
# spectool -g mingw-winstorecompat.spec
Source0:        http://sourceforge.net/code-snapshots/git/m/mi/mingw-w64/mingw-w64.git/mingw-w64-mingw-w64-%{snapshot_rev}.zip
%else
Source0:        http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}.tar.gz
%endif

BuildArch:      noarch

BuildRequires:  mingw32-filesystem >= 95
BuildRequires:  mingw64-filesystem >= 95
BuildRequires:  mingw32-gcc
BuildRequires:  mingw64-gcc
BuildRequires:  mingw32-headers >= 2.0.999-0.24.trunk.20130520
BuildRequires:  mingw64-headers >= 2.0.999-0.24.trunk.20130520


%description
This library can be linked to code targetting Windows Store.
Functions that are not available anymore for Windows Store are redefined,
using similar functions that are allowed.
'Forbidden' functions can be found either by browsing MSDN, either by
running WACK (Windows Application Certification Kit) on the application.

%package -n mingw32-winstorecompat
Summary:        MinGW library to help porting to Windows Store for the win32 target

%description -n mingw32-winstorecompat
This library can be linked to code targetting Windows Store.
Functions that are not available anymore for Windows Store are redefined,
using similar functions that are allowed.
'Forbidden' functions can be found either by browsing MSDN, either by
running WACK (Windows Application Certification Kit) on the application.

%package -n mingw64-winstorecompat
Summary:        MinGW library to help porting to Windows Store for the win64 target

%description -n mingw64-winstorecompat
This library can be linked to code targetting Windows Store.
Functions that are not available anymore for Windows Store are redefined,
using similar functions that are allowed.
'Forbidden' functions can be found either by browsing MSDN, either by
running WACK (Windows Application Certification Kit) on the application.


%?mingw_debug_package


%prep
%if 0%{?snapshot_date}
rm -rf mingw-w64-v%{version}
mkdir mingw-w64-v%{version}
cd mingw-w64-v%{version}
unzip %{S:0}
%setup -q -D -T -n mingw-w64-v%{version}/mingw-w64-mingw-w64-%{snapshot_rev}
%else
%setup -q -n mingw-w64-v%{version}
%endif


%build
pushd mingw-w64-libraries/winstorecompat
    %mingw_configure
    %mingw_make %{?smp_mflags}
popd


%install
pushd mingw-w64-libraries/winstorecompat
    %mingw_make install DESTDIR=$RPM_BUILD_ROOT
popd

# Drop all .la files
find $RPM_BUILD_ROOT -name "*.la" -delete


%files -n mingw32-winstorecompat
%doc COPYING
%{mingw32_libdir}/libwinstorecompat.a

%files -n mingw64-winstorecompat
%doc COPYING 
%{mingw64_libdir}/libwinstorecompat.a


%changelog
* Fri Sep 12 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.9.999-0.1.trunk.git.b08afb.20140912
- Update to 20140912 snapshot (git rev b08afb)
- Bump version as upstream released mingw-w64 v3.2.0 recently (which is not based on the trunk branch)

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.999-0.2.trunk.git502c72.20140524
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.1.999-0.1.trunk.git502c72.20140524
- Update to 20140524 snapshot (git rev 502c72)
- Upstream has switched from SVN to Git

* Fri Aug 16 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.0.999-0.4.trunk.r6069.20130810
- Update to r6069 (20130810 snapshot)
- Updated instructions to regenerate snapshots
  (SourceForge has changed their SVN infrastructure)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.999-0.3.trunk.20130520
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon May 20 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.0.999-0.2.trunk.20130520
- Update to 20130520 snapshot
- Bumped BR: mingw32-headers mingw64-headers to >= 2.0.999-0.24.trunk.20130520 because of combaseapi.h

* Thu May  9 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.0.999-0.1.trunk.20130509
- Initial package