Blob Blame Raw
Name:           picard
Version:        1.3.2
Release:        6%{?dist}
Summary:        MusicBrainz-based audio tagger
License:        GPLv2+
URL:            http://picard.musicbrainz.org/
Source0:        http://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-%{version}.tar.gz
# plugins, now distributed inside contrib/plugins directory,
# keep upstream URLs around in case we want to add upstream version
#Source1:	http://users.musicbrainz.org/~luks/picard-plugins/discnumber.py
#Source2:       http://users.musicbrainz.org/~luks/picard-plugins/featartist.py
#Source3:       http://users.musicbrainz.org/~luks/picard-plugins/coverart.py
#Source4:       http://users.musicbrainz.org/~luks/picard-plugins/lastfm/__init__.py
#Source5:       http://users.musicbrainz.org/~luks/picard-plugins/lastfm/ui_options_lastfm.py
#Source6:       http://users.musicbrainz.org/~luks/picard-plugins/lastfm/options_lastfm.ui
#Source7:	http://users.musicbrainz.org/~luks/picard-plugins/cuesheet.py
#Source8:	http://users.musicbrainz.org/~luks/picard-plugins/open_in_gui.py
#Source9:	http://users.musicbrainz.org/~luks/picard-plugins/swapprefix.py
#Source10:	http://users.musicbrainz.org/~luks/picard-plugins/titlecase.py
#Source11:	http://users.musicbrainz.org/~luks/picard-plugins/tracks2clipboard.py
#Source12:      http://users.musicbrainz.org/~luks/picard-plugins/replaygain/__init__.py
#Source13:      http://users.musicbrainz.org/~luks/picard-plugins/replaygain/ui_options_replaygain.py
#Source14:      http://users.musicbrainz.org/~luks/picard-plugins/replaygain/options_replaygain.ui
#Source15:	http://users.musicbrainz.org/~luks/picard-plugins/featartistsintitles.py
#Source16:	http://users.musicbrainz.org/~luks/picard-plugins/release_type.py
#Source17:	http://users.musicbrainz.org/~luks/picard-plugins/no_release.py
#Source18:	http://gitorious.org/musicbrainz/addrelease/blobs/raw/master/addrelease.py

# not yet included in contrib/ directory
Source19:	http://github.com/voiceinsideyou/creaps-picard-plugins/raw/master/titlesort.py
Source20:	http://github.com/voiceinsideyou/creaps-picard-plugins/raw/master/titleversion.py

# bonusdisc.py not yet ported
# search plugins are obsolete
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  libofa-devel
BuildRequires:  PyQt4
BuildRequires:  PyQt4-webkit
BuildRequires:  python2-devel
BuildRequires:  python-mutagen
Requires:       hicolor-icon-theme
Requires:       PyQt4
Requires:       PyQt4-webkit
Requires:       python-mutagen >= 1.20
Requires:       python-libdiscid

%description
Picard is an audio tagging application using data from the MusicBrainz
database. The tagger is album or release oriented, rather than
track-oriented.

%prep
%setup -qn picard-release-%{version}

%build
%{__python2} setup.py config
env CFLAGS="%{optflags}" %{__python2} setup.py build

%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}

