File xfmpc.spec of Package xfmpc

#
# spec file for package xfmpc
#
# Copyright (c) 2012 SUSE LINUX Products 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:           xfmpc
Version:        0.2.2
Release:        0
Summary:        Lightweight MPD Client for the Xfce Desktop Environment
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Players
Url:            http://goodies.xfce.org/projects/applications/xfmpc
Source:         http://archive.xfce.org/src/apps/xfmpc/0.2/%{name}-%{version}.tar.bz2
Source1:        xfmpc.png
BuildRequires:  ed
BuildRequires:  intltool
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libmpd)
BuildRequires:  pkgconfig(libxfce4ui-1)
BuildRequires:  pkgconfig(libxfce4util-1.0)
Recommends:     %{name}-lang = %{version}
Suggests:       mpd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Xfmpc is a lightweight Music Player Daemon (MPD) client application for the
Xfce desktop environment.

%lang_package

%prep
%setup -q
ed -s xfmpc.desktop.in 2>/dev/null <<'EOF'
,s/^Icon=stock_volume/Icon=xfmpc/
w
EOF
cat xfmpc.desktop.in

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

%install
%make_install
install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png

%suse_update_desktop_file %{name}

rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK}

%find_lang %{name} %{?no_lang_C}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog* IDEAS NEWS README THANKS
%{_bindir}/xfmpc
%{_mandir}/man1/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%files lang -f %{name}.lang

%changelog