File gretl.spec of Package gretl
#
# spec file for package gretl
#
# Copyright (c) 2012, Efstathios Agrapidis (stathisagrapidis@gmail.com)
#
# 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/
#
# norootforbuild
Name: gretl
Version: 2021d
Release: 0
License: GPL-3.0
Summary: GNU regression, econometrics and time-series library
Url: http://gretl.sourceforge.net/
Group: Productivity/Office/Finance
Source: %{name}-%{version}.tar.xz
# Documented build requirements
BuildRequires: gtksourceview-devel
BuildRequires: libxml2-devel
BuildRequires: lapack
BuildRequires: fftw3-devel
BuildRequires: gnuplot
BuildRequires: gmp-devel
BuildRequires: libcurl-devel
BuildRequires: json-glib-devel
# Documented optional build requirements
BuildRequires: mpfr-devel
BuildRequires: readline-devel
# Extra build requirements for openSUSE
BuildRequires: pkg-config
BuildRequires: glib2-devel
BuildRequires: gcc-fortran
BuildRequires: R-base-devel
# Documentation build (optional)
BuildRequires: texlive-latex libxslt-devel
BuildRequires: update-desktop-files
BuildRequires: fdupes
# Documented runtime requirements
Requires: lapack fftw3 gnuplot
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Gretl (GNU regression, econometrics and time-series library) comprises
libgretl, a shared library which provides various functions relating to
econometric estimation, a command-line client program and a gui client,
using GTK+.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
%description devel
This package contains the development files for %{name}.
%prep
%setup -q
%build
%configure --disable-static
CFLAGS=$RPM_OPT_FLAGS
export CFLAGS
%make_build
%install
%make_install
%fdupes -s %{buildroot}
%find_lang %name
%suse_update_desktop_file -u -r -G 'Regression, econometrics and time-series suite' %{name} Education Science
sed -i s/[/]usr[/]share[/]pixmaps[/]gretl[.]xpm/gretl.xpm/ %{buildroot}/usr/share/applications/gretl.desktop
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%post devel
/sbin/ldconfig
%postun devel
/sbin/ldconfig
%files -f %name.lang
%defattr(-,root,root)
%doc ChangeLog CompatLog README README.audio
%{_bindir}/gretl*
%{_libdir}/%{name}-gtk3
%{_datadir}/%{name}
%{_datadir}/gtksourceview-3.0/language-specs/*.lang
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/mimetypes/application-gretl*.png
%{_datadir}/icons/hicolor/32x32/mimetypes/text-gretl*.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
%{_mandir}/man1/*.gz
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/gretl.pc
%{_libdir}/libgretl*.so*
%{_includedir}/%{name}/
%changelog