Permalink
Browse files

Merging with latest pianobar.

  • Loading branch information...
Joshua V. Dillon
Joshua V. Dillon committed Sep 22, 2012
1 parent babede1 commit 6907b73e04167b019467120d30bdb3fd0a8c2f6f
View
71 INSTALL
@@ -4,13 +4,16 @@ Install
Dependencies Dependencies
------------ ------------
gmake - gmake
libao http://www.xiph.org/ao/ - pthreads
libfaad2 http://www.audiocoding.com/downloads.html - libao
AND/OR libmad http://www.underbit.com/products/mad/ - gnutls
pthreads - gcrypt
libid3tag http://www.underbit.com/products/mad/ - json-c
UTF-8 console/locale! - libfaad2 (compiled with --without-drm)
- libmad (optional, Pandora One users only)
- UTF-8 console/locale
- libid3tag http://www.underbit.com/products/mad/
Building Building
-------- --------
@@ -19,13 +22,6 @@ If you have all of the dependencies listed above just type
make clean && make make clean && make
NOTE: The above won't work on Mac OS X (Snow Leopard) since c99 targets i386
and cc (gcc4.2) targets x86_64. If you've built supporting libraries
(libao, etc.) using gcc, you'll be unable to link. You can work around
this issue by overriding CFLAGS[1]
make clean && make CFLAGS="-O2 -DNDEBUG -W64"
You can run the client directly from the source directory now You can run the client directly from the source directory now
./pianobarfly ./pianobarfly
@@ -34,23 +30,50 @@ Or install it by issuing
make install make install
In case you don't want to install libmad OR libfaad you probably want to Selecting features
disable one of them: ++++++++++++++++++
make clean && make DISABLE_FAAD=1 It is possible to disable certain features when building pianobar by setting
one of the variables listed below. In fact it is required if you don’t have the
corresponding library installed. So if you don’t want AAC playback or don’t
have libfaad installed for example, run
or gmake DISABLE_FAAD=1
make clean && make DISABLE_MAD=1 instead of a plain `gmake`.
You can also disable libid3tag: DISABLE_FAAD=1
Disables AAC playback.
DISABLE_MAD=1
Disables MP3 playback.
DISABLE_ID3TAG=1
Disables libid3tag.
make clean && make DISABLE_ID3TAG=1 Mac OS X
++++++++
libpiano can be built and installed by running NOTE: The above won't work on Mac OS X (Snow Leopard) since c99 targets i386
and cc (gcc4.2) targets x86_64. If you've built supporting libraries
make clean && make libpiano && make install-libpiano (libao, etc.) using gcc, you'll be unable to link. You can work around
this issue by overriding CFLAGS[1]
make clean && make CFLAGS="-O2 -DNDEBUG -W64"
[1] https://github.com/PromyLOPh/pianobar/issues/98 [1] https://github.com/PromyLOPh/pianobar/issues/98
Ubuntu 12.04
++++++++++++
To install on Ubuntu >= 12.04
sudo apt-get install \
libao-dev \
libmad0-dev \
libfaad-dev \
libgnutls-dev \
libjson0-dev \
libgcrypt11-dev
make
sudo make install
You can then fire it up with `pianobarfly`
View
@@ -1,7 +1,8 @@
Copyright (c) 2008-2011 Copyright (c) 2008-2012
Lars-Dominik Braun <lars@6xq.net> Lars-Dominik Braun <lars@6xq.net>
Ted Jordan <silverfunk@gmail.com> Ted Jordan <silverfunk@gmail.com>
Geoffrey Huntley <ghuntley@ghuntley.com> Geoffrey Huntley <ghuntley@ghuntley.com>
Joshua V. Dillon <jvdillon@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
View
148 Makefile
@@ -48,14 +48,12 @@ LIBPIANO_DIR=src/libpiano
LIBPIANO_SRC=\ LIBPIANO_SRC=\
${LIBPIANO_DIR}/crypt.c \ ${LIBPIANO_DIR}/crypt.c \
${LIBPIANO_DIR}/piano.c \ ${LIBPIANO_DIR}/piano.c \
${LIBPIANO_DIR}/xml.c ${LIBPIANO_DIR}/request.c \
${LIBPIANO_DIR}/response.c
LIBPIANO_HDR=\ LIBPIANO_HDR=\
${LIBPIANO_DIR}/config.h \ ${LIBPIANO_DIR}/config.h \
${LIBPIANO_DIR}/crypt_key_output.h \
${LIBPIANO_DIR}/xml.h \
${LIBPIANO_DIR}/crypt.h \ ${LIBPIANO_DIR}/crypt.h \
${LIBPIANO_DIR}/piano.h \ ${LIBPIANO_DIR}/piano.h \
${LIBPIANO_DIR}/crypt_key_input.h \
${LIBPIANO_DIR}/piano_private.h ${LIBPIANO_DIR}/piano_private.h
LIBPIANO_OBJ=${LIBPIANO_SRC:.c=.o} LIBPIANO_OBJ=${LIBPIANO_SRC:.c=.o}
LIBPIANO_RELOBJ=${LIBPIANO_SRC:.c=.lo} LIBPIANO_RELOBJ=${LIBPIANO_SRC:.c=.lo}
@@ -70,81 +68,137 @@ LIBWAITRESS_OBJ=${LIBWAITRESS_SRC:.c=.o}
LIBWAITRESS_RELOBJ=${LIBWAITRESS_SRC:.c=.lo} LIBWAITRESS_RELOBJ=${LIBWAITRESS_SRC:.c=.lo}
LIBWAITRESS_INCLUDE=${LIBWAITRESS_DIR} LIBWAITRESS_INCLUDE=${LIBWAITRESS_DIR}
LIBEZXML_DIR=src/libezxml ifeq (${DISABLE_FAAD}, 1)
LIBEZXML_SRC=${LIBEZXML_DIR}/ezxml.c LIBFAAD_CFLAGS=
LIBEZXML_HDR=${LIBEZXML_DIR}/ezxml.h LIBFAAD_LDFLAGS=
LIBEZXML_OBJ=${LIBEZXML_SRC:.c=.o} else
LIBEZXML_RELOBJ=${LIBEZXML_SRC:.c=.lo}
LIBEZXML_INCLUDE=${LIBEZXML_DIR}
ifneq (${DISABLE_FAAD}, 1)
LIBFAAD_CFLAGS=-DENABLE_FAAD LIBFAAD_CFLAGS=-DENABLE_FAAD
LIBFAAD_LDFLAGS=-lfaad LIBFAAD_LDFLAGS=-lfaad
endif endif
ifneq (${DISABLE_MAD}, 1) ifeq (${DISABLE_MAD}, 1)
LIBMAD_CFLAGS=${shell pkg-config --cflags mad} -DENABLE_MAD LIBMAD_CFLAGS=
LIBMAD_LDFLAGS=${shell pkg-config --libs mad} LIBMAD_LDFLAGS=
else
LIBMAD_CFLAGS=-DENABLE_MAD
LIBMAD_CFLAGS+=$(shell pkg-config --cflags mad)
LIBMAD_LDFLAGS=$(shell pkg-config --libs mad)
endif endif
LIBGNUTLS_CFLAGS= LIBGNUTLS_CFLAGS=$(shell pkg-config --cflags gnutls)
LIBGNUTLS_LDFLAGS=-lgnutls LIBGNUTLS_LDFLAGS=$(shell pkg-config --libs gnutls)
ifneq (${DISABLE_ID3TAG}, 1) LIBGCRYPT_CFLAGS=
LIBID3TAG_CFLAGS=${shell pkg-config --cflags id3tag} -DENABLE_ID3TAG LIBGCRYPT_LDFLAGS=-lgcrypt
LIBID3TAG_LDFLAGS=${shell pkg-config --libs id3tag}
endif
LIBAO_CFLAGS=${shell pkg-config --cflags ao} LIBJSONC_CFLAGS=$(shell pkg-config --cflags json)
LIBAO_LDFLAGS=${shell pkg-config --libs ao} LIBJSONC_LDFLAGS=$(shell pkg-config --libs json)
ifeq (${DISABLE_ID3TAG}, 1)
LIBID3TAG_CFLAGS=
LIBID3TAG_LDFLAGS=
else
LIBID3TAG_CFLAGS=$(shell pkg-config --cflags id3tag) -DENABLE_ID3TAG
LIBID3TAG_LDFLAGS=$(shell pkg-config --libs id3tag)
endif
# build pianobarfly # build pianobarfly
ifeq (${DYNLINK},1) ifeq (${DYNLINK},1)
pianobarfly: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0 pianobarfly: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} ${LIBAO_LDFLAGS} -lpthread -L. \ @echo " LINK $@"
-lpiano ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} @${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} -lao -lpthread -lm -L. -lpiano \
${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS}
else else
pianobarfly: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \ pianobarfly: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \
${LIBWAITRESS_HDR} ${LIBEZXML_OBJ} ${LIBEZXML_HDR} ${LIBWAITRESS_HDR}
${CC} ${CFLAGS} ${LDFLAGS} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \ @echo " LINK $@"
${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} ${LIBAO_LDFLAGS} -lpthread \ @${CC} ${CFLAGS} ${LDFLAGS} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} ${LIBID3TAG_LDFLAGS} -o $@ ${LIBWAITRESS_OBJ} -lao -lpthread -lm \
${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} ${LIBID3TAG_LDFLAGS} -o $@
endif endif
# build shared and static libpiano # build shared and static libpiano
libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \ libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} \ ${LIBWAITRESS_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ}
${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} @echo " LINK $@"
${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} \ @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} \
-o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \ -o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \
${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ} ${LIBWAITRESS_RELOBJ} ${LIBGNUTLS_LDFLAGS} ${LIBGCRYPT_LDFLAGS} \
ln -s libpiano.so.0.0.0 libpiano.so.0 ${LIBJSONC_LDFLAGS}
ln -s libpiano.so.0 libpiano.so @ln -s libpiano.so.0.0.0 libpiano.so.0
${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} @ln -s libpiano.so.0 libpiano.so
@echo " AR libpiano.a"
@${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ}
# build dependency files
%.d: %.c
@set -e; rm -f $@; \
$(CC) -M ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
${LIBFAAD_CFLAGS} ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} \
${LIBGCRYPT_CFLAGS} ${LIBJSONC_CFLAGS} $< > $@.$$$$; \
sed '1 s,^.*\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
-include $(PIANOBAR_SRC:.c=.d)
-include $(LIBPIANO_SRC:.c=.d)
-include $(LIBWAITRESS_SRC:.c=.d)
# build standard object files
%.o: %.c %.o: %.c
${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \ @echo " CC $<"
-I ${LIBEZXML_INCLUDE} ${LIBFAAD_CFLAGS} \ @${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} ${LIBID3TAG_CFLAGS} ${LIBAO_CFLAGS} -c -o $@ $< ${LIBFAAD_CFLAGS} ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} \
${LIBGCRYPT_CFLAGS} ${LIBJSONC_CFLAGS} ${LIBID3TAG_CFLAGS} -c -o $@ $<
# create position independent code (for shared libraries) # create position independent code (for shared libraries)
%.lo: %.c %.lo: %.c
${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \ @echo " CC $< (PIC)"
-I ${LIBEZXML_INCLUDE} -c -fPIC -o $@ $< @${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
${LIBJSONC_CFLAGS} \
-c -fPIC -o $@ $<
clean: clean:
${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \ @echo " CLEAN"
${LIBEZXML_OBJ} ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} \ @${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \
${LIBEZXML_RELOBJ} pianobarfly libpiano.so* libpiano.a waitress-test ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} pianobarfly libpiano.so* \
libpiano.a waitress-test $(PIANOBAR_SRC:.c=.d) $(LIBPIANO_SRC:.c=.d) \
$(LIBWAITRESS_SRC:.c=.d)
all: pianobarfly all: pianobarfly
debug: pianobarfly debug: pianobarfly
debug: CFLAGS=-Wall -pedantic -ggdb -DDEBUG debug: CFLAGS=-pedantic -ggdb -Wall -Wmissing-declarations -Wshadow -Wcast-qual \
-Wformat=2 -Winit-self -Wignored-qualifiers -Wmissing-include-dirs \
-Wfloat-equal -Wundef -Wpointer-arith -Wtype-limits -Wbad-function-cast \
-Wcast-align -Wclobbered -Wempty-body -Wjump-misses-init -Waddress \
-Wlogical-op -Waggregate-return -Wstrict-prototypes \
-Wold-style-declaration -Wold-style-definition -Wmissing-parameter-type \
-Wmissing-prototypes -Wmissing-field-initializers -Woverride-init \
-Wpacked -Wredundant-decls -Wnested-externs
# warnings for gcc 4.5; disabled:
# -Wswitch-default: too many bogus warnings
# -Wswitch-enum: too many bogus warnings
# -Wunused-parameter: too many bogus warnings
# -Wstrict-overflow: depends on optimization level
# -Wunsafe-loop-optimizations: depends on optimization level
# -Wwrite-strings: to be enabled
# -Wconversion: too many (bogus?) warnings
# -Wsign-conversion: same here
# -Wsign-compare: to be enabled
# -Wmissing-noreturn: recommendation
# -Wmissing-format-attribute: same here
# -Wpadded: have a closer look at this one
# -Winline: we don't care
# -Winvalid-pch: not our business
# -Wdisabled-optimization: depends on optimization level
# -Wstack-protector: we don't use stack protector
# -Woverlength-strings: over-portability-ish
waitress-test: CFLAGS+= -DTEST waitress-test: CFLAGS+= -DTEST
waitress-test: ${LIBWAITRESS_OBJ} waitress-test: ${LIBWAITRESS_OBJ}
${CC} ${LDFLAGS} ${LIBWAITRESS_OBJ} -o waitress-test ${CC} ${LDFLAGS} ${LIBWAITRESS_OBJ} ${LIBGNUTLS_LDFLAGS} -o waitress-test
test: waitress-test test: waitress-test
./waitress-test ./waitress-test
View
7 README
@@ -11,3 +11,10 @@ pianobarfly is a console client for the personalized web radio pandora
- last.fm scrobbling support (external application) - last.fm scrobbling support (external application)
- proxy support for listeners outside the USA - proxy support for listeners outside the USA
- auto-rips streams to audio files - auto-rips streams to audio files
The sourcecode for pianobar can be downloaded at:
http://github.com/PromyLOPh/pianobar/
or,
http://6xq.net/projects/pianobar/
The sourcecode for pianobarfly can be downloaded at:
http://github.com/ghuntley/pianobarfly
View
@@ -48,8 +48,7 @@
#embed_cover = true #embed_cover = true
# Misc # Misc
# mp3, mp3-hifi or aacplus #audio_quality = low
#audio_format = aacplus
#autostart_station = 123456 #autostart_station = 123456
#event_command = /home/user/.config/pianobarfly/eventcmd #event_command = /home/user/.config/pianobarfly/eventcmd
#fifo = /tmp/pianobar #fifo = /tmp/pianobar
@@ -62,3 +61,15 @@
# Format strings # Format strings
#format_nowplaying_song = %t by %a on %l%r%@%s #format_nowplaying_song = %t by %a on %l%r%@%s
#format_nowplaying_station = Station %n #format_nowplaying_station = Station %n
#format_list_song = %i) %a - %t%r
# high-quality audio (192k mp3, for Pandora One subscribers only!)
#audio_quality = high
#rpc_host = internal-tuner.pandora.com
#partner_user = pandora one
#partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
#device = D01
#encrypt_password = 2%3WCL*JU$MP]4
#decrypt_password = U#IO$RZPAB%VX2
#tls_fingerprint = 394067EECB420E3911985C2CC02C12AE89BB09B2
Oops, something went wrong.

0 comments on commit 6907b73

Please sign in to comment.