Latest commit b758e1d Mar 4, 2012 @trofi Makefile: set proper link order for libraries
'-Wl,--as-needed' enforces libraries to go in proper dependency order:

    $ x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu `pkg-config xmms2-client --libs` `pkg-config libcurl --libs` src/xmms2-scrobbler.o src/list.o src/queue.o src/strbuf.o src/md5.o src/submission.o -o bin/xmms2-scrobbler
    src/xmms2-scrobbler.o: In function `save_profile_submissions_queue':
    xmms2-scrobbler.c:(.text+0x281): undefined reference to `xmmsc_userconfdir_get'
    src/xmms2-scrobbler.o: In function `load_config':
    xmms2-scrobbler.c:(.text+0x3e2): undefined reference to `xmmsc_userconfdir_get'
    src/xmms2-scrobbler.o: In function `maybe_submit_to_profile':
    xmms2-scrobbler.c:(.text+0x7e3): undefined reference to `xmmsc_medialib_get_info'
    xmms2-scrobbler.c:(.text+0x7f7): undefined reference to `xmmsc_result_notifier_set'

This commit puts library list after output binary ('-o $@') as '--as-needed'
starts external library tracking from there.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>




XMMS2-Scrobbler is a client for XMMS2 that feeds information about the songs
you played to last.fm, formerly known as AudioScrobbler.
XMMS2-Scrobbler supports "multi-scrobbling", i.e. it can talk to more than
one AudioScrobbler server.
The latest version can be found at


XMMS2-Scrobbler obviously depends on libxmmsclient (ships with XMMS2).
It also depends on CURL. That's it.


Run "make" to build xmms2-scrobbler.

Run "make install" to install xmms2-scrobbler. The usual variables PREFIX
and DESTDIR are evaluated.

Alternatively, just copy the bin/xmms2-scrobbler file anywhere you like.


First, you need to set up XMMS2-Scrobbler's config files.
Config values that are specific to the AudioScrobbler server go in
You will usually have .../clients/xmms2-scrobbler/lastfm/config
and maybe .../clients/xmms2-scrobbler/librefm/config.

These server-specific config files contain your username and password
and the URL to use:

	mkdir ~/.config/xmms2/clients/xmms2-scrobbler/lastfm
	echo -e "user: foo\npassword: bar\nhandshake_url: http://post.audioscrobbler.com\n" > \

For libre.fm, use
  handshake_url: http://turtle.libre.fm

Optionally, if you're behind a proxy, you'll need to tell XMMS2-Scrobbler
about that proxy. This information applies to all servers and so goes in

	echo -e "proxy: my.proxy\nproxy_port: 8080\n" >> \

Next, create a symlink to the script in ~/.config/xmms2/startup.d.
This will make xmms2d start xmms2-scrobbler on startup. When xmms2d is
killed, xmms2-scrobbler will exit automatically.

In case anything doesn't work as it should, have a look at

Upgrading from 0.3.x

The 0.3 series of XMMS2-Scrobbler didn't use server-specific config files.
To upgrade your configuration, do like this:

	cd ~/.config/xmms2/clients/xmms2-scrobbler

	# Create a config directory for the last.fm server
	mkdir lastfm

	# Copy the old config to the last.fm-specific config file
	grep -v ^proxy config > lastfm/config

	# Remove the last.fm-specific lines from the generic config file
	grep ^proxy config > proxy_config
	mv proxy_config config

	# Move the old queue file to the lastfm directory
	mv queue lastfm/

	# Append the handshake_url config value
	echo -e "\nhandshake_url: http://post.audioscrobbler.com\n" >> \