diff --git a/CMakeLists.txt b/CMakeLists.txt index 78293cd3..ded75cc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,25 +1,29 @@ cmake_minimum_required(VERSION 3.4 FATAL_ERROR) -PROJECT(sioclient) +PROJECT(sioclient + VERSION 3.1.0 + ) option(BUILD_SHARED_LIBS "Build the shared library" OFF) -option(BUILD_UNIT_TESTS "Builds unit tests target" OFF) +option(BUILD_UNIT_TESTS "Builds unit tests target" OFF) -set(MAJOR 1) -set(MINOR 6) -set(PATCH 0) +if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/asio/asio/README) + message("Updating submodules") + execute_process( + COMMAND git submodule update --init + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +endif () -if(NOT CMAKE_BUILD_TYPE ) -MESSAGE(STATUS "not define build type, set to release" ) -set(CMAKE_BUILD_TYPE Release ) -elseif(NOT (${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )) -MESSAGE(SEND_ERROR "CMAKE_BUILD_TYPE must be either Release or Debug") -return() +if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/asio/asio/README) + message("Updating submodules") + execute_process( + COMMAND git submodule update --init + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src ALL_SRC) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/internal ALL_SRC) -file(GLOB ALL_HEADERS ${CMAKE_CURRENT_LIST_DIR}/src/*.h ) -set(SIO_INCLUDEDIR ${CMAKE_CURRENT_LIST_DIR}) + +file(GLOB ALL_HEADERS ${CMAKE_CURRENT_LIST_DIR}/src/*.h) add_definitions( # These will force ASIO to compile without Boost @@ -32,10 +36,10 @@ add_definitions( ) add_library(sioclient ${ALL_SRC}) -target_include_directories(sioclient PUBLIC +target_include_directories(sioclient PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src PRIVATE - ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp + ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include ${CMAKE_CURRENT_LIST_DIR}/lib/asio/asio/include ) @@ -61,7 +65,7 @@ add_library(sioclient_tls ${ALL_SRC}) target_include_directories(sioclient_tls PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src PRIVATE - ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp + ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include ${CMAKE_CURRENT_LIST_DIR}/lib/asio/asio/include ${OPENSSL_INCLUDE_DIR} diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..39be9523 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,7 @@ +socket.io-client-cpp for Debian +------------------------------ + +The source of this library is managed through git, and depends on a few submodules. +This porting includes all those modules, that are statically linked. + + -- Federico Fuga Wed, 12 Jan 2022 16:18:30 +0100 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..f5eece2e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +socket.io-client-cpp (3.1.0-1) unstable; urgency=medium + + * Initial porting of project to Debian + + -- Federico Fuga Thu, 13 Jan 2022 11:03:37 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..1a79f260 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: socket.io-client-cpp +Priority: optional +Maintainer: Federico Fuga +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.4.1 +Section: libs +Homepage: https://github.com/socketio/socket.io-client-cpp +#Vcs-Browser: https://salsa.debian.org/debian/socket.io-client-cpp +#Vcs-Git: https://salsa.debian.org/debian/socket.io-client-cpp.git + +Package: socket.io-client-cpp-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends} +Description: Development files for the Socket.io-client-cpp library + Socket.IO is a bidirectional and low-latency communication for every platform. + This package contains the development files for a C++11 client library. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..e60169d0 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: socket.io-client-cpp +Upstream-Contact: +Source: https://github.com/socketio/socket.io-client-cpp + +Files: * +Copyright: Copyright (c) 2015, Melo Yao +License: MIT + +Files: debian/* +Copyright: 2022 Federico Fuga +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..f1415823 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ diff --git a/debian/socket.io-client-cpp-dev.dirs b/debian/socket.io-client-cpp-dev.dirs new file mode 100644 index 00000000..44188162 --- /dev/null +++ b/debian/socket.io-client-cpp-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/debian/socket.io-client-cpp-dev.install b/debian/socket.io-client-cpp-dev.install new file mode 100644 index 00000000..e69de29b diff --git a/debian/socket.io-client-cpp-docs.docs b/debian/socket.io-client-cpp-docs.docs new file mode 100644 index 00000000..73190411 --- /dev/null +++ b/debian/socket.io-client-cpp-docs.docs @@ -0,0 +1,2 @@ +README.source +README.Debian diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)