File kwave.spec of Package kwave
#
# spec file for package kwave
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008 Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de>.
#
# 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: kwave
Version: 0.9.0
Release: 0
License: GPL-2.0+
Summary: Sound Editor designed for KDE
Url: http://kwave.sourceforge.net/
Group: Productivity/Multimedia/Sound/Editors and Convertors
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-1.tar.bz2
Patch0: fix-memleak.patch
Patch1: cmake3.4.patch
BuildRequires: alsa-devel
BuildRequires: audiofile-devel
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: flac-devel
BuildRequires: gettext-tools
BuildRequires: id3lib-devel
BuildRequires: libkde4-devel
BuildRequires: libmad-devel
BuildRequires: libogg-devel
%if 0%{?suse_version} > 1220
BuildRequires: libopus-devel
%endif
BuildRequires: libpulse-devel
BuildRequires: libsamplerate-devel
BuildRequires: libvorbis-devel
BuildRequires: perl
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
BuildRequires: rsvg-convert
%else
BuildRequires: rsvg-view
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
Recommends: lame
Recommends: toolame
Recommends: twolame
%kde4_runtime_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Kwave is a sound editor designed for the KDE Desktop Environment.
With Kwave you can edit many sorts of wav-files including multi-channel files.
You are able to alter and play back each channel on its own. Kwave also
includes many plugins (most are still under development) to transform the
wave-file in several ways and presents a graphical view with a complete zoom-
and scroll capability.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Remove "X-SuSE-translate=true" from desktop file (will be added again using "suse_update_desktop_file") - Fixes package build error
perl -pi -e "s|X-SuSE-translate=true||" kwave/kwave.desktop.in
%build
%if 0%{?suse_version} <= 1220
%cmake_kde4 -d build -- -DWITH_OGG_OPUS=OFF -DWITH_MP3=ON
%else
%cmake_kde4 -d build -- -DWITH_MP3=ON
%endif
%make_jobs
%install
%kde4_makeinstall -C build
%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Qt KDE AudioVideo Audio Recorder AudioVideoEditing
%endif
%fdupes -s %{buildroot}
%find_lang %{name}
%kde_post_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS CHANGES GNU-LICENSE LICENSES README TODO kwave.lsm
%{_kde4_bindir}/kwave
%{_kde4_modulesdir}/plugins/kwave/
%{_kde4_libdir}/libkwave.so.*
%{_kde4_libdir}/libkwavegui.so.*
%{_kde4_applicationsdir}/kwave.desktop
%{_kde4_iconsdir}/hicolor/*/actions/kwave*.*
%{_kde4_iconsdir}/hicolor/*/apps/kwave.*
%{_kde4_appsdir}/kwave/
%if 0%{?suse_version} < 1320
%dir %{_datadir}/appdata/
%endif
%{_datadir}/appdata/kwave.appdata.xml
%changelog