File fityk.spec of Package fityk

#
# spec file for package fityk
#
# 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/
#


Name:           fityk
Version:        1.2.1
Release:        0
%define somajor 4
Summary:        Non-linear curve fitting and data analysis
License:        GPL-2.0+
Group:          Applications/Engineering
Url:            http://fityk.nieto.pl/
Source:         https://github.com/wojdyr/fityk/releases/download/v%{version}/fityk-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE fityk-no-compilation-date.patch -- fix rpmlint warning "file-contains-current-date"
Patch1:         fityk-no-compilation-date.patch
BuildRequires:  boost-devel >= 1.35
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  libpng
BuildRequires:  lua-devel >= 5.1
BuildRequires:  ncurses-devel
BuildRequires:  readline-devel
%if 0%{?suse_version} >= 1320
BuildRequires:  wxWidgets-devel >= 3
%else
BuildRequires:  wxWidgets-devel >= 2.9.4
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
BuildRequires:  xylib-devel >= 1.0
BuildRequires:  zlib
Requires:       gnuplot
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Fityk is a program for nonlinear curve-fitting of analytical
functions (especially peak-shaped) to data (usually experimental
data). It can also be used for visualization of x-y data only.

%package -n     lib%{name}%{somajor}
Summary:        Library for non-linear curve fitting and data analysis
Group:          System/Libraries

%description -n lib%{name}%{somajor}
Fityk is a program for nonlinear curve-fitting of analytical
functions (especially peak-shaped) to data (usually experimental
data). It can also be used for visualization of x-y data only.

%package        devel
Summary:        Header files, libraries and development documentation for %{name}
Group:          Development/Libraries
Requires:       lib%{name}%{somajor} = %{version}

%description    devel
This package contains the header files, static libraries and development
documentation for %{name}. If you like to develop programs that make
use of %{name}, you will need to install %{name}-devel.

%prep
%setup -q
%patch1 -p1

%build
%configure --disable-xyconvert

make %{?_smp_mflags}

%install
%make_install
rm %{buildroot}/%{_libdir}/*.la

%post -n lib%{name}%{somajor}
/sbin/ldconfig

%postun -n lib%{name}%{somajor}
/sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING NEWS README TODO
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/samples
%{_bindir}/*fityk
%{_datadir}/%{name}/html/
%{_datadir}/%{name}/samples/README
%{_datadir}/%{name}/samples/*.dat
%{_datadir}/%{name}/samples/*.fit
%{_datadir}/%{name}/samples/hello.lua
%{_datadir}/applications/*.desktop
%{_mandir}/man1/%{name}.*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*

%files -n lib%{name}%{somajor}
%defattr(-,root,root)
%{_libdir}/lib%{name}.so.%{somajor}*

%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_datadir}/%{name}/samples/hello.c
%{_datadir}/%{name}/samples/hello.cc
# just as curiosity samples in other languages
%{_datadir}/%{name}/samples/hello.java
%{_datadir}/%{name}/samples/hello.pl
%{_datadir}/%{name}/samples/hello.rb
# -> fityk-python
%{_datadir}/%{name}/samples/*.py*

%changelog
openSUSE Build Service is sponsored by