-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
5,884 additions
and
1,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
image: gcc4.8 | ||
script: | ||
- sudo apt-get install -y libmpdclient-dev &> /dev/null | ||
- cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Debug | ||
- make VERBOSE=1 | ||
notify: | ||
email: | ||
recipients: | ||
- [email protected] | ||
irc: | ||
server: irc.freenode.org | ||
nick: droneBot | ||
channel: '#nicotest' | ||
on_started: true | ||
on_success: true | ||
on_failure: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,55 +3,51 @@ cmake_minimum_required(VERSION 2.6) | |
project (ympd) | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/") | ||
set(CPACK_PACKAGE_VERSION_MAJOR "1") | ||
set(CPACK_PACKAGE_VERSION_MINOR "0") | ||
set(CPACK_PACKAGE_VERSION_MINOR "2") | ||
set(CPACK_PACKAGE_VERSION_PATCH "0") | ||
set(CPACK_GENERATOR "DEB;RPM;TGZ") | ||
set(CPACK_SOURCE_GENERATOR "TBZ2") | ||
set(DEBIAN_PACKAGE_SECTION "web") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD web client based on Websockets and Bootstrap") | ||
set(CPACK_PACKAGE_CONTACT "Andrew Karpow <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]") | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.0.0,libmpdclient2") | ||
|
||
option(WITH_STATIC_WEBSOCKETS "Build with static libwebsockets library" ON) | ||
|
||
option(WITH_MPD_HOST_CHANGE "Let users of the web frontend change the MPD Host" ON) | ||
|
||
find_package(LibMPDClient REQUIRED) | ||
find_package(LibWebSockets REQUIRED) | ||
if(WITH_STATIC_WEBSOCKETS) | ||
find_package(OpenSSL REQUIRED) | ||
find_package(ZLIB REQUIRED) | ||
endif() | ||
find_package(Threads REQUIRED) | ||
|
||
configure_file(${PROJECT_SOURCE_DIR}/src/config.h.in | ||
${PROJECT_BINARY_DIR}/config.h) | ||
include_directories(${PROJECT_BINARY_DIR} ${LIBWEBSOCKETS_INCLUDE_DIR}) | ||
configure_file(src/config.h.in ${PROJECT_BINARY_DIR}/config.h) | ||
include_directories(${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}) | ||
|
||
include(CheckCSourceCompiles) | ||
include(CPack) | ||
|
||
set(CMAKE_C_FLAGS "-std=gnu99 -Wall") | ||
set(CMAKE_C_FLAGS_DEBUG "-ggdb -pedantic") | ||
|
||
file(GLOB RESOURCES | ||
RELATIVE ${PROJECT_SOURCE_DIR} | ||
htdocs/js/* | ||
htdocs/assets/* | ||
htdocs/css/*.min.css | ||
htdocs/fonts/* | ||
htdocs/index.html | ||
) | ||
|
||
add_executable(mkdata htdocs/mkdata.c) | ||
get_target_property(MKDATA_EXE mkdata LOCATION) | ||
|
||
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/assets.c | ||
COMMAND ${MKDATA_EXE} ${RESOURCES} > ${PROJECT_BINARY_DIR}/assets.c | ||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | ||
DEPENDS ${RESOURCES} | ||
) | ||
|
||
set(SOURCES | ||
src/ympd.c | ||
src/http_server.c | ||
src/mpd_client.c | ||
src/mongoose.c | ||
src/json_encode.c | ||
assets.c | ||
) | ||
|
||
add_executable(ympd ${SOURCES}) | ||
|
||
# TODO: use generator expressions introduced to CMake 2.8.12, too fresh yet | ||
if(WITH_STATIC_WEBSOCKETS) | ||
find_library(LIBWEBSOCKETS_LIBRARY_STATIC libwebsockets.a) | ||
target_link_libraries(ympd ${LIBMPDCLIENT_LIBRARY} | ||
${LIBWEBSOCKETS_LIBRARY_STATIC} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}) | ||
else() | ||
target_link_libraries(ympd ${LIBMPDCLIENT_LIBRARY} | ||
${LIBWEBSOCKETS_LIBRARIES}) | ||
endif() | ||
|
||
target_link_libraries(ympd ${LIBMPDCLIENT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
install(TARGETS ympd DESTINATION bin) | ||
install(FILES ympd.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1) | ||
install(DIRECTORY htdocs DESTINATION share/${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ body { | |
min-width: 50px; | ||
} | ||
|
||
#search { | ||
margin-right: -10px; | ||
} | ||
|
||
.btn-group-hover { | ||
opacity: 20%; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.