#Maintainer: Dimitris Jemos #Mandatory pkgname=last.fm pkgver=1.5.1.31879 pkgrel=1dj source=("http://static.last.fm/client/src/$pkgname-$pkgver.tar.bz2" "patches.tar.gz" "last.fm.desktop" "last.fm.script" "last.fm.1") #Optional docs=("readme" "copying" "changelog") url=http://www.last.fm slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "last.fm (Standalone Player for last.fm)" "With Last.fm on your computer you can scrobble your tracks," "share your music tastes, listen to personalized radio streams," "and discover new music and people." "Last.fm is open source software and contains no spyware or adware." ) build() { cd $startdir/src/$pkgname-$pkgver || return 1 # Patches needed for compiling. patch -p1 < $startdir/src/patches/no-fingerprint-lib.diff || return 1 patch -p1 < $startdir/src/patches/reduce-linkage.diff || return 1 patch -p1 < $startdir/src/patches/volumeslider_h-qt45.patch || return 1 lrelease i18n/*.ts || return 1 qmake -config release INCLUDEPATH="/usr/lib${LIBDIRSUFFIX}/glib-2.0/include " make || return 1 make install DESTDIR=$startdir/pkg || return 1 # create icons if [ -e "$startdir/pkg/usr/share/icons/hicolor/48x48/apps" ]; then echo "perhaps icons already exists?" return 1 fi mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps || return 1 #Last.fm doesn't have a nice installer, so we need to package it manually. mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/$pkgname/i18n $startdir/pkg/usr/bin $startdir/pkg/usr/man/man1 \ $startdir/pkg/usr/share/applications $startdir/pkg/usr/share/pixmaps || return 1 cp -R bin/* $startdir/pkg/usr/lib${LIBDIRSUFFIX}/$pkgname || return 1 sed -e "s/@LIBDIR@/lib${LIBDIRSUFFIX}/" $startdir/src/$pkgname.script > $startdir/pkg/usr/bin/$pkgname || return 1 chmod +x $startdir/pkg/usr/bin/$pkgname || return 1 install -m 644 i18n/*.qm $startdir/pkg/usr/lib${LIBDIRSUFFIX}/$pkgname/i18n || return 1 gzip -9c $startdir/src/$pkgname.1 > $startdir/pkg/usr/man/man1/$pkgname.1.gz || return 1 cat $startdir/src/$pkgname.desktop > $startdir/pkg/usr/share/applications/$pkgname.desktop || return 1 ( cp $startdir/pkg/usr/lib${LIBDIRSUFFIX}/last.fm/data/app_55.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/lastfm.png ) || return 1 sed -i "s/.png//" $startdir/pkg/usr/share/applications/$pkgname.desktop || return 1 } # Doinst doinst() { if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi }