Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > e42f8eb8b4a0a3c2f88c7faa400bfa2f > files > 2

pytone-2.2.1-1mdk.src.rpm

%define name	pytone
%define version 2.2.1
%define release 1mdk

Summary:	Mp3/ogg mixer for DJ's
Name:		%name
Version:	%version
Release:	%release
Group:          Sound
License:	GPL
URL:		http://www.luga.de/pytone/
# http://www.luga.de/pytone/download/PyTone-2.0.5.tar.gz
Source:		http://www.luga.de/pytone/download/PyTone-%version.tar.bz2
BuildRoot:	%_tmppath/%{name}-%{version}-%{release}-buildroot
Requires:	pyogg pyvorbis pymad pyao
BuildRequires:  python-devel >= 2.3


%description

PyTone is a music jukebox written in Python with a curses based
GUI. While providing advanced features like crossfading and multiple
players, special emphasis is put on ease of use, turning PyTone into an
ideal jukebox system for use at parties.


%prep
%setup -q -n PyTone-%version


%build
%__python setup.py build_ext -i


%install
rm -rf   %buildroot
# TODO try --prefix next time.
%__python setup.py install --root %buildroot
%__rm %buildroot/%_sysconfdir/pytonerc
%__install conf/pytonerc -D %buildroot/%_datadir/%name/pythonerc


# Lets make a wrapper.
%__install -d %buildroot/%_bindir
cat << EOF > %buildroot%_bindir/%name
#!/bin/sh
if [ ! -d ~/.pytone ]; then
   echo 'Creating pytone configuration directory: ~/.pytone'
   %__install -d ~/.pytone
fi

if [ ! -e ~/.pytone/pytonerc ]; then
   echo 'Installing pytone configuration file: ~/.pytone/pytonerc'
   %__install  %_datadir/%name/pythonerc ~/.pytone/pytonerc
   echo
fi

if [ ! -e ~/.pytone/pytonectl ]; then
   touch ~/.pytone/pytonectl
   echo
fi

%__python %_libdir/python%pyver/site-packages/%name/pytone.pyc $@
EOF

# lets make another wrapper. Should be fixed in the next release.
cat << EOF_rpm > %buildroot%_bindir/%{name}ctl
#!/bin/sh
case \$@ in
    -h|--help)
        cat << EOF
pytonectl %version
Copyright (C) 2003 Jörg Lehmann <joerg@luga.de>
usage: pytonectl.py [options] command

Possible options are:
   -h, --help:              show this help
   -s, --server <hostname>: connect to PyTone server on hostname
   -p, --port <portnumber>: connect to PyTone server on given port
   -f, --file <filename>:   connect to PyTone UNIX socket filename

The supported commands are:
    playerforward:                  play the next song in the playlist
    playerpause:                    pause the player
    playerstart:                    start/unpause the player
    playerstop:                     stop the player
    playerratecurrentsong <rating>: rate the song currently being played (1<=rating<=5)
    playlistaddsongs <filenames>:   add files to end of playlist
    playlistaddsongtop <filename>:  play file immediately
    playlistclear:                  clear the playlist
    playlistdeleteplayedsongs:      remove all played songs from the playlist
    playlistreplay:                 mark all songs in the playlist as unplayed
    playlistshuffle:                shuffle the playlist

EOF
        ;;
        *)
            %__python %_libdir/python%pyver/site-packages/%name/pytonectl.pyc \$@
        ;;
esac
EOF_rpm

%find_lang PyTone


%clean
rm -rf %buildroot


%files -f PyTone.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog COPYING PKG-INFO README TODO
%dir %_libdir/python%pyver/site-packages/%name
%_libdir/python%pyver/site-packages/%name/*
%dir %_datadir/%name
%_datadir/%name/pythonerc

%defattr(755,root,root,755)
%_bindir/%name
%_bindir/%{name}ctl


%changelog
* Tue Feb 08 2005 Lenny Cartier <lenny@mandrakesoft.com> 2.2.1-1mdk
- 2.2.1

* Wed Feb 02 2005 Lenny Cartier <lenny@mandrakesoft.com> 2.2.0-1mdk
- 2.2.0

* Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 2.1.3-2mdk
- Rebuild for new python

* Tue Nov 30 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-1mdk
- 2.1.3

* Mon Nov 08 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.1.1-1mdk
- 2.1.1

* Thu Aug 05 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.1.0-1mdk
- 2.1.0

* Fri Jul 23 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.0.14-1mdk
- 2.0.14

* Mon Jun 14 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.0.13-1mdk
- 2.0.13

* Fri May 14 2004 Michael Scherer <misc@mandrake.org> 2.0.12-1mdk
- New release 2.0.12
- rpmbuildupdate aware

* Sun Feb 15 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.0.9-1mdk
- 2.0.9

* Mon Jan 19 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.0.8-1mdk
- 2.0.8

* Sat Dec 13 2003 Han Boetes <han@linux-mandrake.com> 2.0.6-1mdk
- New version.

* Fri Nov 28 2003 Han Boetes <han@linux-mandrake.com> 2.0.5-1mdk
- initial mandrake release