File mingw64-freeocl.spec of Package mingw64-freeocl

#
# spec file for package mingw64-freeocl
#
# Copyright (c) 2015, Martin Hauke <mardnh@gmx.de>
#
# 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/
#

%define realname freeocl
Name:           mingw64-%{realname}
Version:        0.3.6.git1515258797.6d1d5c9
Release:        0
Summary:        Multi-platform implementation of OpenCL 1.2 targeting CPUs
License:        GPL-3.0-only AND LGPL-3.0-only
Group:          System/Libraries
URL:            https://github.com/zuzuf/freeocl
Source:         %{realname}-%{version}.tar.xz
Patch0:         %{realname}-win32.patch
Patch1:         freeocl-0.3.6.git1515258797.6d1d5c9-fix-building.patch
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-libSDL-devel
Requires:       %{name}-devel = %{version}-%{release}
%_mingw64_package_header_debug
BuildArch:      noarch

%description
FreeOCL is an implementation of OpenCL 1.2 specifications targeting CPUs.
Instead of using a built-in or dedicated compiler, it relies on an external
C++ compiler. It aims to provide a debugging tool and a reliable platform
which can run everywhere.

%package icd
Summary:        FreeOCL ICD Loader
Group:          System/Libraries

%description icd
FreeOCL is an implementation of OpenCL 1.2 specifications targeting CPUs.
Instead of using a built-in or dedicated compiler, it relies on an external
C++ compiler. It aims to provide a debugging tool and a reliable platform
which can run everywhere.

This package contails the ICD Loader shipped with FreeOCL.

%package demos
Summary:        FreeOCL demo programs for the OpenCL stack
Group:          System/Libraries

%description demos
FreeOCL is an implementation of OpenCL 1.2 specifications targeting CPUs.
Instead of using a built-in or dedicated compiler, it relies on an external
C++ compiler. It aims to provide a debugging tool and a reliable platform
which can run everywhere.

This package contains the demos shipped with FreeOCL.

%package devel
Summary:        FreeOCL development files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
FreeOCL is an implementation of OpenCL 1.2 specifications targeting CPUs.
Instead of using a built-in or dedicated compiler, it relies on an external
C++ compiler. It aims to provide a debugging tool and a reliable platform
which can run everywhere.

This package provides the files needed to compile software that uses
OpenCL.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{realname}-%{version}

%build
%_mingw64_cmake \
    -DBUILD_SAMPLES=true
%_mingw64_cmake_build

%install
%_mingw64_cmake_install
# FIXME: should be handled in cmake
mkdir -p %{buildroot}/%{_mingw64_bindir}
mkdir -p %{buildroot}/%{_mingw64_libdir}
# lib
install -Dpm0644 build/src/libFreeOCL.dll.a %{buildroot}/%{_mingw64_libdir}/libFreeOCL.dll.a
install -Dpm0644 build/src/libFreeOCL.dll %{buildroot}/%{_mingw64_bindir}/libFreeOCL.dll
# icd-loader
install -Dpm0644 build/src/icd/libOpenCL.dll.a %{buildroot}/%{_mingw64_libdir}/libOpenCL.dll.a
install -Dpm0644 build/src/icd/libOpenCL.dll %{buildroot}/%{_mingw64_bindir}/libOpenCL.dll

%files
%doc AUTHORS README COPYING COPYING.LESSER
%{_mingw64_bindir}/libFreeOCL.dll

%files icd
%{_mingw64_bindir}/libOpenCL.dll

%files demos
%{_mingw64_bindir}/clbuiltins.exe
%{_mingw64_bindir}/cldemo.exe
%{_mingw64_bindir}/cllist.exe
%{_mingw64_bindir}/cltest.exe
%{_mingw64_bindir}/clgalaxy.exe

%files devel
%{_mingw64_includedir}/FreeOCL
%{_mingw64_libdir}/libFreeOCL.dll.a
%{_mingw64_libdir}/libOpenCL.dll.a

%changelog
openSUSE Build Service is sponsored by