Name: pythia8
Version: 8.2.15
Release: 2%{?dist}
Summary: Pythia Event Generator for High Energy Physics
Group: System Environment/Libraries
License: GPLv2
URL: http://home.thep.lu.se/~torbjorn/Pythia.html
Source0: http://home.thep.lu.se/~torbjorn/pythia8/pythia8215.tgz
# Link plugins to the shared library
# Remove rpath
# Work around broken -x c++ -c with old g++ versions
Patch0: %{name}-makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: lhapdf-devel
BuildRequires: zlib-devel
BuildRequires: gcc-gfortran
BuildRequires: rsync
BuildRequires: dos2unix
Requires: %{name}-data = %{version}-%{release}
Obsoletes: %{name}-hepmcinterface < 8.2
%description
PYTHIA is a program for the generation of high-energy physics events, i.e.
for the description of collisions at high energies between elementary
particles such as e⁺, e⁻, p and p̄ in various combinations. It contains
theory and models for a number of physics aspects, including hard and soft
interactions, parton distributions, initial and final-state parton showers,
multiple interactions, fragmentation and decay.
%package devel
Summary: Pythia 8 Development Files
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-hepmcinterface-devel < 8.2
%description devel
This package provides development files for Pythia 8.
%package lhapdf
Summary: Pythia 8 LHAPDF Interface
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description lhapdf
This package provides the LHAPDF interface for Pythia 8.
%package data
Summary: Pythia 8 Data Files
Group: Applications/Engineering
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch: noarch
%endif
%description data
This package provides XML data files for Pythia 8.
%package examples
Summary: Pythia 8 Example Source Files
Group: Documentation
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch: noarch
%endif
%description examples
This package provides example source files for Pythia 8.
%package doc
Summary: Pythia 8 Documentation
Group: Documentation
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch: noarch
%endif
%description doc
This package provides documentation for Pythia 8.
%prep
%setup -q -n pythia8215
%patch0 -p1
# Remove DOS end-of-line
dos2unix -k share/Pythia8/htmldoc/pythia.css \
share/Pythia8/phpdoc/pythia.css \
share/Pythia8/xmldoc/mrstlostarstar.00.dat
%build
./configure --prefix=%{_prefix} --prefix-lib=%{_libdir} \
--cxx-common="%{optflags} -fPIC" \
--cxx-shared="%{?__global_ldflags} -Wl,-z,defs -shared" \
--lib-suffix=".so.%{version}" \
--enable-shared --with-lhapdf5 --with-gzip
make %{?_smp_mflags} BOOST_INCLUDE=/dummy-path
%install
rm -rf %{buildroot}
make %{?_smp_mflags} install \
PREFIX_BIN=%{buildroot}%{_bindir} \
PREFIX_INCLUDE=%{buildroot}%{_includedir} \
PREFIX_LIB=%{buildroot}%{_libdir} \
PREFIX_SHARE=%{buildroot}%{_datadir}/Pythia8
ln -s libpythia8.so.%{version} %{buildroot}%{_libdir}/libpythia8.so
rm %{buildroot}%{_bindir}/pythia8-config
rm %{buildroot}%{_libdir}/libpythia8.a
rm -rf %{buildroot}%{_datadir}/Pythia8/htmldoc
rm -rf %{buildroot}%{_datadir}/Pythia8/pdfdoc
rm -rf %{buildroot}%{_datadir}/Pythia8/phpdoc
rm %{buildroot}%{_datadir}/Pythia8/AUTHORS
rm %{buildroot}%{_datadir}/Pythia8/COPYING
rm %{buildroot}%{_datadir}/Pythia8/GUIDELINES
rm %{buildroot}%{_datadir}/Pythia8/README
rm %{buildroot}%{_datadir}/Pythia8/examples/Makefile
rm %{buildroot}%{_datadir}/Pythia8/examples/Makefile.inc
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post lhapdf -p /sbin/ldconfig
%postun lhapdf -p /sbin/ldconfig
%{!?_licensedir: %global license %%doc}
%files
%{_libdir}/libpythia8.so.*
%doc AUTHORS GUIDELINES
%license COPYING
%files devel
%{_libdir}/libpythia8.so
%{_includedir}/Pythia8
%{_includedir}/Pythia8Plugins
%doc CODINGSTYLE
%files lhapdf
%{_libdir}/libpythia8lhapdf5.so
%files data
%dir %{_datadir}/Pythia8
%{_datadir}/Pythia8/xmldoc
%license COPYING
%files examples
%dir %{_datadir}/Pythia8
%doc %{_datadir}/Pythia8/examples
%doc %{_datadir}/Pythia8/outref
%license COPYING
%files doc
%doc share/Pythia8/htmldoc
%doc share/Pythia8/pdfdoc
%license COPYING
%changelog
* Fri Apr 15 2016 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.2.15-2
- Add missing obsoletes
* Thu Apr 07 2016 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.2.15-1
- Update to version 8.2.15
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 8.1.86-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.86-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 8.1.86-3
- Rebuilt for GCC 5 C++11 ABI change
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.86-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jul 18 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.86-1
- Update to version 8.1.86
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.80-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Oct 30 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.80-1
- Update to version 8.1.80
- Use full version in soname
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.76-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri May 31 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.76-3
- Remove DOS end-of-line
* Thu May 23 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.76-2
- Fix race condition in Makefile
- Add isa to dependencies
* Sat May 18 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.76-1
- New upstream release
* Wed Nov 14 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 8.1.70-1
- Initial build