File mingw64-mman.spec of Package mingw64-mman

#
# spec file for package mingw64-mman
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#

Name:			mingw64-mman
Summary:		A light implementation of the mmap functions for MinGW
License:		MIT
Group:			Development/Libraries/C and C++
Version:		1.0
Release:		0

Url:			https://github.com/alitrack/mman-win32https://github.com/alitrack/mman-win32

Source:			mman-win32-%{version}.tar.xz
Source1:		mman-win32.pc

BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	mingw64-cross-cmake
BuildRequires:	mingw64-cross-binutils
BuildRequires:	mingw64-cross-gcc-c++
BuildRequires:	mingw64-cross-pkg-config
BuildRequires:	mingw64-filesystem

# Build changes:

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define MAJOR_VERSION %(echo %{version} | cut -d. -f1)
%define MINOR_VERSION %(echo %{version} | cut -d. -f2 | cut -d+ -f1)

%description
The mmap-win32 library implements a wrapper for mmap functions around the memory mapping Windows API.

%package devel
Summary:        Header files and development libraries for %{name}
Group:          Development/Libraries/C and C++
Requires:       mingw64-mman = %{version}-%{release}

%description devel
This package contains the header files and development libraries
for %{name}. If you like to develop programs embedding %{name} on them,
you will need to install %{name}-devel and check %{name}'s API at its
comprisable header file.

%prep
%setup -q -n mman-win32-%{version}
%_mingw64_cmake

%build
cd build
%_mingw64_cmake_build

%install
%_mingw64_cmake_install

%{_mingw64_strip} \
	--strip-all \
	%{buildroot}%{_mingw64_bindir}/*.dll

mkdir -p %{buildroot}%{_mingw64_libdir}/pkgconfig

install \
	--mode=644 \
	%{S:1} \
	%{buildroot}%{_mingw64_libdir}/pkgconfig

%files
%defattr(-,root,root,-)
%doc README.md
%{_mingw64_bindir}/*.dll

%files devel
%defattr(-,root,root,-)
%doc README.md
%{_mingw64_includedir}/sys/*.h
%{_mingw64_libdir}/*.a
%{_mingw64_libdir}/pkgconfig/*.pc

%changelog

openSUSE Build Service is sponsored by