A new user interface for you! Read more...

File root.spec of Package root

#
# spec file for package root
#
# Copyright (c) 2015 SUSE LINUX 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/
#


%define series 6

Name:           root
Version:        6.04.06
Release:        0
Summary:        Numerical data analysis framework (OO)
License:        GPL-2.0
Group:          Productivity/Scientific/Physics
Url:            http://root.cern.ch
Source:         https://root.cern.ch/download/root_v%{version}.source.tar.gz
BuildRequires:  Mesa-devel
BuildRequires:  cfitsio-devel
BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes chrpath
BuildRequires:  fftw3-devel
BuildRequires:  freetype2-devel
%if !0%{?sles_version}
BuildRequires:  freetype-devel
%endif
BuildRequires:  ftgl-devel
BuildRequires:  gawk
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  giflib-devel
BuildRequires:  glew-devel
BuildRequires:  graphviz-devel
BuildRequires:  gsl-devel
BuildRequires:  hdf5-devel
BuildRequires:  libexpat-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libmysqlclient-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel >= 4.3.0
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  openldap2-devel
BuildRequires:  openssl-devel
BuildRequires:  pcre-devel
BuildRequires:  postgresql-devel
BuildRequires:  python3-devel
BuildRequires:  ruby-devel >= 1.8
BuildRequires:  sqlite3-devel
BuildRequires:  unixODBC-devel >= 2.2.11
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-libICE-devel
BuildRequires:  xorg-x11-libSM-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXext-devel
BuildRequires:  xrootd-cl-devel
BuildRequires:  xrootd-client-devel
BuildRequires:  xrootd-private-devel
BuildRequires:  xz-devel
BuildRequires:  zlib-devel
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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 devel
Summary:        Development files for %{name}
Group:          Productivity/Scientific/Physics

%description devel
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.

This package provides the files necessary for programming with
Root.

%package tutorials
Summary:        A set of tutorials for %{name}
Group:          Productivity/Scientific/Physics
Requires:       %{name}-devel

%description tutorials
This package provides a set of tutorials for Root.

%package test
Summary:        Tests for %{name}
Group:          Productivity/Scientific/Physics
Requires:       %{name}-devel

%description test
This package provides a set of tests for Root.



%prep
%setup -q

%build
%define defdocdir share/doc/packages/%{name}
mkdir builddir && pushd builddir
cmake \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DCMAKE_INSTALL_BINDIR=bin \
      -DCMAKE_INSTALL_LIBDIR=%{_lib}/%{name} \
      -DCMAKE_INSTALL_INCLUDEDIR=include/%{name} \
      -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}/%{name} \
      -DCMAKE_INSTALL_DATAROOTDIR=share \
      -DCMAKE_INSTALL_DATADIR=share/%{name} \
      -DCMAKE_INSTALL_DOCDIR=%{defdocdir} \
      -DCMAKE_INSTALL_MANDIR=%{_mandir} \
      -DCMAKE_INSTALL_FONTDIR=share/fonts \
      -DCMAKE_INSTALL_MACRODIR=share/%{name}/macros \
      -DCMAKE_INSTALL_TESTDIR=%{defdocdir}/test \
      -DCMAKE_INSTALL_TUTDIR=%{defdocdir}/tutorials \
      -DCMAKE_INSTALL_ICONDIR=share/%{name}/icons \
      -DCMAKE_INSTALL_CMAKEDIR=share/cmake \
      -Dminuit2=ON \
      -Droofit=ON \
      -Dsoversion=ON \
      ..

make %{?_smp_mflags}
popd

%install
pushd builddir
make install DESTDIR=%{buildroot}
popd

# REMOVE STATIC LIBS
rm %{buildroot}%{_libdir}/root/*.a

# REMOVE FONTS
rm -fr %{buildroot}%{_datadir}/fonts

# MOVE ACLOCAL TO CORRECT LOCATION
mkdir -p %{buildroot}%{_datadir}/aclocal
mv %{buildroot}%{_prefix}/aclocal/%{name}.m4 %{buildroot}%{_datadir}/aclocal/

# REMOVE SOME UNNECESSARY FILES
rm %{buildroot}%{_prefix}/config/Makefile.*
rm -fr %{buildroot}%{_prefix}/emacs/*

# REMOVE RPATHS
# chrpath --delete %{buildroot}/%{_bindir}/root-config

# REMOVE TRACES OF BUILDROOT
for i in cppyy ROOT
do
  sed -i "s|%{buildroot}||g" %{buildroot}/%{_libdir}/root/${i}.pyo
  sed -i "s|%{buildroot}||g" %{buildroot}/%{_libdir}/root/${i}.pyc
done

# REGISTER NON-STD LOCATION OF LIBS AT /etc/ld.so.conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/root" > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/root.conf

%fdupes %{_docdir}/%{name}/test/

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/%{name}/
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/LICENSE
%{_docdir}/%{name}/README/
%{_datadir}/cmake/*.cmake
%{_datadir}/cmake/modules/
%{_datadir}/aclocal/*.m4
%{_includedir}/%{name}/
%{_libdir}/%{name}/
%{_mandir}/man1/*.gz
#%{_prefix}/emacs/site-lisp/root-help.el
%config %{_sysconfdir}/%{name}/
%config %{_sysconfdir}/ld.so.conf.d/root.conf

%files tutorials
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/tutorials/

%files test
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/test/

%changelog