LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kid3.spec of Package kid3 (Project KDE:Extra)

#
# spec file for package kid3
#
# Copyright (c) 2015 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:        3.2.0
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
Source99:       kid3-rpmlintrc
BuildRequires:  flac-devel
BuildRequires:  id3lib-devel
%if 0%{?BUILD_ORIG}
BuildRequires:  libchromaprint-devel-with-ffmpeg
BuildRequires:  libffmpeg-devel
%else
BuildRequires:  libchromaprint-devel
%endif
BuildRequires:  libkde4-devel
BuildRequires:  libogg-devel
BuildRequires:  libqt4-devel >= 4.7
BuildRequires:  libtunepimp-devel
BuildRequires:  libvorbis-devel
%if 0%{?suse_version} > 1210
BuildRequires:  libxslt-tools
%endif
BuildRequires:  libtag-devel >= 1.4
BuildRequires:  readline-devel
%if 0%{?suse_version} > 1310
BuildRequires:  pkgconfig(gstreamer-1.0)
%else
BuildRequires:  pkgconfig(gstreamer-0.10)
%endif
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       %{name}-core = %{version}
Recommends:     %{name}-core-lang = %{version}
Requires:       xdg-utils
%if 0%{?suse_version} > 1210
Requires:       libxslt-tools
%endif
# kid3 and kid3-qt can exist together on a system but the user will have two packages with the same functionality.
Conflicts:      kid3-qt = %{version}
Conflicts:      kid3-qt4 = %{version}
Conflicts:      %{name}-kf5-core
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, APE, MP4/AAC, MP2, Speex,
    TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD,
    S3M, IT, XM).
  - 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 tags from the contents of tag fields
  - Generate filenames from tags
  - Generate playlist files
  - Automatic case conversion and string translation
  - Import and export album data
  - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon

This package uses KDE libraries, if you do not use KDE you should use kid3-qt.
For a commandline interface you can use kid3-cli.

%package qt
Summary:        Efficient ID3 Tag Editor
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       %{name}-core = %{version}
Recommends:     %{name}-core-lang = %{version}
# kid3 and kid3-qt can exist together on a system but the user will have two packages with the same functionality.
Conflicts:      kid3 = %{version}
Conflicts:      %{name}-kf5-core
Obsoletes:      kid3-qt < %{version}
Requires:       xdg-utils

%description qt
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, APE, MP4/AAC, MP2, Speex,
    TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD,
    S3M, IT, XM).
  - 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 tags from the contents of tag fields
  - Generate filenames from tags
  - Generate playlist files
  - Automatic case conversion and string translation
  - Import and export album data
  - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon

This package does not use KDE libraries, if you use KDE you should use kid3.
For a commandline interface you can use kid3-cli.

%package cli
Summary:        Efficient ID3 Tag Editor
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       %{name}-core = %{version}
Recommends:     %{name}-core-lang = %{version}
Conflicts:      %{name}-kf5-core

%description cli
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, APE, MP4/AAC, MP2, Speex,
    TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD,
    S3M, IT, XM).
  - 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 tags from the contents of tag fields
  - Generate filenames from tags
  - Generate playlist files
  - Automatic case conversion and string translation
  - Import and export album data
  - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon

This package contains a command line interface for Kid3, for a GUI you can
use kid3-qt or kid3.

%package doc
Summary:        Documentation for %{name}
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       %{name} = %{version}
Conflicts:      %{name}-kf5-doc

%description doc
This package provides documentation and help files for %{name}.

%package qt-doc
Summary:        Documentation for %{name}-qt
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       %{name}-qt = %{version}
Conflicts:      %{name}-kf5-qt-doc

%description qt-doc
This package provides documentation and help files for %{name}-qt.

%package  core
Summary:        Efficient ID3 Tag Editor: Libraries and Data
Group:          Productivity/Multimedia/Sound/Utilities
Conflicts:      %{name}-kf5-core
Conflicts:      %{name}-kf5-core-lang

%description  core
This package contains common libraries and data files used by kid3, kid3-qt, and kid3-cli.

%lang_package -n %{name}-core

%prep
%setup -q -n kid3-%{version}

%build
## plugin QML is set to off because build currently failes, patches are welcome.
%if 0%{?BUILD_ORIG}
%cmake_kde4 -d build -- -DWITH_CHROMAPRINT_FFMPEG:BOOL=ON -DWITH_FFMPEG:BOOL=ON -DWITH_QML:BOOL=OFF -DWITH_GSTREAMER=ON -DWITH_APPS="Qt;CLI;KDE" -DWITH_DOCDIR="share/doc/packages/kid3-qt"
%else
%cmake_kde4 -d build -- -DWITH_QML:BOOL=OFF -DWITH_GSTREAMER=ON -DWITH_APPS="Qt;CLI;KDE" -DWITH_DOCDIR="share/doc/packages/kid3-qt"
%endif
%make_jobs

%install
pushd build
%kde4_makeinstall
popd

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

pushd %{buildroot}%{_kde4_iconsdir}/hicolor/scalable/apps/
gzip -dS .svgz kid3.svgz
mv kid3 kid3.svg
popd

%kde_post_install

%find_lang %{name} %{name}-core.lang --without-kde --with-qt --all-name --without-mo

mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
cat <<EOF >%{buildroot}%{_sysconfdir}/ld.so.conf.d/kid3.conf
%{_libdir}/kid3
EOF

%post core -p /sbin/ldconfig

%postun core -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%dir %{_datadir}/appdata
%{_kde4_applicationsdir}/kid3.desktop
%{_datadir}/appdata/kid3.appdata.xml
%{_kde4_appsdir}/kid3/
%{_kde4_bindir}/kid3
%{_kde4_iconsdir}/hicolor/*/apps/kid3.*
%{_mandir}/man1/kid3.1%{ext_man}
%{_mandir}/de/man1/kid3.1%{ext_man}

%files qt
%defattr(-,root,root,-)
%dir %{_datadir}/appdata
%{_datadir}/applications/kid3-qt.desktop
%{_datadir}/appdata/kid3-qt.appdata.xml
%{_bindir}/kid3-qt
%{_kde4_iconsdir}/hicolor/*/apps/kid3-qt.*
%{_mandir}/man1/kid3-qt.1%{ext_man}
%{_mandir}/de/man1/kid3-qt.1%{ext_man}

%files cli
%defattr(-,root,root,-)
%{_bindir}/kid3-cli
%{_mandir}/man1/kid3-cli.1%{ext_man}
%{_mandir}/de/man1/kid3-cli.1%{ext_man}

%files core
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING LICENSE README kid3.lsm
%{_libdir}/kid3/
%config %{_sysconfdir}/ld.so.conf.d/kid3.conf
%{_datadir}/dbus-1/interfaces/*.xml

%files doc
%defattr(-,root,root,-)
%doc %{_kde4_htmldir}/de/kid3/
%doc %{_kde4_htmldir}/en/kid3/

%files qt-doc
%defattr(-,root,root,-)
%{_docdir}/kid3-qt/

%files -n %{name}-core-lang -f %{name}-core.lang
%defattr(-,root,root,-)
%dir %{_datadir}/kid3
%dir %{_datadir}/kid3/translations
%if 0%{?suse_version} < 1230
%{_datadir}/kid3/translations/kid3_sr@ijekavian.qm
%{_datadir}/kid3/translations/kid3_sr@ijekavianlatin.qm
%{_datadir}/kid3/translations/kid3_sr@latin.qm
%endif

%changelog