File liborigin.spec of Package liborigin

#
# spec file for package liborigin
#
# Copyright (c) 2013 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:           liborigin
Version:        20080225
Release:        0
Summary:        A library for reading OriginLab OPJ project files
License:        GPL-2.0+
Group:          System/Libraries
Url:            http://sourceforge.net/projects/liborigin/
Source:         http://downloads.sourceforge.net/liborigin/%{name}-%{version}.tar.gz
Patch1:         liborigin-200080225-gcc.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A library for reading OriginLab OPJ project files.
Features:
* reads any worksheets with all columns
* supports 4.1, 5.0, 6.0, 6.1, 7.0, 7.5 projects

%package     -n %{name}0
Summary:        A library for reading OriginLab OPJ project files
Group:          System/Libraries

%description -n %{name}0
A library for reading OriginLab OPJ project files.
Features:
* reads any worksheets with all columns
* supports 4.1, 5.0, 6.0, 6.1, 7.0, 7.5 projects

%package        devel
Summary:        Libraries and header files for liborigin
Group:          Development/Libraries/C and C++
Requires:       %{name}0 = %{version}
Recommends:     %{name}-doc
Conflicts:      liborigin2-devel

%description    devel
This package contains libraries and header files for developing
applications that read OriginLab OPJ project files.

%package        doc
Summary:        Documentation for liborigin
Group:          Documentation/Other
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description    doc
This package provides the documentation for liborigin.

%package        tools
Summary:        Converter for OriginLab OPJ project files
Group:          Productivity/Scientific/Other
Conflicts:      liborigin2-tools

%description    tools
Converter for OriginLab OPJ project files.
Features:
* reads any worksheets with all columns
* supports 4.1, 5.0, 6.0, 6.1, 7.0, 7.5 projects

%prep
%setup -q
%patch1 -p1

%build
# fix hardcoded library path
sed -i "s|DESTINATION lib)|DESTINATION %{_lib})|" CMakeLists.txt

cmake   \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        .

make %{?_smp_mflags} VERBOSE=1

%install
make install DESTDIR=%{buildroot}

# install headers
install -d %{buildroot}%{_includedir}/%{name}/
install -m 644 OPJFile.h tree.hh %{buildroot}%{_includedir}/%{name}/

%post -n %{name}0 -p /sbin/ldconfig

%postun -n %{name}0 -p /sbin/ldconfig

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

%files devel
%defattr(-,root,root)
%{_libdir}/%{name}.so
%{_includedir}/%{name}/

%files doc
%defattr(-,root,root)
%doc COPYING FORMAT README

%files tools
%defattr(-,root,root)
%{_bindir}/opj2dat

%changelog
openSUSE Build Service is sponsored by