Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > 81b93ecf4bb1c6cdaace5adabc2162e4 > files > 3

mlir-15.0.6-2.mga9.src.rpm

%global maj_ver 15
%global min_ver 0
#global rc_ver 6
%global patch_ver 6
%global mlir_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global mlir_srcdir llvm-project-%{mlir_version}%{?rc_ver:rc%{rc_ver}}.src

%global baserelease 2
%define major	%{maj_ver}.%{min_ver}
%define minor	1

%define libname %mklibname mlir %{major}
%define devname %mklibname -d mlir
%define staticname %mklibname -d mlir -s

Name:		mlir
Version:	%{mlir_version}%{?rc_ver:~rc%{rc_ver}}
Release:	%mkrel %{?rc_ver:0.}%{baserelease}%{?rc_ver:.rc%{rc_ver}}
Summary:	Multi-Level Intermediate Representation Overview
Group:		Development/Other
License:	ASL 2.0 with exceptions
URL:		https://mlir.llvm.org/
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz.sig
Source2:	release-keys.asc

BuildRequires: gcc
BuildRequires:	gcc-c++
BuildRequires:	cmake
BuildRequires: ninja-build
BuildRequires:	zlib-devel
BuildRequires:	llvm-devel = %{version}
BuildRequires:	llvm-test = %{version}

# For origin certification
BuildRequires:	gnupg2


%description
The MLIR project is a novel approach to building reusable and extensible
compiler infrastructure. MLIR aims to address software fragmentation,
improve compilation for heterogeneous hardware, significantly reduce
the cost of building domain specific compilers, and aid in connecting
existing compilers together.

%package -n %libname
Summary:	Runtime libraries for MLIR
Group:		Development/Other

%description -n %libname
The MLIR project is a novel approach to building reusable and extensible
compiler infrastructure. MLIR aims to address software fragmentation,
improve compilation for heterogeneous hardware, significantly reduce
the cost of building domain specific compilers, and aid in connecting
existing compilers together.

This package contains the runtime libraries for MLIR.

	
%package -n %staticname
Summary: MLIR static files
Requires: %{libname} = %{version}-%{release}

%description -n %staticname
MLIR static files.
 	
%package -n %devname
Summary:	MLIR development files
Group:		Development/Other
Provides:	mlir-devel = %version-%release
Requires:	%{libname} = %{version}-%{release}
Requires:	%{staticname}%{?_isa} = %{version}-%{release}
	
%description -n %devname
MLIR development files.