desktop-file-install \
  --delete-original --remove-category="Application"   \
  --dir=%{buildroot}%{_datadir}/applications      \
  %{buildroot}%{_datadir}/applications/*

# install plugins
PLUGINDIR=%{buildroot}%{python2_sitearch}/picard/plugins/
install -pm0644 contrib/plugins/discnumber.py ${PLUGINDIR}
install -pm0644 contrib/plugins/featartist.py ${PLUGINDIR}
mkdir ${PLUGINDIR}/lastfm/
install -pm0644 contrib/plugins/lastfm/__init__.py ${PLUGINDIR}/lastfm/
install -pm0644 contrib/plugins/lastfm/ui_options_lastfm.py ${PLUGINDIR}/lastfm/
install -pm0644 contrib/plugins/lastfm/options_lastfm.ui ${PLUGINDIR}/lastfm/
install -pm0644 contrib/plugins/cuesheet.py ${PLUGINDIR}
#install -pm0644 contrib/plugins/open_in_gui.py ${PLUGINDIR}
#install -pm0644 contrib/plugins/swapprefix.py ${PLUGINDIR}
install -pm0644 contrib/plugins/titlecase.py ${PLUGINDIR}
install -pm0644 contrib/plugins/tracks2clipboard.py ${PLUGINDIR}
mkdir ${PLUGINDIR}/replaygain/
install -pm0644 contrib/plugins/replaygain/__init__.py ${PLUGINDIR}/replaygain/
install -pm0644 contrib/plugins/replaygain/ui_options_replaygain.py ${PLUGINDIR}/replaygain/
install -pm0644 contrib/plugins/replaygain/options_replaygain.ui ${PLUGINDIR}/replaygain/
install -pm0644 contrib/plugins/featartistsintitles.py ${PLUGINDIR}
install -pm0644 contrib/plugins/release_type.py ${PLUGINDIR}
install -pm0644 contrib/plugins/no_release.py ${PLUGINDIR}
install -pm0644 contrib/plugins/addrelease.py ${PLUGINDIR}
mkdir ${PLUGINDIR}/lastfmplus/
install -pm0644 contrib/plugins/lastfmplus/__init__.py ${PLUGINDIR}/lastfmplus/
install -pm0644 contrib/plugins/lastfmplus/ui_options_lastfm.py ${PLUGINDIR}/lastfmplus/
install -pm0644 contrib/plugins/classicdiscnumber.py ${PLUGINDIR}

install -pm0644 %{SOURCE19} ${PLUGINDIR}
install -pm0644 %{SOURCE20} ${PLUGINDIR}

%find_lang %{name}
%find_lang %{name}-attributes
%find_lang %{name}-countries

%check
## disable tests for the moment
%{?_with_check:%{__python2} setup.py test || :}

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files -f %{name}.lang -f %{name}-attributes.lang -f %{name}-countries.lang
%doc AUTHORS.txt NEWS.txt
%license COPYING.txt
%{_bindir}/picard
%{_datadir}/applications/picard.desktop
%{_datadir}/icons/hicolor/*/apps/picard.png
%{python2_sitearch}/*egg-info
%{python2_sitearch}/picard/

%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Mar 02 2016 Rex Dieter <rdieter@fedoraproject.org> 1.3.2-5
- Requires: PyQt4-webkit

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Mar 23 2015 Ville Skyttä <ville.skytta@iki.fi> - 1.3.2-2
- Require python-libdiscid instead of libdiscid

* Tue Feb 03 2015 Christopher Meng <rpm@cicku.me> - 1.3.2-1
- Update to 1.3.2

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Apr  7 2013 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.2-1
- Update to latest upstream (1.2)
- Remove cover art plugin, now in core package

* Wed Mar  6 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1-3
- Remove vendor prefix from desktop files in F19+ https://fedorahosted.org/fesco/ticket/1077

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Nov 17 2012 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.1-1
- Update to upstream 1.1 (#854142)

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Jun  4 2012  Alex Lancaster <alexlan[AT]fedoraproject org> - 1.0-1
- Update to latest upstream 1.0 (#827880)
- Use versions of plugins now distributed in contrib/plugins
- Update BR for PyQt >= 4.6 (#757398)
- Drop obsolete conditional in %%files (#757234)

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Nov 14 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.16-1
- Update to 0.16
- Update plugins, add titlesort, titleversion plugins.

* Sun Aug 21 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.15.1-1
- Update to 0.15.1
- Add more plugins

* Mon May 30 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.15-0.1.beta1
- Update to 0.15beta1 (#683055)
- Convert plugin files to files in git, easier to manage
- Only use plugins certified to be API compatible with 0.15 from
  http://users.musicbrainz.org/~luks/picard-plugins/

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.12.1-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Tue Nov  3 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.12.1-1
- Update to upstream 0.12.1 (brown bag fix release)

* Tue Oct 27 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.12-1
- Update to 0.12 (#531224)
- Icons now in icons/hicolor directory

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Dec  9 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.11-2
- Fixed sources.

* Tue Dec  9 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.11-1
- Update to latest upstream (0.11)
- Drop upstreamed patch
- Remove sed-ing of .desktop file

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10-3
- Rebuild for Python 2.6

* Tue Sep  2 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.10-2
- Update plugin versions to 0.10 where possible.  
- Temporarily disable the search plugins until they are ported to new API.

* Sun Aug 31 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.10-1
- Update to latest upstream (0.10).
- Add patch to work around broken setup.py.
- Fixed some spec file errors: duplicate sources.

* Sat Feb  9 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.9.0-6
- rebuilt for GCC 4.3 as requested by Fedora Release Engineering

* Wed Dec 19 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-5
- Add support for python eggs for F9+

* Wed Dec 19 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-4
- Update to proper release: 0.9.0
- Drop plugins directory patch, applied upstream

* Tue Dec 04 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.6.beta1
- strip out png extension from .desktop file

* Tue Dec 04 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.5.beta1
- Add plugins from http://musicbrainz.org/doc/PicardQt/Plugins
- Patch to find proper plugins directory (filed upstream:
  http://bugs.musicbrainz.org/ticket/3430)
- Does not depend on python-musicbrainz2 any longer, uses libdiscid directly 

* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.4.beta1
- Various minor spec file cleanups to make sure timestamps stay correct

* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.3.beta1
- Create pixmaps directory

* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.2.beta1
- Missing BR: python-devel
- Use sitearch to make sure x86_64 builds work
- Install icons share/pixmaps/, rather than share/icons/

* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.1.beta1
- Initial packaging