diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-31 19:33:40 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-31 19:33:40 +0100 |
commit | 9312c14b47a2d6e58238902d1424ae8d45d73ac5 (patch) | |
tree | a89ba3a812cf987e815dab6df2929f76dd914675 | |
parent | 46544ec5126051b8e933e6036c528c2e811e932e (diff) | |
download | pianobar-9312c14b47a2d6e58238902d1424ae8d45d73ac5.tar.gz pianobar-9312c14b47a2d6e58238902d1424ae8d45d73ac5.tar.bz2 pianobar-9312c14b47a2d6e58238902d1424ae8d45d73ac5.zip |
Switch build system to cmake
lib{piano,wardrobe} are now static libraries and not installed any more.
-rw-r--r-- | .gitignore | 22 | ||||
-rw-r--r-- | ChangeLog | 0 | ||||
-rw-r--r-- | INSTALL | 10 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rwxr-xr-x | autogen.sh | 12 | ||||
-rw-r--r-- | configure.in | 54 | ||||
-rw-r--r-- | libpiano/.gitignore | 1 | ||||
-rw-r--r-- | libpiano/ChangeLog | 0 | ||||
-rw-r--r-- | libpiano/Makefile.am | 1 | ||||
-rw-r--r-- | libpiano/NEWS | 0 | ||||
-rw-r--r-- | libpiano/configure.in | 35 | ||||
-rw-r--r-- | libpiano/src/Makefile.am | 7 | ||||
-rw-r--r-- | libpiano/src/main.c | 6 | ||||
-rw-r--r-- | libwardrobe/ChangeLog | 0 | ||||
-rw-r--r-- | libwardrobe/Makefile.am | 1 | ||||
-rw-r--r-- | libwardrobe/NEWS | 0 | ||||
-rw-r--r-- | libwardrobe/configure.in | 33 | ||||
-rw-r--r-- | libwardrobe/src/Makefile.am | 6 | ||||
-rw-r--r-- | libwardrobe/src/main.c | 2 | ||||
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/player.c | 2 |
23 files changed, 16 insertions, 191 deletions
@@ -1,20 +1,10 @@ -.deps -.libs -*.lo -*.la *.o # vim swap files .*.sw* -aclocal.m4 -autom4te.cache -compile -config.* -configure -depcomp -install-sh -libtool -ltmain.sh Makefile -Makefile.in -missing -stamp-h1 +config.h +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +*.a +install_manifest.txt diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index e69de29..0000000 --- a/ChangeLog +++ /dev/null @@ -9,6 +9,7 @@ Versions may vary :) Just get the newest one: pianobar ++++++++ +cmake libao http://www.xiph.org/ao/ libcurl http://curl.haxx.se/ libfaad2 http://www.audiocoding.com/downloads.html @@ -19,26 +20,23 @@ UTF-8 console/locale! libpiano ++++++++ +cmake libcurl with SSL http://curl.haxx.se/ libxml2 http://xmlsoft.org/ libwardrobe +++++++++++ +cmake libcurl http://curl.haxx.se/ Build ----- -./autogen.sh -./configure +cmake . make make install -If the build or configure process fails try something like this (you may have -to adjust the paths): -LDFLAGS+=" -L/usr/pkg/lib" CFLAGS+=" -I/usr/pkg/include/faad2" ./configure - You can run the client directly from the source directory: ./src/pianobar diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 856bb78..0000000 --- a/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = libwardrobe libpiano src - -EXTRA_DIST = autogen.sh BUGS diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index caf9b61..0000000 --- a/autogen.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -for DIR in . libpiano libwardrobe; do - echo "autogen in " $DIR - cd $DIR - libtoolize --force \ - && aclocal \ - && autoheader \ - && automake --add-missing \ - && autoconf - cd - -done diff --git a/configure.in b/configure.in deleted file mode 100644 index c8a61d3..0000000 --- a/configure.in +++ /dev/null @@ -1,54 +0,0 @@ -# initizalize -AC_INIT([pianobar], [0.1], [PromyLOPh@lavabit.com]) -AC_CONFIG_SRCDIR([src/main.c]) -AM_CONFIG_HEADER([src/config.h]) -AM_INIT_AUTOMAKE([-Wall]) - -# progs -AC_PROG_CC -AM_PROG_CC_C_O -AM_SANITY_CHECK -AM_PROG_LIBTOOL - -PKG_PROG_PKG_CONFIG - -# libs -PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) -AC_SUBST(LIBCURL_CFLAGS) -AC_SUBST(LIBCURL_LIBS) - -PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.31) -AC_SUBST(LIBXML_CFLAGS) -AC_SUBST(LIBXML_LIBS) - -PKG_CHECK_MODULES(LIBAO, ao >= 0.8.8) -AC_SUBST(LIBAO_CFLAGS) -AC_SUBST(LIBAO_LIBS) - -AC_CHECK_LIB([faad], [NeAACDecOpen], [LIBFAAD_LIBS=-lfaad], AC_MSG_ERROR([libfaad2 is required. See INSTALL])) -AC_SUBST(LIBFAAD_LIBS) - -AC_CHECK_LIB([readline], [readline], [LIBREADLINE_LIBS=-lreadline], AC_MSG_ERROR([readline is required. See INSTALL])) -AC_SUBST(LIBREADLINE_LIBS) - -AC_CHECK_LIB([m], [pow], [LIBM_LIBS=-lm], AC_MSG_ERROR([libm is required.])) -AC_SUBST(LIBM_LIBS) - -AC_CHECK_LIB([pthread], [pthread_create], [LIBPTHREAD_LIBS=-lpthread], AC_MSG_ERROR([libpthread is required.])) -AC_SUBST(LIBPTHREAD_LIBS) - -# headers -AC_CHECK_HEADERS([stdlib.h string.h stdint.h termios.h unistd.h]) - -# libc funcs -AC_CHECK_FUNCS([memset memmove strcasecmp]) - -# compiler characteristics -AC_C_INLINE -AC_TYPE_SIZE_T - -# output -AC_CONFIG_FILES(Makefile src/Makefile) -AC_CONFIG_SUBDIRS([libpiano libwardrobe]) - -AC_OUTPUT diff --git a/libpiano/.gitignore b/libpiano/.gitignore deleted file mode 100644 index 2b29f27..0000000 --- a/libpiano/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tests diff --git a/libpiano/ChangeLog b/libpiano/ChangeLog deleted file mode 100644 index e69de29..0000000 --- a/libpiano/ChangeLog +++ /dev/null diff --git a/libpiano/Makefile.am b/libpiano/Makefile.am deleted file mode 100644 index af437a6..0000000 --- a/libpiano/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src diff --git a/libpiano/NEWS b/libpiano/NEWS deleted file mode 100644 index e69de29..0000000 --- a/libpiano/NEWS +++ /dev/null diff --git a/libpiano/configure.in b/libpiano/configure.in deleted file mode 100644 index 0088343..0000000 --- a/libpiano/configure.in +++ /dev/null @@ -1,35 +0,0 @@ -# init -AC_INIT([libpiano], [0.1], [PromyLOPh@lavabit.com]) -AC_CONFIG_AUX_DIR([.]) -AC_CONFIG_SRCDIR([src/main.c]) -AM_CONFIG_HEADER([src/config.h]) -AM_INIT_AUTOMAKE([-Wall]) - -# progs -AC_PROG_CC -AM_PROG_CC_C_O -AM_SANITY_CHECK -AM_PROG_LIBTOOL - -PKG_PROG_PKG_CONFIG - -# libs -PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) -AC_SUBST(LIBCURL_CFLAGS) -AC_SUBST(LIBCURL_LIBS) - -PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.31) -AC_SUBST(LIBXML_CFLAGS) -AC_SUBST(LIBXML_LIBS) - -# headers -AC_CHECK_HEADERS([stdlib.h string.h]) - -# libc functions -AC_FUNC_REALLOC -AC_CHECK_FUNCS([memset strchr strdup]) - -# output -AC_CONFIG_FILES(Makefile src/Makefile) - -AC_OUTPUT diff --git a/libpiano/src/Makefile.am b/libpiano/src/Makefile.am deleted file mode 100644 index 7b7402d..0000000 --- a/libpiano/src/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -lib_LTLIBRARIES = libpiano.la - -libpiano_la_SOURCES = crypt.c http.c main.c xml.c crypt.h crypt_key_input.h \ - crypt_key_output.h http.h main.h xml.h -include_HEADERS = piano.h -libpiano_la_CPPFLAGS = ${LIBCURL_CFLAGS} ${LIBXML_CFLAGS} -libpiano_la_LIBADD = ${LIBCURL_LIBS} ${LIBXML_LIBS} diff --git a/libpiano/src/main.c b/libpiano/src/main.c index 600c74c..87b2d2b 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -73,7 +73,7 @@ void PianoInit (PianoHandle_t *ph) { memset (ph, 0, sizeof (*ph)); ph->curlHandle = curl_easy_init (); snprintf (ph->routeId, sizeof (ph->routeId), "%07liP", time (NULL) % 10000000); - curl_easy_setopt (ph->curlHandle, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (ph->curlHandle, CURLOPT_USERAGENT, PACKAGE); curl_easy_setopt (ph->curlHandle, CURLOPT_CONNECTTIMEOUT, 60); curl_easy_setopt (ph->curlHandle, CURLOPT_TIMEOUT, 60); } @@ -200,7 +200,7 @@ PianoReturn_t PianoConnect (PianoHandle_t *ph, const char *user, PianoReturn_t ret; #if 0 - printf ("\n==========\n" PACKAGE_NAME ": Pandora changed their blowfish " + printf ("\n==========\n" PACKAGE ": Pandora changed their blowfish " "encryption key. You will not be able to connect to pandora.\n" "==========\n"); #endif @@ -865,7 +865,7 @@ const char *PianoErrorToStr (PianoReturn_t ret) { break; case PIANO_RET_PROTOCOL_INCOMPATIBLE: - return "Protocol incompatible. Please upgrade " PACKAGE_NAME "."; + return "Protocol incompatible. Please upgrade " PACKAGE "."; break; case PIANO_RET_READONLY_MODE: diff --git a/libwardrobe/ChangeLog b/libwardrobe/ChangeLog deleted file mode 100644 index e69de29..0000000 --- a/libwardrobe/ChangeLog +++ /dev/null diff --git a/libwardrobe/Makefile.am b/libwardrobe/Makefile.am deleted file mode 100644 index af437a6..0000000 --- a/libwardrobe/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src diff --git a/libwardrobe/NEWS b/libwardrobe/NEWS deleted file mode 100644 index e69de29..0000000 --- a/libwardrobe/NEWS +++ /dev/null diff --git a/libwardrobe/configure.in b/libwardrobe/configure.in deleted file mode 100644 index 0333e58..0000000 --- a/libwardrobe/configure.in +++ /dev/null @@ -1,33 +0,0 @@ -# init -AC_INIT([libwardrobe], [0.1], [PromyLOPh@lavabit.com]) -AC_CONFIG_AUX_DIR([.]) -AC_CONFIG_SRCDIR([src/main.c]) -AM_CONFIG_HEADER([src/config.h]) -AM_INIT_AUTOMAKE([-Wall]) - -# progs -AC_PROG_CC -AM_PROG_CC_C_O -AM_SANITY_CHECK -AM_PROG_LIBTOOL - -PKG_PROG_PKG_CONFIG - -# libs -PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) -AC_SUBST(LIBCURL_CFLAGS) -AC_SUBST(LIBCURL_LIBS) - -# headers -AC_CHECK_HEADERS([stdlib.h string.h]) - -# compiler characteristics -AC_TYPE_SIZE_T - -# libc functions -AC_CHECK_FUNCS([memset strchr strdup]) - -# output -AC_CONFIG_FILES(Makefile src/Makefile) - -AC_OUTPUT diff --git a/libwardrobe/src/Makefile.am b/libwardrobe/src/Makefile.am deleted file mode 100644 index 470635a..0000000 --- a/libwardrobe/src/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -lib_LTLIBRARIES = libwardrobe.la - -libwardrobe_la_SOURCES = main.c md5.c md5.h -include_HEADERS = wardrobe.h -libwardrobe_la_CPPFLAGS = ${LIBCURL_CFLAGS} -libwardrobe_la_LIBADD = ${LIBCURL_LIBS} diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c index abf669d..1872c69 100644 --- a/libwardrobe/src/main.c +++ b/libwardrobe/src/main.c @@ -107,7 +107,7 @@ void WardrobeHttpPost (CURL *ch, const char *url, const char *postData, void WardrobeInit (WardrobeHandle_t *wh) { memset (wh, 0, sizeof (*wh)); wh->ch = curl_easy_init (); - curl_easy_setopt (wh->ch, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (wh->ch, CURLOPT_USERAGENT, PACKAGE); curl_easy_setopt (wh->ch, CURLOPT_CONNECTTIMEOUT, 60); } diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 72f0789..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -bin_PROGRAMS = pianobar - -pianobar_SOURCES = main.c terminal.c terminal.h settings.c settings.h \ - player.c player.h ui.c ui.h ui_act.c ui_act.h -pianobar_CPPFLAGS = ${LIBCURL_CFLAGS} ${LIBAO_CFLAGS} ${LIBXML_CFLAGS} \ - -I../libpiano/src -I../libwardrobe/src -pianobar_LDADD = ${LIBCURL_LIBS} ${LIBAO_LIBS} ${LIBFAAD_LIBS} \ - ${LIBREADLINE_LIBS} ${LIBXML_LIBS} ${LIBPTHREAD_LIBS} ${LIBM_LIBS} \ - ../libpiano/src/libpiano.la ../libwardrobe/src/libwardrobe.la -dist_man1_MANS = pianobar.1 @@ -65,7 +65,7 @@ int main (int argc, char **argv) { char buf = '\0'; BarKeyShortcut_t *curShortcut; - BarUiMsg ("Welcome to " PACKAGE_NAME "!\n"); + BarUiMsg ("Welcome to " PACKAGE "!\n"); /* init some things */ curl_global_init (CURL_GLOBAL_SSL); diff --git a/src/player.c b/src/player.c index cf22bfd..94c7969 100644 --- a/src/player.c +++ b/src/player.c @@ -251,7 +251,7 @@ void *BarPlayerThread (void *data) { curl_easy_setopt (player->audioFd, CURLOPT_URL, player->url); curl_easy_setopt (player->audioFd, CURLOPT_WRITEFUNCTION, BarPlayerCurlCb); curl_easy_setopt (player->audioFd, CURLOPT_WRITEDATA, (void *) player); - curl_easy_setopt (player->audioFd, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (player->audioFd, CURLOPT_USERAGENT, PACKAGE); curl_easy_setopt (player->audioFd, CURLOPT_CONNECTTIMEOUT, 60); /* start downloading from beginning of file */ curl_easy_setopt (player->audioFd, CURLOPT_RESUME_FROM, 0); |