File devidify.spec of Package devidify

# vim: set ts=4 sw=4 et:
# Copyright (c) 2007-2009 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to packman@links2linux.de

%{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           devidify
Version:        1.14
Release:        0
Summary:        Extracting audio tracks from DVDs
Group:          Productivity/Multimedia/Video/Editors and Convertors
License: GPL-2.0
URL:            http://www.mahnamahna.net/museyroom/devidify/devidify.shtml
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch
%py_requires
BuildRequires:  pkgconfig(python2)
BuildRequires:  update-desktop-files
Requires:       lame
Requires:       lsdvd
Requires:       MPlayer
Requires:       python-gtk
Requires:       vorbis-tools

%description
I wrote it because I had a few concert DVDs laying around, and
wanted to get their audio tracks into my portable music player.
At the time, existing Linux-based tools meant ripping the video
first, then extracting the audio. They made none of this easy.
Who has time for such nonsense? Devidify makes things easy.
Feed it a shiny disc and it spits out WAV, MP3, or Ogg Vorbis
files.

%prep
%autosetup -p1

%build
tee setup.cfg <<_EOF_
[install]
install_data=%{_datadir}
install_scripts=%{_bindir}
_EOF_
python setup.py build

%install
install -dm 755 %{buildroot}%{python_sitelib}

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

cat > %{name}.desktop << EOF
[Desktop Entry]
#Encoding=UTF-8
Name=Devidify
Type=Application
Terminal=false
Exec=devidify
#Icon=
Comment=Extract audio from your DVDs
EOF
%suse_update_desktop_file -i %{name} AudioVideo AudioVideoEditing

%files
#%doc COPYING NEWS README TODO
%{_bindir}/devidify
%{_datadir}/%{name}
%{python_sitelib}
%{_datadir}/applications/*.desktop

%changelog