File kid3.spec of Package kid3-qt

#
# spec file for package kid3
#
# 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:           kid3
Version:        2.3
Release:        0
Summary:        Efficient ID3 Tag Editor
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Utilities
Url:            http://kid3.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0:         kid3-qt-gcc47.patch
# PATCH-FIX-UPSTREAM kid3-2.3-gstreamer1.0.diff -- enables gstreamer 1.0 support
Patch1:         kid3-2.3-gstreamer1.0.diff
BuildRequires:  flac-devel
BuildRequires:  id3lib-devel
BuildRequires:  libkde4-devel
BuildRequires:  libogg-devel
BuildRequires:  libtunepimp-devel
BuildRequires:  libvorbis-devel
BuildRequires:  taglib-devel
%if 0%{?suse_version} > 1230
BuildRequires:  libchromaprint-devel
BuildRequires:  pkgconfig(gstreamer-1.0)
%else
%if 0%{?suse_version} == 1230
BuildRequires:  libchromaprint-devel
BuildRequires:  pkgconfig(gstreamer-0.10)
%endif
%endif
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Recommends:     %{name}-lang = %{version}
# kid3 and kid3-qt can exist together on a system but the user will have two packages with the same functionality.
Provides:       kid3-qt = %{version}
Obsoletes:      kid3-qt < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires

%description
With Kid3 you can:
  * Edit ID3v1.1 tags
  * Edit all ID3v2.3 and ID3v2.4 frames
  * Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
  * Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Speex,
    TrueAudio, WavPack, WMA, WAV and AIFF files
  * Edit tags of multiple files, e.g. the artist, album, year and
    genre of all files of an album typically have the same values and can
    be set together.
  * Generate tags from filenames
  * Generate filenames from tags
  * Rename and create directories from tags
  * Generate playlist files
  * Automatically convert upper and lower case and replace strings
  * Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon
    and other sources of album data
  * Export tags as CSV, HTML, playlists, Kover XML and in other formats

%lang_package

%prep
%setup -q -n kid3-%{version}
%patch0 -p1
%if 0%{?suse_version} > 1230
%patch1 -p1
%endif

%build
%if 0%{?suse_version} < 1230
# Disable build with chromaprint that would require ffmpeg
%cmake_kde4 -d build -- -DWITH_MP4V2=OFF -DWITH_CHROMAPRINT:BOOL=OFF
%else
%cmake_kde4 -d build -- -DWITH_MP4V2=OFF -DWITH_GSTREAMER=ON
%endif
%make_jobs

%install
cd build
%kde4_makeinstall
cd ..

install -Dpm 0644 deb/kid3.1 %{buildroot}%{_mandir}/man1/kid3.1

%kde_post_install

%find_lang %{name}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog LICENSE README kid3.lsm
%{_kde4_applicationsdir}/kid3.desktop
%{_kde4_appsdir}/kid3/
%{_kde4_bindir}/kid3
%doc %{_kde4_htmldir}/en/kid3/
%{_kde4_iconsdir}/hicolor/*/apps/kid3.*
%{_datadir}/dbus-1/interfaces/net.sourceforge.Kid3.xml
%{_mandir}/man1/kid3.1%{ext_man}

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/en/kid3/

%changelog
openSUSE Build Service is sponsored by