%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{mlir_srcdir}/%{name} -p2
# remove all but keep mlir
find ../* -maxdepth 0 ! -name '%{name}' -exec rm -rf {} +


%build
%cmake  -GNinja \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DCMAKE_SKIP_RPATH=ON \
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
        -DLLVM_BUILD_LLVM_DYLIB=ON \
        -DCMAKE_PREFIX_PATH=%{_libdir}/cmake/llvm/ \
        -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
        -DLLVM_BUILD_TOOLS:BOOL=ON \
	-DLLVM_BUILD_UTILS:BOOL=ON \
	-DMLIR_INCLUDE_DOCS:BOOL=ON \
	-DMLIR_INCLUDE_TESTS:BOOL=OFF \
	-DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF \
        -DBUILD_SHARED_LIBS=OFF \
        -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
        -DMLIR_BUILD_MLIR_C_DYLIB=ON \
%if 0%{?__isa_bits} == 64
	-DLLVM_LIBDIR_SUFFIX=64
%else
	-DLLVM_LIBDIR_SUFFIX=
%endif
# build process .exe tools normally use rpath or static linkage
export LD_LIBRARY_PATH=$(pwd)/%{_vpath_builddir}/%{_lib}
%cmake_build


%install
%cmake_install

%check
# build process .exe tools normally use rpath or static linkage
%cmake_build --target check-mlir || true

%files -n %libname
%license LICENSE.TXT
%{_libdir}/libMLIR*.so.%{maj_ver}{,.*}
%{_libdir}/libmlir_*.so.%{maj_ver}{,.*}

%files -n %staticname
%{_libdir}/libMLIR*.a

%files -n %devname
%{_bindir}/mlir-cpu-runner
%{_bindir}/mlir-linalg-ods-yaml-gen
%{_bindir}/mlir-lsp-server
%{_bindir}/mlir-opt
%{_bindir}/mlir-pdll-lsp-server
%{_bindir}/mlir-reduce
%{_bindir}/mlir-tblgen
%{_bindir}/mlir-translate
%{_bindir}/tblgen-lsp-server
%{_libdir}/libMLIR*.so
%{_libdir}/libmlir_*.so
%{_includedir}/mlir
%{_includedir}/mlir-c
%{_libdir}/cmake/mlir


%changelog
* Mon Jan 02 2023 tv <tv> 15.0.6-2.mga9
+ Revision: 1929321
- Add mlir tools to mlir-devel

* Thu Dec 08 2022 ghibo <ghibo> 15.0.6-1.mga9
+ Revision: 1919345
- Update to release 15.0.6

* Fri Nov 04 2022 ghibo <ghibo> 15.0.4-1.mga9
+ Revision: 1902643
- Update to release 15.0.4

* Mon Sep 26 2022 ghibo <ghibo> 15.0.0-1.mga9
+ Revision: 1892551
- Fix file list
- Fix sig release-keys.asc
- Update to release 15.0.0

* Tue Jun 21 2022 tv <tv> 14.0.5-1.mga9
+ Revision: 1865344
- Update to 14.0.5

* Wed Mar 30 2022 tv <tv> 14.0.0-1.mga9
+ Revision: 1834910
- Update to LLVM 14.0.0

* Fri Feb 04 2022 tv <tv> 13.0.1-3.mga9
+ Revision: 1771389
- Update to 13.0.1 final

* Thu Oct 21 2021 tv <tv> 13.0.0-3.mga9
+ Revision: 1752540
- Fix static pkg deps

* Thu Oct 21 2021 tv <tv> 13.0.0-2.mga9
+ Revision: 1752478
- Build with static pkg name
+ tmb <tmb>
- fix static-devel package name

* Wed Oct 20 2021 tv <tv> 13.0.0-1.mga9
+ Revision: 1752306
- 13.0.0 Release
- 13.0.0 Release
- Split static subpkg

* Mon Jul 19 2021 tv <tv> 12.0.1-1.mga9
+ Revision: 1737069
- 12.0.0 final

* Sat Apr 17 2021 tv <tv> 12.0.0-7.mga9
+ Revision: 1716257
- 12.0.0 final

* Fri Apr 09 2021 tv <tv> 12.0.0-0.7.rc5.mga9
+ Revision: 1714302
- 12.0.0 RC5

* Fri Mar 12 2021 tv <tv> 12.0.0-0.4.rc3.mga9
+ Revision: 1701751
- LLVM 12.0.0 rc3

* Mon Mar 01 2021 tv <tv> 12.0.0-0.2.rc2.mga9
+ Revision: 1695633
- 12.0.0-rc2 release

* Thu Jan 07 2021 tv <tv> 11.0.1-3.1.mga8
+ Revision: 1669534
- LLVM 11.0.1 final

* Thu Dec 31 2020 ghibo <ghibo> 11.0.1-0.rc2.1.mga8
+ Revision: 1667284
- Update to release 11.0.1rc2

* Thu Dec 03 2020 ghibo <ghibo> 11.0.1-0.rc1.1.mga8
+ Revision: 1652043
- Fix Requires

* Wed Dec 02 2020 ghibo <ghibo> 11.0.1-0.rc1.mga8
+ Revision: 1651820
- Fix baserelease
- Sync to release 11.0.1-rc1

* Wed Dec 02 2020 ghibo <ghibo> 11.0.0-2.mga8
+ Revision: 1651723
- Fix Requires

* Wed Dec 02 2020 ghibo <ghibo> 11.0.0-1.mga8
+ Revision: 1651638
- imported package mlir