File libcue.spec of Package libcue

#
# spec file for package libcue
#
# Copyright (c) 2016 SUSE LINUX 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:           libcue
%define lname	libcue2
Version:        2.1.0
Release:        0
Summary:        CUE sheet parsing library
License:        GPL-2.0
Group:          Development/Libraries/C and C++
Url:            http://sf.net/projects/libcue/

Source:         https://github.com/lipnitsk/libcue/archive/v%version.tar.gz
Patch1:         cmake.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  bison
BuildRequires:  cmake
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  pkg-config

%description
libcue parses so-called cue sheets from a char string or a FILE
pointer. This project is meant as a fork of (defunct) cuetools.

%package -n %lname
Summary:        CUE sheet parsing library
Group:          System/Libraries

%description -n %lname
libcue parses so-called cue sheets from a char string or a FILE
pointer. This project is meant as a fork of (defunct) cuetools.

%package devel
Summary:        Development files for libcue, a CUE sheet parsing library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
libcue parses so-called cue sheets from a char string or a FILE
pointer. This project is meant as a fork of (defunct) cuetools.

This package contains the development library symlink and header
files.

%prep
%setup -q
%patch -P 1 -p1

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
rm -f "%buildroot/%_libdir"/*.la

%check
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%buildroot/%_libdir"
# %%ctest macro unknown to SLE11_SP4, do it explicitly
cd build
ctest --output-on-failure --force-new-ctest-process

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libcue.so.2*

%files devel
%defattr(-,root,root)
%_includedir/libcue.h
%_includedir/libcue*/
%_libdir/libcue.so
%_libdir/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by