File whaawmp.spec of Package whaawmp

#
# spec file for package whaawmp
#
# 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:           whaawmp
Version:        0.2.14
Release:        0
Summary:        Minimalistic Media Player
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Players
Url:            http://home.gna.org/whaawmp
Source0:        http://download.gna.org/%{name}/%{version}/%{name}-%{version}.tar.bz2
Source100:      %{name}-rpmlintrc
BuildRequires:  ed
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  python-base
BuildRequires:  update-desktop-files
Requires:       gstreamer010
Requires:       gstreamer010-plugins-base
Requires:       gstreamer010-plugins-good
Requires:       python-gstreamer-0_10
Requires:       python-gtk
Requires:       python-xdg
Recommends:     %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Whaaw Media Player is a minimalistic media player based on GTK and GStreamer.

%lang_package

%prep
%setup -q

ed -s whaawmp.desktop 2>/dev/null <<'EOF'
/^Terminal=False/d
w
EOF

# remove shebang from non-executables
find src/ -name '*.py' -print -exec sh -c '
ed -s "$1" 2>/dev/null <<\EOF
/^#! *\/usr\/bin\/env *python/d
w
EOF
' {} {} \;

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%suse_update_desktop_file %{name}

%fdupes %{buildroot}%{_datadir}

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/whaaw-thumbnailer
%{_bindir}/whaawmp
%{python_sitelib}/whaawmp
%{python_sitelib}/whaawmp-*.egg-info
%{_datadir}/applications/whaawmp.desktop
%{_datadir}/pixmaps/whaawmp.svg
%dir %{_datadir}/thumbnailers
%{_datadir}/thumbnailers/whaaw-thumbnailer.desktop
%{_datadir}/whaawmp

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by