SHA256
1
0
forked from pool/picard
picard/picard.spec

128 lines
4.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package picard
#
# Copyright (c) 2015 SUSE LINUX 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: picard
Version: 1.3.2
Release: 0
Summary: The Next Generation MusicBrainz Tagger
License: GPL-2.0+
Group: Productivity/Multimedia/Sound/Utilities
Url: http://musicbrainz.org/doc/PicardTagger
Accepting request 76928 from home:olh:branches:multimedia:apps - Update name of dlopen libdiscid object during build - Update additional python plugins to report compatibility for 0.15 - Run dos2unix on additional python plugins - Update to version 0.15 - 2011-07-17 - Added options for using standardized track, release, and artist metadata. - Added preferred release format support. - Expanded preferred release country support to allow multiple countries. - Added support for tagging non-album tracks (standalone recordings). - Plugins can now be installed via drag and drop, or a file browser. - Added several new tags: %%_originaldate%%, %%_recordingcomment%%, and %%_releasecomment%% - Changes to request queuing: added separate high and low priority queues for each host. - Tagger scripts now run after metadata plugins finish (#5850) - The "compilation" tag can now be $unset or modified via tagger script. - Added a shortcut (Ctrl+I) for Edit->Details. - Miscellaneous bug fixes. - Support for the NGS web service Version 0.14 - 2011-05-15 - Fixed a problem with network operations hanging after a network error (#5794, #5884) - ID3v2.3 with UTF-16 is now the default ID3 version - Option to set preferred release types for improved album matching - Added support for sorting the album/file lists (#75) - Fixed OptimFROG tag reading (#5859) - Fixed colors for a white-on-black color scheme (#5846) - Added an option to replace non-ASCII punctuation (#5834) - Support for writing release group and work IDs, currently unused (#5805) - Fixed saving of the release event format tag (#5250) OBS-URL: https://build.opensuse.org/request/show/76928 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=14
2011-07-25 12:17:02 +02:00
Source0: http://ftp.musicbrainz.org/pub/musicbrainz/picard/%{name}-%{version}.tar.gz
# http://wiki.musicbrainz.org/Picard_Plugins
Source2: http://dispuutivv.nl/~jan/bonusdisc.py
Source8: http://users.musicbrainz.org/~brianfreud/SearchAmazon3.py
Source9: http://users.musicbrainz.org/~brianfreud/SearchAMG.py
Source10: http://users.musicbrainz.org/~brianfreud/SearchCastAlbums3.py
Source11: http://users.musicbrainz.org/~brianfreud/SearchDiscogs3.py
Source12: http://users.musicbrainz.org/~brianfreud/SearchFilmMusziek3.py
Source13: http://users.musicbrainz.org/~brianfreud/SearchGMR.py
Source14: http://users.musicbrainz.org/~brianfreud/SearchGoogle3.py
Source15: http://users.musicbrainz.org/~brianfreud/SearchLortelArchives3.py
Source16: http://users.musicbrainz.org/~brianfreud/SearchSoundtrackCollector3.py
Source17: http://users.musicbrainz.org/~brianfreud/SearchSoundtrackINFO3.py
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: libdiscid-devel
BuildRequires: libofa-devel
BuildRequires: python-devel
BuildRequires: python-mutagen
Requires: python-mutagen
BuildRequires: hicolor-icon-theme
BuildRequires: python-qt4
BuildRequires: update-desktop-files
Requires: python-qt4
Recommends: chromaprint-fpcalc
%description
MusicBrainz Picard is a cross-platform MusicBrainz tag editor written in
Python. Picard Tagger is intended to be the next generation of tagger for
MusicBrainz, with a focus on album oriented tagging as opposed to track based
tagging and cross platform compatibility.
%lang_package
%prep
%setup -q -n %{name}-release-%{version}
%build
export CFLAGS="%{optflags}"
Accepting request 76928 from home:olh:branches:multimedia:apps - Update name of dlopen libdiscid object during build - Update additional python plugins to report compatibility for 0.15 - Run dos2unix on additional python plugins - Update to version 0.15 - 2011-07-17 - Added options for using standardized track, release, and artist metadata. - Added preferred release format support. - Expanded preferred release country support to allow multiple countries. - Added support for tagging non-album tracks (standalone recordings). - Plugins can now be installed via drag and drop, or a file browser. - Added several new tags: %%_originaldate%%, %%_recordingcomment%%, and %%_releasecomment%% - Changes to request queuing: added separate high and low priority queues for each host. - Tagger scripts now run after metadata plugins finish (#5850) - The "compilation" tag can now be $unset or modified via tagger script. - Added a shortcut (Ctrl+I) for Edit->Details. - Miscellaneous bug fixes. - Support for the NGS web service Version 0.14 - 2011-05-15 - Fixed a problem with network operations hanging after a network error (#5794, #5884) - ID3v2.3 with UTF-16 is now the default ID3 version - Option to set preferred release types for improved album matching - Added support for sorting the album/file lists (#75) - Fixed OptimFROG tag reading (#5859) - Fixed colors for a white-on-black color scheme (#5846) - Added an option to replace non-ASCII punctuation (#5834) - Support for writing release group and work IDs, currently unused (#5805) - Fixed saving of the release event format tag (#5250) OBS-URL: https://build.opensuse.org/request/show/76928 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=14
2011-07-25 12:17:02 +02:00
cat > %{name}_libdiscid_dummy.c <<-EOF
#include <stdio.h>
#include <discid/discid.h>
int main(void) {
printf("Dummy to generate correct libdiscid.so rpm dependency.\n");
discid_free(discid_new());
return 0;
}
EOF
gcc -Wall -s $CFLAGS -o %{name}_libdiscid_dummy %{name}_libdiscid_dummy.c -ldiscid
# there is some upstream confusion about what the SONAME of libdiscid is supposed to be
libdiscid_so="`readelf --wide --dynamic picard_libdiscid_dummy | sed -n '/(NEEDED).*libdiscid.so/s@^\(.*\[\)\([^]]\+\).*@\2@p'`"
sed -i~ -e "s@^\([[:blank:]]\+\)\(libName[[:blank:]]*=[[:blank:]]*'\)\(libdiscid.so.0\)\('[[:blank:]]*\)@\1\2${libdiscid_so}\4 # was '\3'@" picard/disc.py
if diff -u picard/disc.py~ picard/disc.py ; then : ; fi
#
python setup.py config
python setup.py build
%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
# install plugins
PLUGINDIR=%{buildroot}%{py_sitedir}/picard/plugins/
install -m 0644 %{SOURCE2} ${PLUGINDIR}
install -m 0644 %{SOURCE8} ${PLUGINDIR}
install -m 0644 %{SOURCE9} ${PLUGINDIR}
install -m 0644 %{SOURCE10} ${PLUGINDIR}
install -m 0644 %{SOURCE11} ${PLUGINDIR}
install -m 0644 %{SOURCE12} ${PLUGINDIR}
install -m 0644 %{SOURCE13} ${PLUGINDIR}
install -m 0644 %{SOURCE14} ${PLUGINDIR}
install -m 0644 %{SOURCE15} ${PLUGINDIR}
install -m 0644 %{SOURCE16} ${PLUGINDIR}
install -m 0644 %{SOURCE17} ${PLUGINDIR}
%suse_update_desktop_file -G "Music Tagger" -N "picard" picard
%find_lang %{name} %{name}.lang
%find_lang %{name}-countries %{name}.lang
%find_lang %{name}-attributes %{name}.lang
mkdir -vp %{buildroot}/%{_libdir}/%{name}
cp -avL %{name}_libdiscid_dummy %{buildroot}/%{_libdir}/%{name}
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc AUTHORS.txt COPYING.txt NEWS.txt
%{_bindir}/picard
%{_libdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{python_sitearch}/picard*
%{_datadir}/icons/hicolor/*/apps/picard.png
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog