d100d8
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
d100d8
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
d100d8
d100d8
Name:             picard
Alex Lancaster b5e885
Version:          0.16
01c08e
Release:          1%{?dist}
d100d8
Summary:          MusicBrainz-based audio tagger
d100d8
Group:            Applications/Multimedia
d100d8
01c08e
Source0:          http://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-%{version}.tar.gz
f19c32
f19c32
# plugins
a2ee5c
Source1:	  http://users.musicbrainz.org/~luks/picard-plugins/discnumber.py
a2ee5c
Source2:          http://users.musicbrainz.org/~luks/picard-plugins/featartist.py
a2ee5c
Source3:          http://users.musicbrainz.org/~luks/picard-plugins/coverart.py
a2ee5c
# actual location:          http://users.musicbrainz.org/~luks/picard-plugins/lastfm/__init__.py
a2ee5c
# had to rename SOURCE4 to avoid namespace conflict with replaygain
a2ee5c
Source4:          http://users.musicbrainz.org/~luks/picard-plugins/lastfm/__init__lastfm.py
a2ee5c
Source5:          http://users.musicbrainz.org/~luks/picard-plugins/lastfm/ui_options_lastfm.py
a2ee5c
Source6:          http://users.musicbrainz.org/~luks/picard-plugins/lastfm/options_lastfm.ui
a2ee5c
Source7:	  http://users.musicbrainz.org/~luks/picard-plugins/cuesheet.py
a2ee5c
Source8:	  http://users.musicbrainz.org/~luks/picard-plugins/open_in_gui.py
a2ee5c
Source9:	  http://users.musicbrainz.org/~luks/picard-plugins/swapprefix.py
a2ee5c
Source10:	  http://users.musicbrainz.org/~luks/picard-plugins/titlecase.py
a2ee5c
Source11:	  http://users.musicbrainz.org/~luks/picard-plugins/tracks2clipboard.py
a2ee5c
# actual location:         http://users.musicbrainz.org/~luks/picard-plugins/replaygain/__init__..py
a2ee5c
Source12:          http://users.musicbrainz.org/~luks/picard-plugins/replaygain/__init__replaygain.py
a2ee5c
Source13:          http://users.musicbrainz.org/~luks/picard-plugins/replaygain/ui_options_replaygain.py
a2ee5c
Source14:          http://users.musicbrainz.org/~luks/picard-plugins/replaygain/options_replaygain.ui
01c08e
Source15:	   http://users.musicbrainz.org/~luks/picard-plugins/featartistsintitles.py
01c08e
Source16:	   http://users.musicbrainz.org/~luks/picard-plugins/release_type.py
01c08e
Source17:	   http://users.musicbrainz.org/~luks/picard-plugins/no_release.py
Alex Lancaster b5e885
Source18:	   http://gitorious.org/musicbrainz/addrelease/blobs/raw/master/addrelease.py
Alex Lancaster b5e885
Source19:	   http://github.com/voiceinsideyou/creaps-picard-plugins/raw/master/titlesort.py
Alex Lancaster b5e885
Source20:	   http://github.com/voiceinsideyou/creaps-picard-plugins/raw/master/titleversion.py
a2ee5c
Alex Lancaster b5e885
# bonusdisc.py not yet ported
a2ee5c
# search plugins are obsolete
a11194
d100d8
License:          GPLv2+
d100d8
Url:              http://musicbrainz.org/doc/PicardTagger
d100d8
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d100d8
BuildRequires:    python-devel
d100d8
BuildRequires:    gettext
d100d8
BuildRequires:    desktop-file-utils
d100d8
BuildRequires:    PyQt4 >= 4.3
d100d8
BuildRequires:    python-mutagen > 1.9
d100d8
BuildRequires:    libofa-devel
d100d8
Requires:         PyQt4 >= 4.3
d100d8
Requires:         python-mutagen > 1.9
f19c32
Requires:         libdiscid
d100d8
d100d8
d100d8
%description
d100d8
Picard is an audio tagging application using data from the MusicBrainz
d100d8
database. The tagger is album or release oriented, rather than
d100d8
track-oriented.
d100d8
d100d8
%prep
01c08e
%setup -q -n picard-%{version}
d100d8
d100d8
%build
d100d8
env %{__python} setup.py config
d100d8
env CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
d100d8
d100d8
%install
d100d8
rm -rf $RPM_BUILD_ROOT
d100d8
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
56f4f2
d100d8
%find_lang %{name}
d100d8
desktop-file-install --vendor="fedora"                \
d100d8
  --delete-original --remove-category="Application"   \
d100d8
  --dir=$RPM_BUILD_ROOT/%{_datadir}/applications      \
d100d8
  $RPM_BUILD_ROOT/%{_datadir}/applications/*
d100d8
f19c32
# install plugins
f19c32
PLUGINDIR=$RPM_BUILD_ROOT%{python_sitearch}/picard/plugins/
f19c32
install -pm 0644 %{SOURCE1} ${PLUGINDIR}
f19c32
install -pm 0644 %{SOURCE2} ${PLUGINDIR}
f19c32
install -pm 0644 %{SOURCE3} ${PLUGINDIR}
f19c32
mkdir ${PLUGINDIR}/lastfm/
a2ee5c
install -pm 0644 %{SOURCE4} ${PLUGINDIR}/lastfm/__init__.py
f19c32
install -pm 0644 %{SOURCE5} ${PLUGINDIR}/lastfm/
f19c32
install -pm 0644 %{SOURCE6} ${PLUGINDIR}/lastfm/
a8ba14
install -pm 0644 %{SOURCE7} ${PLUGINDIR}
a2ee5c
install -pm 0644 %{SOURCE8} ${PLUGINDIR}
a2ee5c
install -pm 0644 %{SOURCE9} ${PLUGINDIR}
a2ee5c
install -pm 0644 %{SOURCE10} ${PLUGINDIR}
a2ee5c
install -pm 0644 %{SOURCE11} ${PLUGINDIR}
a2ee5c
mkdir ${PLUGINDIR}/replaygain/
a2ee5c
install -pm 0644 %{SOURCE12} ${PLUGINDIR}/replaygain/__init__.py
a2ee5c
install -pm 0644 %{SOURCE13} ${PLUGINDIR}/replaygain/
a2ee5c
install -pm 0644 %{SOURCE14} ${PLUGINDIR}/replaygain/
01c08e
install -pm 0644 %{SOURCE15} ${PLUGINDIR}
01c08e
install -pm 0644 %{SOURCE16} ${PLUGINDIR}
01c08e
install -pm 0644 %{SOURCE17} ${PLUGINDIR}
Alex Lancaster b5e885
install -pm 0644 %{SOURCE18} ${PLUGINDIR}
Alex Lancaster b5e885
install -pm 0644 %{SOURCE19} ${PLUGINDIR}
Alex Lancaster b5e885
install -pm 0644 %{SOURCE20} ${PLUGINDIR}
01c08e
a8ba14
a8ba14
echo %{fedora}
f19c32
d100d8
## disable tests for the moment
d100d8
%check
d100d8
%{?_with_check:%{__python} setup.py test || :}
d100d8
d100d8
%clean
d100d8
rm -rf $RPM_BUILD_ROOT
d100d8
d100d8
%files -f %{name}.lang
d100d8
%defattr(-,root,root,-)
d100d8
%doc AUTHORS.txt COPYING.txt NEWS.txt INSTALL.txt
d100d8
%{_bindir}/picard
d100d8
%{_datadir}/applications/fedora-picard.desktop
ee31c3
%{_datadir}/icons/hicolor/*/apps/picard.png
304cc5
%if 0%{?fedora} >= 9
304cc5
%{python_sitearch}/*egg-info
304cc5
%endif
d100d8
%dir %{python_sitearch}/picard
d100d8
%{python_sitearch}/picard/*
d100d8
d100d8
%changelog
Alex Lancaster b5e885
* Mon Nov 14 2011  <alex@sup35.ccdom.wi.mit.edu> - 0.16-1
Alex Lancaster b5e885
- Update to 0.16
Alex Lancaster b5e885
- Update plugins, add titlesort, titleversion plugins.
Alex Lancaster b5e885
01c08e
* Sun Aug 21 2011 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.15.1-1
01c08e
- Update to 0.15.1
01c08e
- Add more plugins
01c08e
a2ee5c
* Mon May 30 2011 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.15-0.1.beta1
a2ee5c
- Update to 0.15beta1 (#683055)
a2ee5c
- Convert plugin files to files in git, easier to manage
a2ee5c
- Only use plugins certified to be API compatible with 0.15 from
a2ee5c
  http://users.musicbrainz.org/~luks/picard-plugins/
a2ee5c
174a56
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-3
174a56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
174a56
e17e44
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.12.1-2
e17e44
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
e17e44
941350
* Tue Nov  3 2009 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.12.1-1
941350
- Update to upstream 0.12.1 (brown bag fix release)
941350
ee31c3
* Tue Oct 27 2009 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.12-1
ee31c3
- Update to 0.12 (#531224)
ee31c3
- Icons now in icons/hicolor directory
ee31c3
e9e918
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
e9e918
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e9e918
1e8901
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3
1e8901
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
1e8901
253d32
* Tue Dec  9 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.11-2
253d32
- Fixed sources.
253d32
22cde5
* Tue Dec  9 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.11-1
22cde5
- Update to latest upstream (0.11)
22cde5
- Drop upstreamed patch
22cde5
- Remove sed-ing of .desktop file
22cde5
e5d23b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10-3
e5d23b
- Rebuild for Python 2.6
e5d23b
a8ba14
* Tue Sep  2 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.10-2
a8ba14
- Update plugin versions to 0.10 where possible.  
a8ba14
- Temporarily disable the search plugins until they are ported to new API.
a8ba14
a11194
* Sun Aug 31 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.10-1
a11194
- Update to latest upstream (0.10).
a11194
- Add patch to work around broken setup.py.
a11194
- Fixed some spec file errors: duplicate sources.
a11194
55fa0f
* Sat Feb  9 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 0.9.0-6
55fa0f
- rebuilt for GCC 4.3 as requested by Fedora Release Engineering
55fa0f
304cc5
* Wed Dec 19 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-5
304cc5
- Add support for python eggs for F9+
304cc5
524c53
* Wed Dec 19 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-4
033ad3
- Update to proper release: 0.9.0
033ad3
- Drop plugins directory patch, applied upstream
033ad3
56f4f2
* Tue Dec 04 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.6.beta1
56f4f2
- strip out png extension from .desktop file
56f4f2
f19c32
* Tue Dec 04 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.5.beta1
f19c32
- Add plugins from http://musicbrainz.org/doc/PicardQt/Plugins
f19c32
- Patch to find proper plugins directory (filed upstream:
f19c32
  http://bugs.musicbrainz.org/ticket/3430)
f19c32
- Does not depend on python-musicbrainz2 any longer, uses libdiscid directly 
f19c32
f19c32
* Wed Nov 15 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.4.beta1
d100d8
- Various minor spec file cleanups to make sure timestamps stay correct
d100d8
f19c32
* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.3.beta1
d100d8
- Create pixmaps directory
d100d8
f19c32
* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.2.beta1
d100d8
- Missing BR: python-devel
d100d8
- Use sitearch to make sure x86_64 builds work
d100d8
- Install icons share/pixmaps/, rather than share/icons/
d100d8
f19c32
* Wed Nov 14 2007 Alex Lancaster <alexlan@fedoraproject.org> 0.9.0-0.1.beta1
d100d8
- Initial packaging