File Herwig++.spec of Package Herwig++

#
# spec file for package Herwig++
#
# Copyright (c) 2014 SUSE LINUX Products 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 so_name libHerWig++

Name:           Herwig++
Version:        2.7.1
Release:        0
Summary:        A particle physics event generator, written in C++
License:        GPL-2.0
Group:          Development/Libraries/C and C++
Url:            http://herwig.hepforge.org/
Source:         http://www.hepforge.org/archive/herwig/%{name}-%{version}.tar.bz2
Patch1:         Herwig++-ThePEG-lib64.patch
BuildRequires:  HepMC-devel
BuildRequires:  LHAPDF-devel
BuildRequires:  Rivet-devel
BuildRequires:  ThePEG-devel >= 1.9.2
# automake, autoconf and libtool BuildRequires introduced due to Patch0.
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  boost-devel
BuildRequires:  fastjet-devel
BuildRequires:  fastjet-plugin-siscone-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  python-devel
BuildRequires:  pkgconfig(gsl)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Herwig++ is a particle physics event generator, written in C++. It is
built on the experience gained with the well-known event generator
HERWIG. The aim is to provide a multi purpose event generator with
similar or improved capabilities (like angular ordered parton
evolution and the cluster hadronization model). The ongoing
development of the Fortran version has terminated and Herwig++
replaces it.

Herwig++ is based on ThePEG.

%package -n %{so_name}
Summary:        A particle physics event generator, written in C++
Group:          Development/Libraries/C and C++

%description -n %{so_name}
Herwig++ is a particle physics event generator, written in C++. It is
built on the experience gained with the well-known event generator
HERWIG. The aim is to provide a multi purpose event generator with
similar or improved capabilities (like angular ordered parton
evolution and the cluster hadronization model). The ongoing
development of the Fortran version has terminated and Herwig++
replaces it.

This package provides the shared libraries for %{name}.

%package devel
Summary:        A particle physics event generator, written in C++
Group:          Development/Libraries/C and C++
Requires:       %{so_name} = %{version}
Requires:       ThePEG-devel

%description devel
Herwig++ is a particle physics event generator, written in C++. It is
built on the experience gained with the well-known event generator
HERWIG. The aim is to provide a multi purpose event generator with
similar or improved capabilities (like angular ordered parton
evolution and the cluster hadronization model). The ongoing
development of the Fortran version has terminated and Herwig++
replaces it.

This package provides the header and source libraries for development
with %{name}.

%prep
%setup -q
%patch1 -p1

%build
autoreconf -i
%configure --disable-static
make %{?_smp_mflags}

%install
%make_install

mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d
echo %{_libdir}/%{name} > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{name}.conf

find %{buildroot}%{_libdir}/%{name} -name "*.la" -delete

# Remove traces of BUILDROOT from files
sed -i "s|%{buildroot}||" %{buildroot}%{_datadir}/%{name}/defaults/PDF.in

%fdupes -s %{buildroot}%{_libdir}/%{name}/

# REMOVE UNNECESSARY BACKUP FILE
rm %{buildroot}/%{_libdir}/Herwig++/python/ufo2peg/helpers.py.orig

%post -n %{so_name}
/sbin/ldconfig

%postun -n %{so_name}
/sbin/ldconfig

%files -n %{so_name}
%defattr(-,root,root)
%doc AUTHORS GUIDELINES ChangeLog README COPYING
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so.*
%config %{_sysconfdir}/ld.so.conf.d/%{name}.conf

%files devel
%defattr(-,root,root)
%{_bindir}/Herwig++
%{_bindir}/herwig-config
%{_bindir}/ufo2herwig
%{_bindir}/slha2herwig
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so
%{_libdir}/%{name}/python/
%{_includedir}/%{name}/
%{_datadir}/%{name}/

%changelog
openSUSE Build Service is sponsored by