File flake.spec of Package flake

#
# spec file for package flake
#
# Copyright (c) 2018 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:           flake
Version:        0.11_svn264
Release:        0
Summary:        An open-source FLAC audio encoder
License:        LGPL-2.1
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Url:            http://%{name}-enc.sourceforge.net/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake

%define soname 0

%package -n lib%{name}%{soname}
Summary:        C library for FLAC audio encoding
Group:          System/Libraries

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{soname} = %{version}

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/Man
BuildArch:      noarch
Requires:       %{name} = %{version}

%description
The purpose of Flake is to be an alternative to the FLAC reference encoder with the goal of increasing encoding speed and implementing experimental features.

%description -n lib%{name}%{soname}
The %{name} library package contains libraries for applications that use %{name}.

%description devel
The %{name}-devel package contains libraries and header files for developing applications that use %{name}.

%description doc
This package contains the documentation for %{name}.

%prep
%setup -q

%build
%cmake -DSHARED:BOOL=ON
%{__make} %{?_smp_mflags}
%{__strip} -s %{name}
%{__strip} -s wavinfo

%install
%if "%{?_lib}" == "lib64"
%{__sed} -i 's#\${CMAKE_INSTALL_PREFIX}/lib#\${CMAKE_INSTALL_PREFIX}/%{_lib}#g' build/cmake_install.cmake
%endif
%cmake_install

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

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

%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{name}
%attr(755,root,root) %{_bindir}/wavinfo

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

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

%files doc
%defattr(-,root,root,-)
%doc Changelog README TODO doc/
%license COPYING

%changelog
openSUSE Build Service is sponsored by