Blame SPECS/libomp.spec

d30294
#%%global rc_ver 6
d30294
%global baserelease 1
d30294
%global libomp_srcdir openmp-%{version}%{?rc_ver:rc%{rc_ver}}.src
d30294
d30294
d30294
%ifarch ppc64le
d30294
%global libomp_arch ppc64
d30294
%else
d30294
%global libomp_arch %{_arch}
d30294
%endif
d30294
d30294
Name: libomp
d30294
Version: 10.0.0
d30294
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
d30294
Summary: OpenMP runtime for clang
d30294
d30294
License: NCSA
d30294
URL: http://openmp.llvm.org	
d30294
%if 0%{?rc_ver:1}
d30294
Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{libomp_srcdir}.tar.xz
d30294
Source3: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{libomp_srcdir}.tar.xz.sig
d30294
%else
d30294
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{libomp_srcdir}.tar.xz
d30294
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{libomp_srcdir}.tar.xz.sig
d30294
%endif
d30294
Source1: run-lit-tests
d30294
Source2: lit.fedora.cfg.py
d30294
Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
d30294
d30294
Patch0: 0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch
d30294
Patch1: 99b03c1c18.patch
d30294
d30294
BuildRequires: cmake
d30294
BuildRequires: elfutils-libelf-devel
d30294
BuildRequires: perl
d30294
BuildRequires: perl-Data-Dumper
d30294
BuildRequires: perl-Encode
d30294
BuildRequires: libffi-devel
d30294
d30294
Requires: elfutils-libelf%{?isa}
d30294
d30294
# libomp does not support s390x.
d30294
ExcludeArch: s390x
d30294
d30294
%description
d30294
OpenMP runtime for clang.
d30294
d30294
%package devel
d30294
Summary: OpenMP header files
d30294
Requires: clang-devel%{?isa} = %{version}
d30294
d30294
%description devel
d30294
OpenMP header files.
d30294
d30294
%package test
d30294
Summary: OpenMP regression tests
d30294
Requires: %{name}%{?isa} = %{version}
d30294
Requires: %{name}-devel%{?isa} = %{version}
d30294
Requires: clang
d30294
Requires: llvm
d30294
Requires: gcc
d30294
Requires: gcc-c++
d30294
Requires: python3-lit
d30294
d30294
%description test
d30294
OpenMP regression tests
d30294
d30294
%prep
d30294
%autosetup -n %{libomp_srcdir} -p1
d30294
d30294
%build
d30294
mkdir -p _build
d30294
cd _build
d30294
d30294
%cmake .. \
d30294
	-DLIBOMP_INSTALL_ALIASES=OFF \
d30294
	-DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \
d30294
%if 0%{?__isa_bits} == 64
d30294
	-DOPENMP_LIBDIR_SUFFIX=64 \
d30294
%else
d30294
	-DOPENMP_LIBDIR_SUFFIX= \
d30294
%endif
d30294
d30294
%make_build
d30294
d30294
d30294
%install
d30294
%make_install -C _build
d30294
d30294
# Test package setup
d30294
%global libomp_srcdir %{_datadir}/libomp/src/
d30294
%global libomp_testdir %{libomp_srcdir}/runtime/test/
d30294
%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py
d30294
%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py
d30294
d30294
install -d %{buildroot}%{libomp_srcdir}/runtime
d30294
cp -R runtime/test  %{buildroot}%{libomp_srcdir}/runtime
d30294
cp -R runtime/src  %{buildroot}%{libomp_srcdir}/runtime
d30294
d30294
# Generate lit config files.  Strip off the last line that initiates the
d30294
# test run, so we can customize the configuration.
d30294
head -n -1 _build/runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg}
d30294
d30294
# Install custom fedora config file
d30294
cp %{SOURCE2} %{buildroot}%{lit_fedora_cfg}
d30294
d30294
# Patch lit config files to load custom fedora config
d30294
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg}
d30294
d30294
# Install test script
d30294
install -d %{buildroot}%{_libexecdir}/tests/libomp
d30294
install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/tests/libomp
d30294
d30294
# Remove static libraries with equivalent shared libraries
d30294
rm -rf %{buildroot}%{_libdir}/libarcher_static.a
d30294
d30294
d30294
%files
d30294
%{_libdir}/libomp.so
d30294
%{_libdir}/libomptarget.so
d30294
%ifnarch %{arm}
d30294
%{_libdir}/libarcher.so
d30294
%endif
d30294
%ifnarch %{arm} %{ix86}
d30294
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
d30294
%endif
d30294
d30294
%files devel
d30294
%{_libdir}/clang/%{version}/include/omp.h
d30294
%ifnarch %{arm}
d30294
%{_libdir}/clang/%{version}/include/omp-tools.h
d30294
%{_libdir}/clang/%{version}/include/ompt.h
d30294
%endif
d30294
d30294
%files test
d30294
%{_datadir}/libomp
d30294
%{_libexecdir}/tests/libomp/
d30294
d30294
%changelog
d30294
* Thu Apr 9 2020 sguelton@redhat.com - 10.0.0-1
d30294
- 10.0.0 final
d30294
d30294
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
d30294
- 9.0.1 Release
d30294
d30294
* Fri Sep 27 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
d30294
- 9.0.0 Release
d30294
d30294
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
d30294
- 8.0.1 release
d30294
d30294
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
d30294
- 8.0.1rc2 Release
d30294
d30294
* Mon Apr 29 2019 sguelton@redhat.com - 8.0.0-1
d30294
- 8.0.0 Release
d30294
d30294
* Fri Dec 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-1
d30294
- 7.0.1 Release
d30294
d30294
* Wed Dec 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.2.rc3
d30294
- Fix test failures on single-core systems
d30294
d30294
* Mon Dec 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.1.rc3
d30294
- 7.0.1-rc3 Release
d30294
d30294
* Tue Nov 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
d30294
- 7.0.0 Release
d30294
d30294
* Sat Nov 10 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-3
d30294
- Don't build libomp-test on i686
d30294
d30294
* Mon Oct 01 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
d30294
- Drop scl macros
d30294
d30294
* Wed Jul 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
d30294
- 6.0.1 Release
d30294
d30294
* Mon Jan 15 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-2
d30294
- Drop ExcludeArch: ppc64
d30294
d30294
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
d30294
- 5.0.1 Release.
d30294
d30294
* Wed Jun 21 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
d30294
- 4.0.1 Release.
d30294
d30294
* Wed Jun 07 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
d30294
- Rename libopenmp->libomp
d30294
d30294
* Fri May 26 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-2
d30294
- Disable build on s390x
d30294
d30294
* Mon May 15 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
d30294
- Initial version.