# Review request: https://bugzilla.redhat.com/show_bug.cgi?id=721043

Name:           pragha
Version:        1.1.0.1
Release:        1%{?_dist_release}
Summary:        Lightweight GTK+ music manager

Group:          Applications/Multimedia
License:        GPLv3+
URL:            http://pragha.wikispaces.com/
#VCS: git:https://github.com/matiasdelellis/pragha.git
Source0:        https://github.com/downloads/matiasdelellis/%{name}/%{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

Obsoletes:      pragha < 1.0, self-build-pragha < 1.0

BuildRequires:  dbus-devel >= 1.1
BuildRequires:  dbus-glib-devel >= 0.84
BuildRequires:  gtk2-devel >= 2.20.0
BuildRequires:  flac-devel >= 1.2.1
BuildRequires:  keybinder-devel >= 0.2.0
BuildRequires:  gstreamer-devel >= 0.10
BuildRequires:  gstreamer-plugins-base-devel >= 0.10
BuildRequires:  libcddb-devel >= 1.3.0
BuildRequires:  libcdio-devel >= 0.80
BuildRequires:  curl-devel >= 7.18
# libglyr is not yet in Fedora
#BuildRequires:  libglyr-devel >= 0.9.4
#BuildRequires:  libclastfm-devel >= 0.5
BuildRequires:  libnotify-devel >= 0.4.4
#BuildRequires:  libxfce4ui-devel >= 4.8.0
BuildRequires:  sqlite3-devel >= 3.4
#BuildRequires:  taglib-devel >= 1.7.0
BuildRequires:  taglib-devel
BuildRequires:  totem-pl-parser-devel
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
Requires:       gstreamer-plugins-base

%description
Pragha is is a lightweight GTK+ music manager that aims to be fast, bloat-free,
and light on memory consumption. It is written completely in C and GTK+.

Pragha is a fork of Consonance Music Manager, discontinued by the original
author.


%prep
%setup -q

%build
%configure
make %{?_smp_mflags} V=1


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'
desktop-file-install                                       \
  --delete-original                                        \
  --add-category=Audio                                     \
  --dir=%{buildroot}%{_datadir}/applications          \
  %{buildroot}%{_datadir}/applications/%{name}.desktop
%find_lang %{name}
# remove duplicate docs
rm -rf %{buildroot}%{_datadir}/doc/%{name}

%clean
rm -rf %{buildroot}


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database &> /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
update-desktop-database &> /dev/null || :


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


%files -f %{name}.lang
%defattr(-,root,root,-)
# FIXME add AUTHORS if not empty
%doc ChangeLog COPYING FAQ NEWS README
%{_bindir}/pragha
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
%{_datadir}/pixmaps/%{name}/
%{_mandir}/man1/pragha.1.*


%changelog
* Sat Jun 23 2012 Munehiro Yamamoto <munepi@vinelinux.org> 1.1.0.1-1
- ported from Fedora rawhide
- added Obsoletes: pragha < 1.0, self-build-pragha < 1.0

* Thu Jun 21 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.1.0.1-1
- Update to 1.1.0.1

* Sun Jun 17 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.1.0-1
- Update to 1.1.0

* Sat May 05 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.0.2-2
- Enable totem-pl-parser

* Fri May 04 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.0.2-1
- Update to 1.0.2
- Drop upstreamed patches
- Add README
- Add VCS key

* Thu Apr 05 2012 Kevin Fenzi <kevin@scrye.com> - 1.0.1-2
- Rebuild for Xfce 4.10

* Wed Mar 14 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.0.1-1
- Update to 1.0.1

* Thu Feb 02 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.0-1
- Update to 1.0 Final
- Enable Last.fm support

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

* Thu Dec 15 2011 Christoph Wickert <cwickert@fedoraproject.org> - 1.0-0.2.cr3
- Apply the cflags patch again

* Wed Dec 14 2011 Christoph Wickert <cwickert@fedoraproject.org> - 1.0-0.1.rc3
- Update to 1.0.rc3
- Require exo-devel for playlist saving throughout sessions

* Sun Dec 11 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.99.0-2
- Rebuild for libcdio-0.83
- Compile with '-Wno-error=deprecated-declarations' (#760960)

* Wed Sep 07 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.99.0-1
- Update to 0.99.0

* Mon Aug 22 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.98.0-1
- Update to 0.98.0

* Sat Jul 30 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.97.0-2
- Don't compile with -O3

* Wed Jul 13 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.97.0-1
- Update to 0.97.0: This version is gstreamer-based. It no longer requires
  libmad, libmodplug, libsndfile or libvorbis but gstreamer and gstreamer-
  plugins-base

* Tue Jul 12 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.8-2
- Build with keybinder support

* Tue Jul 12 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.8-1
- Update to 0.8.8

* Thu Mar 17 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.6-1
- Update to 0.8.6
- Drop libnotify-patch, no longer required

* Thu Dec 09 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.4-1
- Update to 0.8.4

* Sun Oct 03 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.2-1
- Update to 0.8.2

* Sat Aug 21 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.8.0.2-3
- rebuilt

* Mon Aug 02 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.0.2-2
- Fix desktop file

* Fri Jul 30 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.0.2-1
- Update to 0.8.0.2
- Drop de.po patch, included upstream

* Fri Jul 30 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.0.1-1
- Update to 0.8.0.1
- Add COPYING and NEWS to docs

* Thu Jul 29 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.8.0-1
- Update to 0.8.0

* Fri Jun 25 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.7.1-1
- Update to 0.7.7.1

* Fri Jun 25 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.7-1
- Update to 0.7.7

* Sat Jun 19 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.6-1
- Update to 0.7.6
- Remove upstreamed use-software-mixer.patch

* Fri Apr 22 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.4-1
- Update to 0.7.4

* Mon Mar 22 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.3-2
- Use software mixer by default to cope with pulseaudio
- Remove executable bits from docs

* Tue Mar 16 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.3-1
- Update to 0.7.3

* Sat Feb 20 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.2-1
- Update to 0.7.2

* Wed Oct 28 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.1-1
- Upadte to 0.7.1

* Sat Oct 03 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.7.0-1
- Upadte to 0.7.0

* Sun Aug 09 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.6.3-1
- Upadte to 0.6.3

* Mon Jul 20 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.6.2.2-1
- Initial Fedora package
