File dsf2flac.spec of Package dsf2flac
#
# spec file for package dsf2flac
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: dsf2flac
Version: 0.1rev55
Release: 0
Summary: A DSF to FLAC converter
License: GPL-2.0-only
Group: Productivity/Multimedia/Sound/Editors and Convertors
URL: https://code.google.com/p/%{name}
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-cmake.patch
ExclusiveArch: i586 x86_64
%if 0%{?suse_version} && 0%{?suse_version} > 1320
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: (libboost_system-devel if libboost_filesystem-devel < 1.89.0)
BuildRequires: libboost_timer-devel
%else
BuildRequires: boost-devel
%endif
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: flac-devel
BuildRequires: gcc-c++
BuildRequires: id3lib-devel
BuildRequires: libogg-devel
BuildRequires: zlib-devel
%description
dsf2flac is a file conversion tool for translating dsf or dff dsd audio files into flac pcm audio files.
%package doc
Summary: Documentation for %{name}
Group: Documentation/Man
BuildArch: noarch
Requires: %{name} = %{version}
%description doc
This package contains the documentation for %{name}.
%prep
%setup -q
%patch -P 0
%{__rm} doc/html/installdox
%build
%ifarch %ix86
CFLAGS="${CXXFLAGS} -msse2"
export CFLAGS
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1300
%{__mkdir_p} build
cd build
cmake ..
%else
%cmake
%endif
%{__make} %{?_smp_mflags}
%{__strip} -s %{name}
%install
%{__mkdir_p} %{buildroot}%{_defaultdocdir}/%{name}
%{__install} -D -m 0755 -p build/%{name} %{buildroot}/%{_bindir}/%{name}
%{__install} -m 0644 -p -t %{buildroot}%{_defaultdocdir}/%{name} %{_builddir}/%{name}-%{version}/README.txt
%{__cp} -a %{_builddir}/%{name}-%{version}/doc %{buildroot}%{_defaultdocdir}/%{name}/
%fdupes %{buildroot}%{_defaultdocdir}/%{name}/doc/html/search
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{name}
%files doc
%defattr(-,root,root,-)
%{_defaultdocdir}/%{name}/
%changelog