2020-05-12 22:21:51 +00:00
#
2022-06-24 14:23:12 +00:00
# spec file for package root6
2020-05-12 22:21:51 +00:00
#
2023-01-09 19:07:28 +00:00
# Copyright (c) 2023 SUSE LLC
2020-05-12 22:21:51 +00:00
#
# 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 https://bugs.opensuse.org/
#
2023-01-09 19:07:28 +00:00
2020-05-12 22:21:51 +00:00
%global flavor @BUILD_FLAVOR@%{nil}
%global srcdir root-%{version}
%global __builder ninja
%if "%{flavor}" == ""
%define pname root6
%define libname %{pname}-libs
%define mylibdir %{_libdir}/%{pname}
2020-08-24 13:49:05 +00:00
# LTO build on aarch is hit or miss
%ifarch aarch64
%define _lto_cflags %{nil}
%endif
2023-01-09 19:07:28 +00:00
%bcond_with standalone_minuit2
# BUILDING ON i586 FAILS NO MATTER THE MEMORY
ExcludeArch : i586
2024-07-02 12:57:24 +00:00
# Disable tests, they require data downloads from the network anyway
%bcond_with test
2020-05-12 22:21:51 +00:00
%endif
%if "%{flavor}" == "minuit2"
%define pname Minuit2
%define libname lib%{pname}
%bcond_without standalone_minuit2
2024-07-02 12:57:24 +00:00
%bcond_without test
2020-05-12 22:21:51 +00:00
%endif
2025-06-29 04:06:41 +00:00
%if 0%{?suse_version} < 1600
2024-07-02 12:57:24 +00:00
# Explicit python311 for Leap
%define pythons python311
# For <filesystem> support
%define gcc_ver 9
%else
# Only default python3 flavour for TW
2021-08-04 09:03:28 +00:00
%define pythons python3
2024-07-02 12:57:24 +00:00
%endif
2025-03-24 17:53:41 +00:00
# glew is built with EGL, which causes builds to fail [boo#1235150]
%bcond_with opengl
2025-06-29 04:06:41 +00:00
# Incompatible with GCC 15
%if 0%{?suse_version} > 1650
%define gcc_ver 14
%endif
2020-05-12 22:21:51 +00:00
%define series 6
2024-07-02 12:57:24 +00:00
%define sover 6_32
2024-08-18 04:15:03 +00:00
# build is already a populated dir in tarball
%define __builddir _build
2020-05-12 22:21:51 +00:00
Name : %{pname}
2025-06-09 08:44:38 +00:00
Version : 6.32.14
2020-05-12 22:21:51 +00:00
Release : 0
Summary : Numerical data analysis framework
License : LGPL-2.1-or-later
URL : https://root.cern.ch
Source0 : https://root.cern.ch/download/root_v%{version} .source.tar.gz
Source1 : root6-rpmlintrc
2023-12-04 19:03:08 +00:00
# SECTION Common BuildRequires for full build and standalone minuit2
BuildRequires : cmake
BuildRequires : ninja
2024-07-02 12:57:24 +00:00
BuildRequires : gcc%{?gcc_ver} -c++
2023-12-04 19:03:08 +00:00
# /SECTION
%if %{without standalone_minuit2}
# SECTION Full build
2023-01-09 19:07:28 +00:00
BuildRequires : %{python_module PyYAML}
BuildRequires : %{python_module devel}
BuildRequires : %{python_module numpy-devel}
BuildRequires : %{python_module pygments}
2020-05-12 22:21:51 +00:00
BuildRequires : Mesa-devel
BuildRequires : chrpath
BuildRequires : desktop-file-utils
BuildRequires : doxygen
BuildRequires : fdupes
BuildRequires : gawk
BuildRequires : giflib-devel
BuildRequires : git
BuildRequires : graphviz-devel
BuildRequires : gtest
BuildRequires : hdf5-devel
BuildRequires : libmysqlclient-devel
BuildRequires : memory-constraints
BuildRequires : openldap2-devel
2023-01-09 19:07:28 +00:00
BuildRequires : pkgconfig
2020-05-12 22:21:51 +00:00
BuildRequires : pythia-devel
2021-08-04 09:03:28 +00:00
BuildRequires : python-rpm-macros
2020-05-12 22:21:51 +00:00
BuildRequires : ruby-devel >= 1.8
BuildRequires : sqlite3-devel
BuildRequires : xrootd-client-devel >= 4.6
BuildRequires : xrootd-private-devel >= 4.6
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(cfitsio)
2020-05-12 22:21:51 +00:00
BuildRequires : pkgconfig(davix)
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(expat)
BuildRequires : pkgconfig(fftw3)
# Needed for root6-fontconfig.patch
BuildRequires : pkgconfig(fontconfig)
#
BuildRequires : pkgconfig(freetype2)
2020-05-12 22:21:51 +00:00
BuildRequires : pkgconfig(glu)
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(gsl)
BuildRequires : pkgconfig(ice)
BuildRequires : pkgconfig(libjpeg)
2025-02-11 11:28:49 +00:00
BuildRequires : pkgconfig(libedit)
2020-05-12 22:21:51 +00:00
BuildRequires : pkgconfig(liblz4)
2023-12-04 19:03:08 +00:00
BuildRequires : pkgconfig(liblzma)
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(libpcre2-posix)
BuildRequires : pkgconfig(libpng16)
BuildRequires : pkgconfig(libpq)
BuildRequires : pkgconfig(libtiff-4)
BuildRequires : pkgconfig(libxml-2.0)
BuildRequires : pkgconfig(libxxhash)
2020-05-12 22:21:51 +00:00
BuildRequires : pkgconfig(libzstd)
2025-02-11 11:28:49 +00:00
BuildRequires : pkgconfig(ncurses)
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(nlohmann_json)
BuildRequires : pkgconfig(odbc) >= 2.2.11
BuildRequires : pkgconfig(openssl)
BuildRequires : pkgconfig(sm)
BuildRequires : pkgconfig(x11)
BuildRequires : pkgconfig(xext)
2020-05-12 22:21:51 +00:00
BuildRequires : pkgconfig(xft)
BuildRequires : pkgconfig(xpm)
2024-07-02 12:57:24 +00:00
BuildRequires : pkgconfig(z3)
2023-12-04 19:03:08 +00:00
BuildRequires : pkgconfig(zlib)
2025-03-24 17:53:41 +00:00
%if %{with opengl}
BuildRequires : gl2ps-devel
BuildRequires : pkgconfig(ftgl)
BuildRequires : pkgconfig(glew)
%endif
2020-08-24 13:49:05 +00:00
%if %{with test}
BuildRequires : gmock
%endif
2023-12-04 19:03:08 +00:00
%if 0%{?suse_version} >= 1699
BuildRequires : cmake(ryml)
%endif
# /SECTION Full build
%endif
2020-05-12 22:21:51 +00:00
# SECTION Patches required for successful build
# PATCH-FIX-UPSTREAM root6-reduce-compile-memory.patch badshah400@gmail.com -- Reduce the memory during compilation somewhat; patch taken from fedora
Patch1 : root6-reduce-compile-memory.patch
# /SECTION
# SECTION Other patches (start at number 10)
2024-07-02 12:57:24 +00:00
# PATCH-FEATURE-OPENSUSE root6-fontconfig.patch badshah400@gmail.com -- Make root use system installed TTF fonts; this is needed to avoid licensing issues with non-free fonts bundled by upstream tarball; patch taken from fedora
2023-01-09 19:07:28 +00:00
Patch10 : root6-fontconfig.patch
2024-08-18 04:15:03 +00:00
# PATCH-FIX-UPSTREAM root6-gitinfo-use-file-timestamp.patch badshah400@gmail.com -- Set timestamp info in generated file to top-level README.md file modification time instead of setting it to current build time, for reproducibility's sake
Patch11 : root6-gitinfo-use-file-timestamp.patch
2023-06-19 10:12:25 +00:00
# PATCH-FIX-UPSTREAM root6-python3.11-no-code.h.patch badshah400@gmail.com -- code.h is no longer available with python 3.11, use Python.h instead
Patch13 : root6-python3.11-no-code.h.patch
2020-05-12 22:21:51 +00:00
# /SECTION
%if !0%{?sles_version}
BuildRequires : freetype-devel
%endif
%description
The ROOT system provides a set of OO frameworks with all the
functionality needed to handle and analyze large amounts of data
efficiently.
With the data defined as a set of objects, specialized storage methods
can give direct access to the separate attributes of the selected
objects, without having to touch the bulk of the data. Included are
histogramming methods in 1, 2 and 3 dimensions, curve fitting, function
evaluation, minimization, graphics and visualization classes to allow the
easy creation of an analysis system that can query and process the data
interactively or in batch mode.
The command language, the scripting (or macro) language, and the
programming language are all C++, thanks to the built-in CINT C++
interpreter. This interpreter removes the time consuming compile/link
cycle, allowing for fast prototyping of the macros, and providing a
good environment to learn C++. If more performance is needed, the
interactively developed macros can be compiled using a C++ compiler.
The system has been designed in such a way that it can query its
databases in parallel on MPP machines or on clusters of workstations
or high-end PCs. ROOT is an open system that can be dynamically
extended by linking external libraries. This makes ROOT a premier
platform on which to build data acquisition, simulation and data
analysis systems.
%package -n %{libname}
Summary : Shared libraries for %{name}
%if ! %{with standalone_minuit2}
2020-06-09 09:03:25 +00:00
Provides : root6-Core-libs = %{version}
Provides : root6-extra-libs = %{version}
Provides : root6-Hist-libs = %{version}
Provides : root6-IO-libs = %{version}
Provides : root6-MathCore-libs = %{version}
Provides : root6-Matrix-libs = %{version}
Provides : root6-Minuit2-libs = %{version}
Provides : root6-Thread-libs = %{version}
2020-05-12 22:21:51 +00:00
%endif
%description -n %{libname}
This package provides the shared libraries for %{name} .
%package devel
Summary : Headers and sources for ROOT's Core library
%if ! %{with standalone_minuit2}
Requires : %{name} -libs = %{version}
2021-08-04 09:03:28 +00:00
Requires : gcc-c++
2022-09-24 09:20:21 +00:00
Requires : gnu-free-fonts
Requires : google-droid-fonts
2020-06-09 09:03:25 +00:00
Provides : root6-Core-devel = %{version}
Provides : root6-extra-devel = %{version}
Provides : root6-Hist-devel = %{version}
Provides : root6-IO-devel = %{version}
Provides : root6-MathCore-devel = %{version}
Provides : root6-Matrix-devel = %{version}
Provides : root6-Minuit2-devel = %{version}
Provides : root6-Thread-devel = %{version}
2021-08-04 09:03:28 +00:00
# The root6 pkg previously provided binaries that no longer work w/o the devel pkg anyway
Provides : root6 = %{version}
Obsoletes : root6 < %{version} -%{release}
2020-05-12 22:21:51 +00:00
%endif
%description devel
This package provides the headers and sources for programming with ROOT.
2021-08-04 09:03:28 +00:00
%package -n %{python_prefix}-root6
2020-05-12 22:21:51 +00:00
Summary : Python bindings for ROOT
2022-09-24 09:20:21 +00:00
Requires : gnu-free-fonts
Requires : google-droid-fonts
2020-06-09 09:03:25 +00:00
Requires : root6-devel = %{version}
2023-12-04 19:03:08 +00:00
%if 0%{?suse_version} >= 1699
2021-08-04 09:03:28 +00:00
Provides : python3-root6 = %{version}
Obsoletes : python3-root6 < %{version} -%{release}
%endif
%description -n %{python_prefix}-root6
This package provides python bindings for ROOT.
2020-05-12 22:21:51 +00:00
2021-03-10 11:34:33 +00:00
%package config
Summary : Config scripts for setting up root6 for different shell env
Requires : root6-devel = %{version}
2022-06-24 14:23:12 +00:00
BuildArch : noarch
2021-03-10 11:34:33 +00:00
%description config
This package provides config scripts for setting up the root6 working
environment in different shells such as bash, csh, fish, etc.
Note that you do not need this package for standard root6 installations.
2020-05-12 22:21:51 +00:00
%package tutorials
Summary : A set of tutorials for %{name}
2020-06-09 09:03:25 +00:00
Requires : root6-devel = %{version}
2022-06-24 14:23:12 +00:00
BuildArch : noarch
2020-05-12 22:21:51 +00:00
%description tutorials
This package provides a set of tutorials for Root.
%package test
Summary : Tests for %{name}
2020-06-09 09:03:25 +00:00
Requires : root6-devel = %{version}
2022-06-24 14:23:12 +00:00
BuildArch : noarch
2020-05-12 22:21:51 +00:00
%description test
This package provides a set of tests for Root.
2021-08-04 09:03:28 +00:00
%package utils
Summary : Utilities for working with ROOT files
Requires : python3-root6
%description utils
This package provides a few utilities to work with ROOT files.
2020-05-12 22:21:51 +00:00
%prep
%autosetup -n %{srcdir} -p1
2024-07-02 12:57:24 +00:00
# SECTION REMOVE NON-FREE FONTS (needs root6-fontconfig.patch)
2020-08-24 13:49:05 +00:00
find ./fonts -type f -a '!' -name 'STIX*' -print -delete
2020-05-12 22:21:51 +00:00
# /SECTION
2020-06-18 16:28:53 +00:00
sed -Ei " 1 { / \ / u s r \ / b i n \ / e n v / d } " \
2021-08-04 09:03:28 +00:00
bindings/jupyroot/python/JupyROOT/kernel/rootkernel.py \
bindings/pyroot/cppyy/cppyy-backend/cling/python/cppyy_backend/_cppyy_generator.py \
2020-06-18 16:28:53 +00:00
main/python/cmdLineUtils.py
2025-01-06 08:27:18 +00:00
# Remove runtime tool from EXPORT set -- https://github.com/root-project/root/issues/17350
sed -i -e '/ROOT_EXECUTABLE/ s@\(rootreadspeed.*\) LIBRARIES@\1 CMAKENOEXPORT LIBRARIES@' main/CMakeLists.txt
grep ROOT_EXECUTABLE main/CMakeLists.txt
2020-06-18 16:28:53 +00:00
2020-05-12 22:21:51 +00:00
%build
%if %{with standalone_minuit2}
pushd math/minuit2
2023-12-04 19:03:08 +00:00
cp -r ../../core/foundation/inc/ROOT/RVersion.hxx ./
2024-07-02 12:57:24 +00:00
%cmake \
-DCMAKE_C_COMPILER=gcc%{?gcc_ver:-%{gcc_ver} } \
-DCMAKE_CXX_COMPILER=g++%{?gcc_ver:-%{gcc_ver} } \
-Dminuit2_standalone:BOOL=ON \
-Dminuit2_openmp:BOOL=ON
2020-05-12 22:21:51 +00:00
%else
%limit_build -m 2000
2020-08-24 13:49:05 +00:00
# Directly passing RPM optflags to CMAKE_CXX_FLAGS causes build errors,
# need to reset CMAKE_CXX_FLAGS and pass optflags to CMAKE_REQUIRED_FLAGS instead
# Upstream Recommends -O3 optimization for RelwithDebugInfo
2020-05-12 22:21:51 +00:00
%cmake \
2024-07-02 12:57:24 +00:00
-DCMAKE_C_COMPILER=gcc%{?gcc_ver:-%{gcc_ver} } \
-DCMAKE_CXX_COMPILER=g++%{?gcc_ver:-%{gcc_ver} } \
2023-06-19 10:12:25 +00:00
-DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} /root \
2020-05-12 22:21:51 +00:00
-DCMAKE_INSTALL_LIBDIR:PATH=%{mylibdir} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_datadir} /root \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir} /%{name} \
2020-08-24 13:49:05 +00:00
-DCMAKE_REQUIRED_FLAGS=" %{optflags} " \
-DCMAKE_CXX_FLAGS=" - O 3 " \
%ifarch aarch64 %{ix86}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=" - O 3 - g 1 - D N D E B U G " \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=" - O 3 - g 1 - D N D E B U G " \
%endif
2020-05-12 22:21:51 +00:00
-Dgnuinstall:BOOL=ON \
-Dbuiltin_afterimage:BOOL=ON \
-Dbuiltin_cfitsio:BOOL=OFF \
-Dbuiltin_clang:BOOL=ON \
-Dbuiltin_davix:BOOL=OFF \
-Dbuiltin_fftw3:BOOL=OFF \
-Dbuiltin_freetype:BOOL=OFF \
-Dbuiltin_ftgl:BOOL=OFF \
-Dbuiltin_gl2ps:BOOL=OFF \
-Dbuiltin_glew:BOOL=OFF \
-Dbuiltin_gsl:BOOL=OFF \
2023-12-04 19:03:08 +00:00
-Dbuiltin_gtest:BOOL=OFF \
2020-05-12 22:21:51 +00:00
-Dbuiltin_llvm:BOOL=ON \
-Dbuiltin_lz4:BOOL=OFF \
-Dbuiltin_lzma:BOOL=OFF \
-Dbuiltin_openssl:BOOL=OFF \
-Dbuiltin_pcre:BOOL=OFF \
-Dbuiltin_tbb:BOOL=OFF \
-Dbuiltin_unuran:BOOL=ON \
-Dbuiltin_vc:BOOL=OFF \
-Dbuiltin_vdt:BOOL=OFF \
-Dbuiltin_veccore:BOOL=OFF \
-Dbuiltin_xrootd:BOOL=OFF \
-Dbuiltin_xxhash:BOOL=OFF \
-Dbuiltin_zlib:BOOL=OFF \
-Darrow:BOOL=OFF \
-Dasimage:BOOL=ON \
-Dastiff:BOOL=ON \
-Dcefweb:BOOL=OFF \
-Dclad:BOOL=OFF \
-Dcling:BOOL=ON \
-Dcocoa:BOOL=OFF \
-Dcuda:BOOL=OFF \
-Droot7:BOOL=OFF \
-Dwebgui:BOOL=OFF \
-Ddavix:BOOL=ON \
-Ddcache:BOOL=OFF \
-Dexplicitlink:BOOL=ON \
-Dfftw3:BOOL=ON \
-DFIREFOX_EXECUTABLE:PATH=%{_bindir} /firefox \
-Dfitsio:BOOL=ON \
-Dfortran:BOOL=ON \
-Dgdml:BOOL=ON \
-Dgviz:BOOL=ON \
-Dhttp:BOOL=ON \
-Dimt:BOOL=OFF \
-Dlibcxx:BOOL=OFF \
-Dmathmore:BOOL=ON \
-Dmemory_termination:BOOL=OFF \
2021-09-28 19:25:10 +00:00
-Dmemstat:BOOL=OFF \
2020-08-24 13:49:05 +00:00
-Dminuit2_openmp:BOOL=ON \
2020-05-12 22:21:51 +00:00
-Dmysql:BOOL=ON \
-Dodbc:BOOL=ON \
2025-03-24 17:53:41 +00:00
-Dopengl:BOOL=%{?with_opengl:ON}%{!?with_opengl:OFF} \
2020-05-12 22:21:51 +00:00
-Dpch:BOOL=ON \
-Dpgsql:BOOL=ON \
-Dpythia8:BOOL=ON \
-Dqt5web:BOOL=ON \
-Dr:BOOL=OFF \
-Droofit:BOOL=ON \
-Drpath:BOOL=OFF \
-Druby:BOOL=OFF \
-Druntime_cxxmodules:BOOL=OFF \
-Dshadowpw:BOOL=ON \
-Dshared:BOOL=ON \
-Dsoversion:BOOL=ON \
-Dsqlite:BOOL=ON \
-Dssl:BOOL=ON \
-Dthread:BOOL=ON \
-Dtmva:BOOL=ON \
-Dtmva-cpu:BOOL=OFF \
-Dtmva-gpu:BOOL=OFF \
-Dtmva-pymva:BOOL=ON \
-Dtmva-rmva:BOOL=ON \
-Dunuran:BOOL=ON \
-Dvc:BOOL=OFF \
-Dvdt:BOOL=OFF \
-Dveccore:BOOL=OFF \
-Dvecgeom:BOOL=OFF \
-Dx11:BOOL=ON \
-Dxml:BOOL=ON \
-Dxrootd:BOOL=ON \
2020-08-24 13:49:05 +00:00
-Dtesting:BOOL=%{?with_test:ON}%{!?with_test:OFF} \
2020-05-12 22:21:51 +00:00
-Dclingtest:BOOL=OFF \
-Dcoverage:BOOL=OFF \
-Droottest:BOOL=OFF \
2025-03-24 17:53:41 +00:00
-Drootbench:BOOL=OFF \
-Wno-dev
2020-05-12 22:21:51 +00:00
%endif
%cmake_build
%install
%if %{with standalone_minuit2}
# SECTION INSTALL FOR MINUIT2 STANDALONE
pushd math/minuit2
%cmake_install
popd
mkdir -p %{buildroot} %{_libdir} /cmake
2020-05-12 22:37:32 +00:00
2020-05-12 22:39:03 +00:00
if [ " % { _ l i b } " != " l i b " ]
2020-05-12 22:37:32 +00:00
then
mv %{buildroot} %{_prefix} /lib/cmake/* %{buildroot} %{_libdir} /cmake/
fi
2023-12-04 19:03:08 +00:00
2020-05-12 22:21:51 +00:00
# /SECTION
%else
# SECTION INSTALL FOR FULL ROOT
%cmake_install
2024-07-02 12:57:24 +00:00
2024-07-07 05:32:33 +00:00
# Hashbang fixes
%python3_fix_shebang
2025-02-05 10:01:24 +00:00
%{python_expand sed -i " s | # ! %{_bindir} / e n v p y t h o n | # ! %{_bindir} / p y t h o n % { $ p y t h o n _ v e r s i o n } | " %{buildroot} %{_datadir} /root/dictpch/makepch.py
sed -i " s | # ! %{_bindir} / p y t h o n | # ! %{_bindir} / p y t h o n % { $ p y t h o n _ v e r s i o n } | " %{buildroot} %{_datadir} /root/pdg_table_update.py
}
2024-03-06 13:15:10 +00:00
sed -i " s | # ! %{_bindir} / e n v b a s h | # ! / b i n / b a s h | " %{buildroot} %{_bindir} /{root-config,rootssh}
2020-05-12 22:21:51 +00:00
2024-07-07 05:32:33 +00:00
# Python libs installation
%{python_expand # HANDLE NON-STANDARD LOCATIONS FOR PYTHON PACKAGES
2024-07-02 12:57:24 +00:00
install -d %{buildroot} %{$python_sitearch}
mv -t %{buildroot} %{$python_sitearch} \
2020-05-12 22:21:51 +00:00
%{buildroot} %{_libdir} /%{name} /__pycache__ \
2020-08-24 13:49:05 +00:00
%{buildroot} %{_libdir} /%{name} /ROOT \
%{buildroot} %{_libdir} /%{name} /cppyy \
%{buildroot} %{_libdir} /%{name} /cppyy_backend \
2020-05-12 22:21:51 +00:00
%{buildroot} %{_libdir} /%{name} /cmdLineUtils.py \
2021-07-04 19:12:43 +00:00
%{buildroot} %{_libdir} /%{name} /JupyROOT/ \
2022-06-24 14:23:12 +00:00
%{buildroot} %{_libdir} /%{name} /DistRDF \
%{nil}
2020-06-09 09:03:25 +00:00
2024-07-02 12:57:24 +00:00
ln -s -t %{buildroot} %{$python_sitearch} \
%{_libdir} /%{name} /libcppyy.so \
%{_libdir} /%{name} /libcppyy_backend.so \
2020-06-09 09:03:25 +00:00
%{_libdir} /%{name} /libPyMVA.so \
2024-07-02 12:57:24 +00:00
%{_libdir} /%{name} /libROOTPythonizations.so \
2020-08-24 13:49:05 +00:00
%{_libdir} /%{name} /libROOTTPython.so
2020-05-12 22:21:51 +00:00
2024-07-02 12:57:24 +00:00
%fdupes %{buildroot} %{$python_sitearch}/
}
# /Python
2020-05-12 22:21:51 +00:00
# REMOVE STATIC LIBS
find %{buildroot} %{_libdir} /%{name} -name " * . a " -delete -print;
# REMOVE FONTS
rm -fr %{buildroot} %{_datadir} /root/fonts
# REMOVE SOME UNNECESSARY FILES
rm -rf %{buildroot} %{_datadir} /root/proof/utils
rm %{buildroot} %{_datadir} /root/proof/*.sample \
%{buildroot} %{_datadir} /root/root.desktop \
2023-12-12 09:08:49 +00:00
%{buildroot} %{_docdir} /%{name} /INSTALL
2020-05-12 22:21:51 +00:00
2021-08-04 09:03:28 +00:00
# Move config files to sysconfdir...
2021-03-10 11:34:33 +00:00
mkdir -p %{buildroot} %{_sysconfdir} /profile.d
mv %{buildroot} %{_bindir} /setxrd* \
%{buildroot} %{_bindir} /thisroot* \
%{buildroot} %{_sysconfdir} /profile.d/
2021-08-07 13:16:31 +00:00
#... and drop roots script
rm %{buildroot} %{_bindir} /roots
2021-08-04 09:03:28 +00:00
2020-05-12 22:21:51 +00:00
# REGISTER NON-STD LOCATION OF LIBS AT /etc/ld.so.conf.d
mkdir -p %{buildroot} /%{_sysconfdir} /ld.so.conf.d
echo " %{_libdir} / %{name} " > %{buildroot} /%{_sysconfdir} /ld.so.conf.d/root6.conf
2021-08-04 09:03:28 +00:00
# Remove an empty file from tutorials
rm %{buildroot} %{_docdir} /%{name} /tutorials/doc/v602/index.md
2025-02-06 14:07:12 +00:00
# Install desktop icon and application
2025-02-11 11:28:49 +00:00
mkdir -p %{buildroot} %{_datadir} /pixmaps
ln -s %{_datadir} /root/icons/Root6Icon.png %{buildroot} %{_datadir} /pixmaps/Root6.png
2025-02-06 14:07:12 +00:00
echo " I c o n = R o o t 6 " >> ./etc/root.desktop
2025-02-11 11:28:49 +00:00
install -D -m0644 ./etc/root.desktop %{buildroot} %{_datadir} /applications/root.desktop
2025-02-06 14:07:12 +00:00
2020-05-12 22:21:51 +00:00
%fdupes %{buildroot} %{_docdir} /%{name} /
%fdupes %{buildroot} %{_libdir} /%{name} /
2020-06-18 16:28:53 +00:00
%fdupes %{buildroot} %{_datadir} /root/
2024-07-02 12:57:24 +00:00
# /SECTION
%endif
2020-05-12 22:21:51 +00:00
2023-12-12 09:08:49 +00:00
%if %{with test}
%check
2024-07-02 12:57:24 +00:00
%if %{with standalone_minuit2}
pushd math/minuit2
export Minuit2_DIR=%{buildroot} %{_libdir} /cmake/Minuit2
export LD_LIBRARY_PATH+=:%{buildroot} %{_libdir}
%else
export LD_LIBRARY_PATH+=:%{buildroot} %{mylibdir}
# This is no longer just 'build' (because of python_expand usage?)
cp -r _build.tmp build
2023-12-12 09:08:49 +00:00
%endif
2024-07-02 12:57:24 +00:00
export CXX=g++%{?gcc_ver:-%{gcc_ver} }
%ctest
2020-05-12 22:21:51 +00:00
%endif
%if %{with standalone_minuit2}
2024-07-02 12:57:24 +00:00
%ldconfig_scriptlets -n %{name} -devel
2020-05-12 22:21:51 +00:00
%else
2024-07-02 12:57:24 +00:00
%ldconfig_scriptlets -n %{libname}
2020-05-12 22:21:51 +00:00
%endif
%if %{with standalone_minuit2}
%files devel
%license math/minuit2/LICENSE
%doc math/minuit2/README.md math/minuit2/test
%{_libdir} /lib*.so
%{_libdir} /cmake/
2025-06-09 08:44:38 +00:00
%{_includedir} /Minuit2/
2020-05-12 22:21:51 +00:00
%else
%files libs
%dir %{mylibdir}
%{mylibdir} /lib*.so.*
%config %{_sysconfdir} /ld.so.conf.d/*.conf
%files devel
%doc %{_docdir} /%{name} /CREDITS
2021-07-04 19:12:43 +00:00
%doc %{_docdir} /%{name} /DEVELOPMENT.md
2020-05-12 22:21:51 +00:00
%doc %{_docdir} /%{name} /cfortran.doc
%doc %{_docdir} /%{name} /README*
%doc %{_docdir} /%{name} /ReleaseNotes/
%license %{_docdir} /%{name} /LICENSE
2021-08-04 09:03:28 +00:00
%{_bindir} /proofserv
%{_bindir} /rmkdepend
%{_bindir} /root
%{_bindir} /root.exe
%{_bindir} /rootcling
%{_bindir} /rootcint
%{_bindir} /rootn.exe
%{_bindir} /rootnb.exe
2020-05-12 22:21:51 +00:00
%{_bindir} /root-config
2021-08-07 13:16:31 +00:00
%{_bindir} /roots.exe
2021-08-04 09:03:28 +00:00
%{_datadir} /root/
2020-05-12 22:21:51 +00:00
%{_libdir} /%{name} /lib*.rootmap
%{_libdir} /%{name} /lib*.pcm
%{_includedir} /root/
%{_libdir} /%{name} /lib*.so
2023-12-12 09:08:49 +00:00
%if %{with test}
%{_libdir} /%{name} /TestSupport/
%endif
2021-08-04 09:03:28 +00:00
%{_mandir} /man1/*.1%{?ext_man}
2022-09-28 17:00:26 +00:00
# Should be part of the utils package, but see https://github.com/root-project/root/issues/11448
%{_bindir} /hadd
%{_bindir} /hist2workspace
2025-02-06 14:07:12 +00:00
%{_datadir} /applications/*.desktop
%{_datadir} /pixmaps/Root6.png
2020-05-12 22:21:51 +00:00
2021-03-10 11:34:33 +00:00
%files config
%config %{_sysconfdir} /profile.d/*
2021-08-04 09:03:28 +00:00
%files -n %{python_prefix}-root6
2024-03-06 13:15:10 +00:00
%{python_sitearch} /DistRDF/
%{python_sitearch} /cppyy*/
%{python_sitearch} /*.so
%{python_sitearch} /*ROOT/
%{python_sitearch} /cmdLineUtils.py
%pycache_only %{python_sitearch} /__pycache__/*
2020-05-12 22:21:51 +00:00
%files tutorials
%dir %{_docdir} /%{name}
%{_docdir} /%{name} /tutorials/
2020-08-24 13:49:05 +00:00
%files test
%doc test
2020-05-12 22:21:51 +00:00
2021-08-04 09:03:28 +00:00
%files utils
%{_bindir} /genreflex
%{_bindir} /prepareHistFactory
%{_bindir} /rootbrowse
%{_bindir} /rootcp
%{_bindir} /rootdrawtree
%{_bindir} /rooteventselector
%{_bindir} /rootls
%{_bindir} /rootmkdir
%{_bindir} /rootmv
%{_bindir} /rootprint
2023-12-04 19:03:08 +00:00
%{_bindir} /rootreadspeed
2021-08-04 09:03:28 +00:00
%{_bindir} /rootrm
2023-12-04 19:03:08 +00:00
%{_bindir} /rootssh
2021-08-04 09:03:28 +00:00
%{_bindir} /rootslimtree
2020-05-12 22:21:51 +00:00
%endif
%changelog