SHA256
1
0
forked from pool/apfel
apfel/apfelgui.spec.in

132 lines
4.0 KiB
RPMSpec

#
# spec file for package apfel-gui
#
# 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 bname apfel
Name: apfelgui
Version: @version@
Release: 0
Summary: A PDF Evolution Library
License: GPL-3.0+
Group: Development/Libraries/C and C++
Url: http://apfel.hepforge.org/
Source: http://apfel.hepforge.org/downloads/%{bname}-%{version}.tar.gz
BuildRequires: apfel-devel = %{version}
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: hicolor-icon-theme
BuildRequires: ImageMagick
BuildRequires: lhapdf-devel <= 5.9.1
BuildRequires: libqt4-devel
BuildRequires: libroot-core-devel
BuildRequires: libroot-graf2d-gpad-devel
BuildRequires: libroot-graf2d-graf-devel
BuildRequires: libroot-graf2d-postscript-devel
BuildRequires: libroot-graf3d-g3d-devel
BuildRequires: libroot-gui-devel
BuildRequires: libroot-hist-devel
BuildRequires: libroot-io-devel
BuildRequires: libroot-math-mathcore-devel
BuildRequires: libroot-math-matrix-devel
BuildRequires: libroot-math-physics-devel
BuildRequires: libroot-net-devel
BuildRequires: libroot-tree-devel
BuildRequires: python-apfel = %{version}
BuildRequires: python-devel
Requires: apfel-devel = %{version}
Requires: libroot-core-devel
Requires: libroot-graf2d-gpad-devel
Requires: libroot-graf2d-graf-devel
Requires: libroot-graf2d-postscript-devel
Requires: libroot-graf3d-g3d-devel
Requires: libroot-gui-devel
Requires: libroot-hist-devel
Requires: libroot-io-devel
Requires: libroot-math-mathcore-devel
Requires: libroot-math-matrix-devel
Requires: libroot-math-physics-devel
Requires: libroot-net-devel
Requires: libroot-tree-devel
Requires: python-apfel = %{version}
Requires: root-plugin-graf2d-asimage-devel
Requires: root-plugin-hist-histpainter-devel
Requires: root-ttf
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
APFEL is a library to perform the combined QCD+QED DGLAP
evolution of parton distributions. It is written and maintained
by Valerio Bertone (CERN), Stefano Carrazza (Milano) and
Juan Rojo (CERN).
This package provides the gui for apfel.
%prep
%setup -q -n %{bname}-%{version}/apfelGUI
%build
qmake
make %{?_smp_mflags}
%install
# make_install script is broken
install -D apfelgui %{buildroot}%{_bindir}/apfelgui
# Build and install hicolor icons
for i in 24 32 48 64 128 256;
do
convert -geometry ${i}x resources/logo.png %{name}-${i}.png
install -Dm0644 \
%{name}-${i}.png \
%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done
# Create and install desktop menu file
cat << EOF > %{name}.desktop
[Desktop Entry]
Encoding=UTF-8
Name=ApfelGUI
GenericName=Parton Distribution Function Evolution Utility
Comment=Plotting Parton Distributions, luminosity and DIS observables
Exec=apfelgui
Icon=apfelgui
Terminal=false
Type=Application
Categories=Graphics;2DGraphics;
EOF
install -Dm0644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%defattr(-,root,root)
%{_bindir}/apfelgui
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog