You can use this spec file to build yourself an RPM, I am probablymissing som deps, but it is a start.
I use this on my F15 KDE install so it might not work on Gnome, never tried.
Save this as spotify.spec:
Code:
Name: spotify
Version: 0.5.2.84
Release: 1%{?dist}
Summary: Linux Qt client
License: Redistributable, no modification permitted
URL: http://www.spotify.com
# Source extracted from Debian package
# http://repository.spotify.com/pool/non-free/s/spotify/spotify-client-qt_0.5.2.84.g6d797eb-1_amd64.deb
# ar vx spotify-client-qt_0.5.2.84.g6d797eb-1_amd64.deb
Source0: data.tar.gz
Source1: %{name}.desktop
# BuildRequires:
Requires: qt,desktop-file-utils
%description
Linux client, Qt version.
%prep
%setup -q -n usr
%build
# fake build, no need to compile anything here
# %%configure
# make %%{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
# Installing the desktop file to make icon show up in the kde menu
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE1}
# installing all the files to their intended place
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
mkdir -p $RPM_BUILD_ROOT/usr/share/doc
mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}/theme/default/{Buttons,icons,Now Playing,Placeholders,Scrollbars,Sourcelist,Toolbar,View Toolbar}
mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}/theme/non-skinnable/{about,devices,document-icons,intro,login,purchase-window,telia,views}
mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}/theme/obsolete/
mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}/theme/other/{_linux,_mac,sounds,specification,test}
install -m 755 bin/spotify $RPM_BUILD_ROOT/usr/bin/
install -m 644 share/pixmaps/* $RPM_BUILD_ROOT/usr/share/pixmaps/
install -m 644 share/%{name}/licenses.xhtml $RPM_BUILD_ROOT/usr/share/%{name}/
cp -r share/%{name}/theme/* $RPM_BUILD_ROOT/usr/share/%{name}/theme/
cp -r share/doc* $RPM_BUILD_ROOT/usr/share/doc/
# refresh icon cache
touch --no-create %{_datadir}/pixmaps &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/pixmaps &>/dev/null
gtk-update-icon-cache %{_datadir}/pixmaps &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/pixmaps &>/dev/null || :
%files
%doc
%{_bindir}/spotify
%{_docdir}/*
%{_datadir}/pixmaps/*.png
%{_datadir}/%{name}/licenses.xhtml
%{_datadir}/%{name}/theme/*
%{_datadir}/applications/%{name}.desktop
%changelog
* Tue Aug 09 2011 Magnus Tuominen <magnus.tuominen@gmail.com> - 0.5.2.84-1
- first attempt
and save this as spotify.desktop:
Code:
[Desktop Entry]
Name=Spotify
GenericName=Spotify
Comment=Internet Radio
Exec=spotify
Icon=spotify-linux-512x512
Terminal=false
Type=Application
Categories=AudioVideo;
Now to build this you will need rpmdevtools and desktop-file-utils installed.
Then run rpmdev-setuptree and place the spec file in the SPECS folder, and the desktop file inside the SOURCES folder along the data.tar.gz you extract from the debian amd64 package.
then cd ~/rpmbuild/SPECS and run rpmbuild -ba spotify.spec
There is probably something missing or stuff that could be done differently in the spec file, if you find something to improve please do.