File kid3.spec of Package kid3 (Revision 4)

Currently displaying revision 4 , Show latest

274
 
1
#
2
# spec file for package kid3
3
#
4
# Copyright (c) 2025 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
# Internal QML imports
20
%global __requires_exclude qmlimport\\(Kid3.*
21
%if 0%{?suse_version} > 1500
22
%define qt_version 6
23
%else
24
%define qt_version 5
25
%endif
26
27
Name:           kid3
28
Version:        3.9.6
29
Release:        0
30
Summary:        Efficient ID3 Tag Editor
31
License:        GPL-2.0-or-later
32
Group:          Productivity/Multimedia/Sound/Utilities
33
URL:            https://kid3.kde.org/
34
Source0:        https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz
35
Source1:        https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz.sig
36
BuildRequires:  extra-cmake-modules
37
BuildRequires:  hicolor-icon-theme
38
BuildRequires:  id3lib-devel
39
BuildRequires:  kf%{qt_version}-filesystem
40
BuildRequires:  libxslt-tools
41
BuildRequires:  python3 >= 3.6
42
BuildRequires:  readline-devel
43
BuildRequires:  update-desktop-files
44
BuildRequires:  cmake(KF%{qt_version}DocTools)
45
BuildRequires:  cmake(KF%{qt_version}KIO)
46
BuildRequires:  cmake(Qt%{qt_version}Core)
47
BuildRequires:  cmake(Qt%{qt_version}DBus)
48
BuildRequires:  cmake(Qt%{qt_version}Gui)
49
BuildRequires:  cmake(Qt%{qt_version}LinguistTools)
50
BuildRequires:  cmake(Qt%{qt_version}Multimedia)
51
BuildRequires:  cmake(Qt%{qt_version}Network)
52
BuildRequires:  cmake(Qt%{qt_version}Qml)
53
BuildRequires:  cmake(Qt%{qt_version}Quick)
54
BuildRequires:  cmake(Qt%{qt_version}Test)
55
BuildRequires:  cmake(Qt%{qt_version}UiTools)
56
BuildRequires:  cmake(Qt%{qt_version}Widgets)
57
BuildRequires:  cmake(Qt%{qt_version}Xml)
58
BuildRequires:  config(docbook-xsl-stylesheets)
59
BuildRequires:  pkgconfig(flac)
60
BuildRequires:  pkgconfig(gstreamer-1.0)
61
BuildRequires:  pkgconfig(libavcodec) >= 61
62
BuildRequires:  pkgconfig(libavformat)
63
BuildRequires:  pkgconfig(libavutil)
64
BuildRequires:  pkgconfig(libchromaprint)
65
BuildRequires:  pkgconfig(libswresample)
66
BuildRequires:  pkgconfig(ogg)
67
BuildRequires:  pkgconfig(taglib) >= 1.4
68
BuildRequires:  pkgconfig(vorbis)
69
Requires:       %{name}-core = %{version}
70
Requires:       libxslt-tools
71
Requires:       xdg-utils
72
# kid3 and kid3-qt can exist together on a system but the user will have two packages with the same functionality.
73
Conflicts:      kid3-qt = %{version}
74
75
%description
76
f you want to easily tag multiple MP3, Ogg/Vorbis, Opus, DSF, FLAC,
77
MPC, MP4/AAC, MP2, Opus, Speex, TrueAudio, WavPack and WMA files
78
(e.g. full albums) without typing the same information again and
79
again and have control over both ID3v1 and ID3v2 tags,
80
then Kid3 is the program you are looking for.
81
82
With Kid3 you can:
83
- Edit ID3v1.1 tags
84
- Edit all ID3v2.3 and ID3v2.4 frames
85
- Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
86
- Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Speex,
87
  TrueAudio, WavPack, WMA, AIFF and WAV files
88
- Edit tags of multiple files, e.g. the artist, album, year and
89
  genre of all files of an album typically have the same values
90
  and can be set together.
91
- Generate tags from filenames
92
- Generate tags from the contents of tag fields
93
- Generate filenames from tags
94
- Rename and create directories from tags
95
- Generate playlist files
96
- Automatically convert upper and lower case and replace strings
97
- Import from freedb2.org, MusicBrainz, Discogs, Amazon and other
98
  sources of album data
99
- Export tags as CSV, HTML, playlists, Kover XML and in other formats
100
- Edit synchronized lyrics and event timing codes,import and export LRC files
101
102
This package uses KDE libraries, if you do not use KDE you should use kid3-qt.
103
For a commandline interface you can use kid3-cli.
104
105
%package qt
106
Summary:        Efficient ID3 Tag Editor
107
Group:          Productivity/Multimedia/Sound/Utilities
108
Requires:       %{name}-core = %{version}
109
Requires:       xdg-utils
110
# kid3 and kid3-qt can exist together on a system but the user will have two packages with the same functionality.
111
Conflicts:      kid3 = %{version}
112
Obsoletes:      kid3-qt < %{version}
113
114
%description qt
115
With Kid3 you can:
116
  - Edit ID3v1.1 tags
117
  - Edit all ID3v2.3 and ID3v2.4 frames
118
  - Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
119
  - Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, APE, MP4/AAC, MP2, Speex,
120
    TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD,
121
    S3M, IT, XM).
122
  - Edit tags of multiple files, e.g. the artist, album, year and genre
123
    of all files of an album typically have the same values and can be
124
    set together.
125
  - Generate tags from filenames
126
  - Generate tags from the contents of tag fields
127
  - Generate filenames from tags
128
  - Generate playlist files
129
  - Automatic case conversion and string translation
130
  - Import and export album data
131
  - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon
132
133
This package does not use KDE libraries, if you use KDE you should use kid3.
134
For a commandline interface you can use kid3-cli.
135
136
%package cli
137
Summary:        Efficient ID3 Tag Editor
138
Group:          Productivity/Multimedia/Sound/Utilities
139
Requires:       %{name}-core = %{version}
140
141
%description cli
142
With Kid3 you can:
143
  - Edit ID3v1.1 tags
144
  - Edit all ID3v2.3 and ID3v2.4 frames
145
  - Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
146
  - Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, APE, MP4/AAC, MP2, Speex,
147
    TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD,
148
    S3M, IT, XM).
149
  - Edit tags of multiple files, e.g. the artist, album, year and genre
150
    of all files of an album typically have the same values and can be
151
    set together.
152
  - Generate tags from filenames
153
  - Generate tags from the contents of tag fields
154
  - Generate filenames from tags
155
  - Generate playlist files
156
  - Automatic case conversion and string translation
157
  - Import and export album data
158
  - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon
159
160
This package contains a command line interface for Kid3, for a GUI you can
161
use kid3-qt or kid3.
162
163
%package doc
164
Summary:        Documentation for %{name}
165
Group:          Productivity/Multimedia/Sound/Utilities
166
Requires:       %{name} = %{version}
167
168
%description doc
169
This package provides documentation and help files for %{name}.
170
171
%package qt-doc
172
Summary:        Documentation for %{name}-qt
173
Group:          Productivity/Multimedia/Sound/Utilities
174
Requires:       %{name}-qt = %{version}
175
176
%description qt-doc
177
This package provides documentation and help files for %{name}-qt.
178
179
%package  core
180
Summary:        Efficient ID3 Tag Editor: Libraries and Data
181
Group:          Productivity/Multimedia/Sound/Utilities
182
Recommends:     kid3-trans-lang = %{version}
183
184
%description  core
185
This package contains common libraries and data files used by kid3, kid3-qt, and kid3-cli.
186
187
%lang_package -n %{name}-core
188
189
%prep
190
%autosetup -p1
191
192
%build
193
export LC_ALL=en_US.UTF-8
194
options+="-DWITH_LIBDIR=%{_lib}/kid3 -DWITH_PLUGINSDIR=%{_lib}/kid3/plugins "
195
options+="-DWITH_CHROMAPRINT_FFMPEG=ON -DWITH_FFMPEG=ON -DWITH_GSTREAMER=ON "
196
options+="-DWITH_DOCDIR=share/doc/packages/kid3-qt "
197
options+="-DCMAKE_SKIP_RPATH=ON -DWITH_QMLDIR=%{_lib}/qt%{qt_version}/qml/kid3 "
198
%if %{qt_version} == 6
199
%{cmake_kf6} -DBUILD_WITH_QT6=ON $options
200
%{kf6_build}
201
%else
202
%cmake_kf5 -d build -- $options
203
%make_jobs
204
%endif
205
206
%install
207
%if %{qt_version} == 6
208
%{kf6_install}
209
%else
210
%kf5_makeinstall -C build
211
%endif
212
213
pushd %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
214
gzip -dS .svgz kid3.svgz
215
mv kid3 kid3.svg
216
popd
217
218
chmod 644 %{buildroot}%{_kf5_applicationsdir}/org.kde.kid3.desktop
219
220
%find_lang %{name} %{name}-core.lang --without-kde --with-qt --all-name --without-mo
221
222
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
223
cat <<EOF >%{buildroot}%{_sysconfdir}/ld.so.conf.d/kid3.conf
224
%{_libdir}/kid3
225
EOF
226
227
%post core -p /sbin/ldconfig
228
229
%postun core -p /sbin/ldconfig
230
231
%files
232
%dir %{_datadir}/metainfo
233
%{expand:%{_kf%{qt_version}_bindir}}/kid3
234
%{expand:%{_kf%{qt_version}_iconsdir}}/hicolor/*/apps/kid3.*
235
%{expand:%{_kf%{qt_version}_kxmlguidir}}/kid3/
236
%{expand:%{_kf%{qt_version}_applicationsdir}}/org.kde.kid3.desktop
237
%{expand:%{_kf%{qt_version}_appstreamdir}}/org.kde.kid3.appdata.xml
238
239
%files qt
240
%dir %{_datadir}/metainfo
241
%{_datadir}/applications/org.kde.kid3-qt.desktop
242
%{_datadir}/metainfo/org.kde.kid3-qt.appdata.xml
243
%{_bindir}/kid3-qt
244
%{_datadir}/icons/hicolor/*/apps/kid3-qt.*
245
%{_mandir}/man1/kid3-qt.1%{ext_man}
246
%{_mandir}/*/man1/kid3-qt.1%{ext_man}
247
248
%files cli
249
%{_bindir}/kid3-cli
250
%{_mandir}/man1/kid3-cli.1%{ext_man}
251
%{_mandir}/*/man1/kid3-cli.1%{ext_man}
252
253
%files core
254
%doc AUTHORS ChangeLog README
255
%license COPYING LICENSE
256
%{_libdir}/kid3/
257
%{_libdir}/qt%{qt_version}/qml/kid3/
258
%config %{_sysconfdir}/ld.so.conf.d/kid3.conf
259
%{_datadir}/dbus-1/interfaces/org.kde.Kid3.xml
260
%{_mandir}/man1/kid3.1%{ext_man}
261
%{_mandir}/*/man1/kid3.1%{ext_man}
262
263
%files doc
264
%doc %{expand:%{_kf%{qt_version}_htmldir}}/*/kid3/
265
266
%files qt-doc
267
%{_docdir}/kid3-qt/
268
269
%files -n %{name}-core-lang -f %{name}-core.lang
270
%dir %{_datadir}/kid3
271
%dir %{_datadir}/kid3/translations
272
273
%changelog
274