[dvblinkremote] First import
Mohamed ElMorabity
melmorabity at fedoraproject.org
Tue Mar 25 13:09:15 UTC 2014
commit 1d087ab304b949e8a7d2144c1d447770d44daee9
Author: Mohamed El Morabity <melmorabity at fedoraproject.org>
Date: Tue Mar 25 14:09:09 2014 +0100
First import
.gitignore | 1 +
dvblinkremote-0.2.0-build.patch | 292 ++++++++++++++++++++++++++++++
dvblinkremote-0.2.0-curl.patch | 24 +++
dvblinkremote-0.2.0-install.patch | 46 +++++
dvblinkremote-0.2.0-shared_library.patch | 12 ++
dvblinkremote-0.2.0-tinyxml2.patch | 50 +++++
dvblinkremote.spec | 94 ++++++++++
sources | 1 +
8 files changed, 520 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8bffacb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dvblinkremote-0.2.0-beta.tar.gz
diff --git a/dvblinkremote-0.2.0-build.patch b/dvblinkremote-0.2.0-build.patch
new file mode 100644
index 0000000..44bc6d7
--- /dev/null
+++ b/dvblinkremote-0.2.0-build.patch
@@ -0,0 +1,292 @@
+diff -up ./dvblinkremote/src/command_interpreter.cpp.orig ./dvblinkremote/src/command_interpreter.cpp
+--- ./dvblinkremote/src/command_interpreter.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./dvblinkremote/src/command_interpreter.cpp 2014-03-23 13:16:46.037000000 +0100
+@@ -26,6 +26,8 @@
+ #include <sstream>
+ #include <cctype>
+ #include <ctime>
++#include <cstdio>
++#include <cstring>
+ #include "util.h"
+
+ using namespace dvblinkremote;
+@@ -145,7 +147,7 @@ void CommandInterpreter::SearchEpg()
+ ChannelEpgData* channelEpgData = (ChannelEpgData*)*it;
+ EpgData& epgData = channelEpgData->GetEpgData();
+
+- printf("EPG data found for channel with id (%s)\n", channelEpgData->GetChannelID());
++ printf("EPG data found for channel with id (%s)\n", channelEpgData->GetChannelID().c_str());
+
+ for (std::vector<Program*>::iterator pIt = epgData.begin(); pIt < epgData.end(); pIt++)
+ {
+@@ -231,7 +233,7 @@ void CommandInterpreter::PlayChannel()
+ Stream* stream = new Stream();
+
+ if ((status = m_dvblinkRemoteCommunication.PlayChannel(*streamRequest, *stream)) == DVBLINK_REMOTE_STATUS_OK) {
+- printf("Use the following url to play the stream:\n%s\n\n", stream->GetUrl());
++ printf("Use the following url to play the stream:\n%s\n\n", stream->GetUrl().c_str());
+ std::cout << "Press any key to stop stream..." << std::endl;
+ std::string s;
+ getline(std::cin, s);
+diff -up ./dvblinkremote/src/util.cpp.orig ./dvblinkremote/src/util.cpp
+--- ./dvblinkremote/src/util.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./dvblinkremote/src/util.cpp 2014-03-23 13:12:15.385000000 +0100
+@@ -28,7 +28,7 @@
+
+ void ToLowerCase(std::string &str)
+ {
+- std::transform(str.begin(), str.end(), str.begin(), std::tolower);
++ std::transform(str.begin(), str.end(), str.begin(), ::tolower);
+ }
+
+ bool StringToLong(long& output, const std::string& s, std::ios_base& (*f)(std::ios_base&))
+diff -up ./libdvblinkremote/src/curlhttpclient.cpp.orig ./libdvblinkremote/src/curlhttpclient.cpp
+--- ./libdvblinkremote/src/curlhttpclient.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/curlhttpclient.cpp 2014-03-23 13:14:57.513000000 +0100
+@@ -22,6 +22,7 @@
+ ***************************************************************************/
+
+ #include "curlhttpclient.h"
++#include <cstring>
+
+ using namespace dvblinkremotehttp;
+
+diff -up ./libdvblinkremote/src/dvblinkremotecommunication.cpp.orig ./libdvblinkremote/src/dvblinkremotecommunication.cpp
+--- ./libdvblinkremote/src/dvblinkremotecommunication.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/dvblinkremotecommunication.cpp 2014-03-23 13:06:34.767000000 +0100
+@@ -258,7 +258,7 @@ DVBLinkRemoteStatusCode DVBLinkRemoteCom
+ ClearErrorBuffer();
+
+ if ((status = SerializeRequestObject(command, request, xmlData)) != DVBLINK_REMOTE_STATUS_OK) {
+- WriteError("Serialization of request object failed with error code %d (%s).\n", status, GetStatusCodeDescription(status));
++ WriteError("Serialization of request object failed with error code %d (%s).\n", status, GetStatusCodeDescription(status).c_str());
+ return status;
+ }
+
+@@ -274,14 +274,14 @@ DVBLinkRemoteStatusCode DVBLinkRemoteCom
+
+ if (!m_httpClient.SendRequest(*httpRequest)) {
+ status = DVBLINK_REMOTE_STATUS_CONNECTION_ERROR;
+- WriteError("HTTP request failed with error code %d (%s).\n", status, GetStatusCodeDescription(status));
++ WriteError("HTTP request failed with error code %d (%s).\n", status, GetStatusCodeDescription(status).c_str());
+ }
+ else {
+ dvblinkremotehttp::HttpWebResponse* httpResponse = m_httpClient.GetResponse();
+
+ if (httpResponse->GetStatusCode() == 401) {
+ status = DVBLINK_REMOTE_STATUS_UNAUTHORISED;
+- WriteError("HTTP response returned status code %d (%s).\n", httpResponse->GetStatusCode(), GetStatusCodeDescription(status));
++ WriteError("HTTP response returned status code %d (%s).\n", httpResponse->GetStatusCode(), GetStatusCodeDescription(status).c_str());
+ }
+ else if (httpResponse->GetStatusCode() != 200) {
+ status = DVBLINK_REMOTE_STATUS_ERROR;
+@@ -291,7 +291,7 @@ DVBLinkRemoteStatusCode DVBLinkRemoteCom
+ std::string responseData = httpResponse->GetResponseData();
+
+ if ((status = DeserializeResponseData(command, responseData, responseObject)) != DVBLINK_REMOTE_STATUS_OK) {
+- WriteError("Deserialization of response data failed with error code %d (%s).\n", status, GetStatusCodeDescription(status));
++ WriteError("Deserialization of response data failed with error code %d (%s).\n", status, GetStatusCodeDescription(status).c_str());
+ }
+ }
+
+diff -up ./libdvblinkremote/src/dvblinkremoteconnection.h.orig ./libdvblinkremote/src/dvblinkremoteconnection.h
+--- ./libdvblinkremote/src/dvblinkremoteconnection.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/dvblinkremoteconnection.h 2014-03-23 13:06:34.767000000 +0100
+@@ -31,6 +31,12 @@
+
+ namespace dvblinkremote
+ {
++
++ #ifndef _MSC_VER
++ #define vsprintf_s vsprintf
++ #define _snprintf_s(a,b,c,...) snprintf(a,b,__VA_ARGS__)
++ #endif
++
+ class DVBLinkRemoteCommunication : public IDVBLinkRemoteConnection
+ {
+ public:
+diff -up ./libdvblinkremote/src/playback_container.cpp.orig ./libdvblinkremote/src/playback_container.cpp
+--- ./libdvblinkremote/src/playback_container.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/playback_container.cpp 2014-03-23 13:06:34.767000000 +0100
+@@ -27,11 +27,11 @@
+ using namespace dvblinkremote;
+ using namespace dvblinkremoteserialization;
+
+-PlaybackContainer::PlaybackContainer(const std::string& objectId, const std::string& parentId, const std::string& name, const DVBLinkPlaybackContainerType containerType, const DVBLinkPlaybackContainerContentType containerContentType)
++PlaybackContainer::PlaybackContainer(const std::string& objectId, const std::string& parentId, const std::string& name, DVBLinkPlaybackContainerType& containerType, DVBLinkPlaybackContainerContentType& containerContentType)
+ : PlaybackObject(PlaybackObject::PLAYBACK_OBJECT_TYPE_CONTAINER, objectId, parentId),
+ m_name(name),
+- m_containerType((DVBLinkPlaybackContainerType)containerType),
+- m_containerContentType((DVBLinkPlaybackContainerContentType)containerContentType),
++ m_containerType((DVBLinkPlaybackContainerType&)containerType),
++ m_containerContentType((DVBLinkPlaybackContainerContentType&)containerContentType),
+ Description(""),
+ Logo(""),
+ TotalCount(0),
+diff -up ./libdvblinkremote/src/recording_settings.cpp.orig ./libdvblinkremote/src/recording_settings.cpp
+--- ./libdvblinkremote/src/recording_settings.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/recording_settings.cpp 2014-03-23 13:06:34.767000000 +0100
+@@ -28,6 +28,12 @@
+ using namespace dvblinkremote;
+ using namespace dvblinkremoteserialization;
+
++RecordingSettings::RecordingSettings()
++{ }
++
++RecordingSettings::~RecordingSettings()
++{ }
++
+ GetRecordingSettingsRequest::GetRecordingSettingsRequest()
+ { }
+
+diff -up ./libdvblinkremote/src/request.h.orig ./libdvblinkremote/src/request.h
+--- ./libdvblinkremote/src/request.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/request.h 2014-03-23 13:06:34.768000000 +0100
+@@ -616,9 +616,11 @@ namespace dvblinkremote {
+ std::string m_clientId;
+ };
+
+- class AddScheduleRequest : public Request, public Schedule
++ class AddScheduleRequest : public Request, public virtual Schedule
+ {
+ public:
++ //AddScheduleRequest(const DVBLinkScheduleType scheduleType, const std::string& channelId);
++ AddScheduleRequest();
+ virtual ~AddScheduleRequest() = 0;
+ };
+
+@@ -627,7 +629,7 @@ namespace dvblinkremote {
+ * This is used as input parameter for the IDVBLinkRemoteConnection::AddSchedule method.
+ * @see IDVBLinkRemoteConnection::AddSchedule()
+ */
+- class AddManualScheduleRequest : public ManualSchedule
++ class AddManualScheduleRequest : public ManualSchedule, public AddScheduleRequest
+ {
+ public:
+ /**
+@@ -653,7 +655,7 @@ namespace dvblinkremote {
+ * This is used as input parameter for the IDVBLinkRemoteConnection::AddSchedule method.
+ * @see IDVBLinkRemoteConnection::AddSchedule m()
+ */
+- class AddScheduleByEpgRequest : public EpgSchedule
++ class AddScheduleByEpgRequest : public EpgSchedule, public AddScheduleRequest
+ {
+ public:
+ /**
+diff -up ./libdvblinkremote/src/response.h.orig ./libdvblinkremote/src/response.h
+--- ./libdvblinkremote/src/response.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/response.h 2014-03-23 13:06:34.768000000 +0100
+@@ -806,7 +806,7 @@ namespace dvblinkremote {
+ * @param containerContentType a constant DVBLinkPlaybackContainerContentType instance representing the content
+ * type of the playback items in this playback container.
+ */
+- PlaybackContainer(const std::string& objectId, const std::string& parentId, const std::string& name, const DVBLinkPlaybackContainerType containerType, const DVBLinkPlaybackContainerContentType containerContentType);
++ PlaybackContainer(const std::string& objectId, const std::string& parentId, const std::string& name, DVBLinkPlaybackContainerType& containerType, DVBLinkPlaybackContainerContentType& containerContentType);
+
+ /**
+ * Destructor for cleaning up allocated memory.
+diff -up ./libdvblinkremote/src/scheduling.cpp.orig ./libdvblinkremote/src/scheduling.cpp
+--- ./libdvblinkremote/src/scheduling.cpp.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/scheduling.cpp 2014-03-23 13:06:34.769000000 +0100
+@@ -27,6 +27,11 @@
+ using namespace dvblinkremote;
+ using namespace dvblinkremoteserialization;
+
++Schedule::Schedule()
++{
++
++}
++
+ Schedule::Schedule(const DVBLinkScheduleType scheduleType, const std::string& channelId, const int recordingsToKeep)
+ : m_scheduleType(scheduleType),
+ m_channelId(channelId),
+@@ -137,8 +142,19 @@ std::string& EpgSchedule::GetProgramID()
+ return m_programId;
+ }
+
++AddScheduleRequest::AddScheduleRequest()
++{
++
++}
++
++AddScheduleRequest::~AddScheduleRequest()
++{
++
++}
++
++
+ AddManualScheduleRequest::AddManualScheduleRequest(const std::string& channelId, const long startTime, const long duration, const long dayMask, const std::string& title)
+- : ManualSchedule(channelId, startTime, duration, dayMask, title)
++ : ManualSchedule(channelId, startTime, duration, dayMask, title), AddScheduleRequest(), Schedule(Schedule::SCHEDULE_TYPE_MANUAL, channelId)
+ {
+
+ }
+@@ -149,7 +165,7 @@ AddManualScheduleRequest::~AddManualSche
+ }
+
+ AddScheduleByEpgRequest::AddScheduleByEpgRequest(const std::string& channelId, const std::string& programId, const bool repeat, const bool newOnly, const bool recordSeriesAnytime)
+- : EpgSchedule(channelId, programId, repeat, newOnly, recordSeriesAnytime)
++ : EpgSchedule(channelId, programId, repeat, newOnly, recordSeriesAnytime), AddScheduleRequest(), Schedule(Schedule::SCHEDULE_TYPE_BY_EPG, channelId)
+ {
+
+ }
+@@ -240,7 +256,7 @@ bool GetSchedulesRequestSerializer::Writ
+ }
+
+ StoredManualSchedule::StoredManualSchedule(const std::string& id, const std::string& channelId, const long startTime, const long duration, const long dayMask, const std::string& title)
+- : ManualSchedule(id, channelId, startTime, duration, dayMask, title)
++ : ManualSchedule(id, channelId, startTime, duration, dayMask, title), Schedule(Schedule::SCHEDULE_TYPE_MANUAL,id, channelId)
+ {
+
+ }
+@@ -257,7 +273,7 @@ StoredManualScheduleList::~StoredManualS
+ }
+
+ StoredEpgSchedule::StoredEpgSchedule(const std::string& id, const std::string& channelId, const std::string& programId, const bool repeat, const bool newOnly, const bool recordSeriesAnytime)
+- : EpgSchedule(id, channelId, programId, repeat, newOnly, recordSeriesAnytime)
++ : EpgSchedule(id, channelId, programId, repeat, newOnly, recordSeriesAnytime), Schedule(Schedule::SCHEDULE_TYPE_BY_EPG,id, channelId)
+ {
+
+ }
+diff -up ./libdvblinkremote/src/scheduling.h.orig ./libdvblinkremote/src/scheduling.h
+--- ./libdvblinkremote/src/scheduling.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/scheduling.h 2014-03-23 13:06:34.769000000 +0100
+@@ -103,7 +103,15 @@ namespace dvblinkremote {
+ */
+ DVBLinkScheduleType& GetScheduleType();
+
++ protected:
++
++ /**
++ * Protected constructor used to solve diamond problem in adding schedules
++ */
++ Schedule();
++
+ private:
++
+ /**
+ * The identifier for the schedule.
+ */
+@@ -119,11 +127,11 @@ namespace dvblinkremote {
+ */
+ DVBLinkScheduleType m_scheduleType;
+ };
+-
++
+ /**
+ * Abstract base class for manual schedules.
+ */
+- class ManualSchedule : public Schedule
++ class ManualSchedule : public virtual Schedule
+ {
+ public:
+ /**
+@@ -214,7 +222,7 @@ namespace dvblinkremote {
+ /**
+ * Abstract base class for electronic program guide (EPG) schedules.
+ */
+- class EpgSchedule : public Schedule
++ class EpgSchedule : public virtual Schedule
+ {
+ public:
+ /**
diff --git a/dvblinkremote-0.2.0-curl.patch b/dvblinkremote-0.2.0-curl.patch
new file mode 100644
index 0000000..8547f7c
--- /dev/null
+++ b/dvblinkremote-0.2.0-curl.patch
@@ -0,0 +1,24 @@
+diff -up ./CMakeLists.txt.orig ./CMakeLists.txt
+--- ./CMakeLists.txt.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./CMakeLists.txt 2014-03-24 00:01:08.589000000 +0100
+@@ -41,7 +41,7 @@ IF(WITH_CURL)
+ FIND_PACKAGE(CURL REQUIRED)
+ ADD_LIBRARY(CURL SHARED IMPORTED)
+ SET_PROPERTY(TARGET CURL PROPERTY IMPORTED_LOCATION "${CURL_DLL}")
+- SET_PROPERTY(TARGET CURL PROPERTY IMPORTED_IMPLIB "${CURL_LIBRARY}")
++ SET_PROPERTY(TARGET CURL PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}")
+ ENDIF()
+
+ FIND_PACKAGE(TINYXML2 REQUIRED)
+diff -up ./dvblinkremote/src/CMakeLists.txt.orig ./dvblinkremote/src/CMakeLists.txt
+--- ./dvblinkremote/src/CMakeLists.txt.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./dvblinkremote/src/CMakeLists.txt 2014-03-24 00:03:11.504000000 +0100
+@@ -34,8 +34,6 @@ SET_TARGET_PROPERTIES(${DVBLINKREMOTE_EX
+ SOVERSION ${LIBDVBLINKREMOTE_VERSION}
+ )
+
+-INSTALL(FILES ${CURL_DLL} DESTINATION ${DVBLINKREMOTE_BIN_DIR})
+-
+ TARGET_LINK_LIBRARIES(${DVBLINKREMOTE_EXE_NAME} ${DVBLINKREMOTE_LIBRARY_NAME})
+
+ # install
diff --git a/dvblinkremote-0.2.0-install.patch b/dvblinkremote-0.2.0-install.patch
new file mode 100644
index 0000000..80dbb7f
--- /dev/null
+++ b/dvblinkremote-0.2.0-install.patch
@@ -0,0 +1,46 @@
+diff -up ./CMakeLists.txt.orig ./CMakeLists.txt
+--- ./CMakeLists.txt.orig 2014-03-24 01:05:47.818000000 +0100
++++ ./CMakeLists.txt 2014-03-24 01:06:05.065000000 +0100
+@@ -125,10 +125,6 @@ ADD_SUBDIRECTORY(libdvblinkremote)
+ ADD_SUBDIRECTORY(doc)
+
+ #############################################################
+-# install license file
+-INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" DESTINATION .)
+-
+-#############################################################
+ # Enable packaging
+
+ SET(CPACK_GENERATOR "ZIP")
+diff -up ./dvblinkremote/src/CMakeLists.txt.orig ./dvblinkremote/src/CMakeLists.txt
+--- ./dvblinkremote/src/CMakeLists.txt.orig 2014-03-24 01:05:47.819000000 +0100
++++ ./dvblinkremote/src/CMakeLists.txt 2014-03-24 01:10:22.903000000 +0100
+@@ -29,11 +29,6 @@ INCLUDE_DIRECTORIES(
+
+ ADD_EXECUTABLE(${DVBLINKREMOTE_EXE_NAME} ${DVBLINKREMOTE_SOURCES} ${DVBLINKREMOTE_HEADERS} ${LIBDVBLINKREMOTE_PUBL_HEADERS})
+
+-SET_TARGET_PROPERTIES(${DVBLINKREMOTE_EXE_NAME} PROPERTIES
+- VERSION ${LIBDVBLINKREMOTE_VERSION}
+- SOVERSION ${LIBDVBLINKREMOTE_VERSION}
+-)
+-
+ TARGET_LINK_LIBRARIES(${DVBLINKREMOTE_EXE_NAME} ${DVBLINKREMOTE_LIBRARY_NAME})
+
+ # install
+diff -up ./libdvblinkremote/src/CMakeLists.txt.orig ./libdvblinkremote/src/CMakeLists.txt
+--- ./libdvblinkremote/src/CMakeLists.txt.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/CMakeLists.txt 2014-03-24 01:14:28.035000000 +0100
+@@ -91,6 +91,7 @@ IF(WITH_CURL AND CURL_FOUND)
+ IMPORTED_LINK_DEPENDENT_LIBRARIES ${CURL_LIBRARY}
+ IMPORTED_IMPLIB ${CURL_LIBRARY}
+ LINK_INTERFACE_LIBRARIES ${CURL_LIBRARY}
++ PREFIX ""
+ )
+ ELSE()
+ SET_TARGET_PROPERTIES(${DVBLINKREMOTE_LIBRARY_NAME} PROPERTIES
+@@ -110,4 +111,3 @@ ENDIF()
+ # install
+
+ INSTALL(TARGETS ${DVBLINKREMOTE_LIBRARY_NAME} DESTINATION ${DVBLINKREMOTE_LIB_DIR} EXPORT libdvblinkremote-targets)
+-install(EXPORT libdvblinkremote-targets DESTINATION ${DVBLINKREMOTE_LIB_DIR})
+\ Pas de fin de ligne à la fin du fichier
diff --git a/dvblinkremote-0.2.0-shared_library.patch b/dvblinkremote-0.2.0-shared_library.patch
new file mode 100644
index 0000000..74c7961
--- /dev/null
+++ b/dvblinkremote-0.2.0-shared_library.patch
@@ -0,0 +1,12 @@
+diff -up ./libdvblinkremote/src/CMakeLists.txt.orig ./libdvblinkremote/src/CMakeLists.txt
+--- ./libdvblinkremote/src/CMakeLists.txt.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/CMakeLists.txt 2014-03-24 02:58:58.359000000 +0100
+@@ -81,7 +81,7 @@ INCLUDE_DIRECTORIES(
+ #############################################################
+ # dvblinkremote library
+
+-ADD_LIBRARY(${DVBLINKREMOTE_LIBRARY_NAME} STATIC ${LIBDVBLINKREMOTE_SOURCES} ${LIBDVBLINKREMOTE_PUBL_HEADERS} ${LIBDVBLINKREMOTE_INT_HEADERS})
++ADD_LIBRARY(${DVBLINKREMOTE_LIBRARY_NAME} SHARED ${LIBDVBLINKREMOTE_SOURCES} ${LIBDVBLINKREMOTE_PUBL_HEADERS} ${LIBDVBLINKREMOTE_INT_HEADERS})
+
+ IF(WITH_CURL AND CURL_FOUND)
+ SET_TARGET_PROPERTIES(${DVBLINKREMOTE_LIBRARY_NAME} PROPERTIES
diff --git a/dvblinkremote-0.2.0-tinyxml2.patch b/dvblinkremote-0.2.0-tinyxml2.patch
new file mode 100644
index 0000000..ee6539e
--- /dev/null
+++ b/dvblinkremote-0.2.0-tinyxml2.patch
@@ -0,0 +1,50 @@
+diff -up ./cmake/FindTINYXML2.cmake.orig ./cmake/FindTINYXML2.cmake
+--- ./cmake/FindTINYXML2.cmake.orig 2014-03-23 12:50:21.247000000 +0100
++++ ./cmake/FindTINYXML2.cmake 2014-03-23 12:46:30.980000000 +0100
+@@ -0,0 +1,15 @@
++# - Find the tinyxml2 includes and library
++# This module defines
++# TINYXML2_INCLUDE_DIR, where to find tinyxml.h, etc.
++# TINYXML2_LIBRARY, the libraries required to use tinyxml2.
++# TINYXML2_FOUND, If false, do not try to use tinyxml2.
++
++FIND_PATH(TINYXML2_INCLUDE_DIR tinyxml2.h)
++FIND_LIBRARY(TINYXML2_LIBRARY NAMES tinyxml2)
++
++# handle the QUIETLY and REQUIRED arguments and set TINYXML2_FOUND to TRUE if
++# all listed variables are TRUE
++INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(TINYXML2 DEFAULT_MSG TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR)
++
++MARK_AS_ADVANCED(TINYXML2_INCLUDE_DIR TINYXML2_LIBRARY)
+diff -up ./libdvblinkremote/src/util.h.orig ./libdvblinkremote/src/util.h
+--- ./libdvblinkremote/src/util.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/util.h 2014-03-23 12:47:30.472000000 +0100
+@@ -27,7 +27,7 @@
+ #include <sstream>
+ #include <iostream>
+ #include <cstdio>
+-#include "tinyxml2/tinyxml2.h"
++#include "tinyxml2.h"
+
+ namespace dvblinkremote {
+ class Util {
+@@ -53,4 +53,4 @@ namespace dvblinkremote {
+ template <class T> static bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&));
+ template <class T> static bool to_string(const T& t, std::string& s);
+ };
+-}
+\ Pas de fin de ligne à la fin du fichier
++}
+diff -up ./libdvblinkremote/src/xml_object_serializer.h.orig ./libdvblinkremote/src/xml_object_serializer.h
+--- ./libdvblinkremote/src/xml_object_serializer.h.orig 2012-10-22 01:07:36.000000000 +0200
++++ ./libdvblinkremote/src/xml_object_serializer.h 2014-03-23 12:47:23.929000000 +0100
+@@ -30,7 +30,7 @@
+ #include "request.h"
+ #include "response.h"
+ #include "util.h"
+-#include "tinyxml2/tinyxml2.h"
++#include "tinyxml2.h"
+
+ using namespace dvblinkremote;
+
diff --git a/dvblinkremote.spec b/dvblinkremote.spec
new file mode 100644
index 0000000..0fb4e4b
--- /dev/null
+++ b/dvblinkremote.spec
@@ -0,0 +1,94 @@
+%global prerelease beta
+
+Name: dvblinkremote
+Version: 0.2.0
+Release: 0.1.%{prerelease}%{?dist}
+Summary: Tool for interacting with a DVBLink Connect! Server
+
+Group: Applications/Multimedia
+License: MIT
+URL: https://github.com/marefr/dvblinkremote
+Source0: https://github.com/marefr/%{name}/archive/v%{version}-%{prerelease}/%{name}-%{version}-%{prerelease}.tar.gz
+# Fix build with tinyxml2
+Patch0: %{name}-0.2.0-tinyxml2.patch
+# Fix build with libcurl
+Patch1: %{name}-0.2.0-curl.patch
+# Fix compilation issues on Linux with recent gcc versions (see
+# https://github.com/marefr/dvblinkremote/commit/b32af4a)
+Patch2: %{name}-0.2.0-build.patch
+# Build a shared library instead of a static one
+Patch3: %{name}-0.2.0-shared_library.patch
+# Fix installation
+Patch4: %{name}-0.2.0-install.patch
+
+BuildRequires: cmake
+BuildRequires: libcurl-devel
+BuildRequires: tinyxml2-devel
+
+%description
+A command line tool for interacting with a DVBLink Connect! Server using the
+DVBLink Remote API.
+
+
+%package libs
+Summary: Pure C++ DVBLink Remote API library
+Group: System Environment/Libraries
+%description libs
+libdvblinkremote is a pure C++ DVBLink Remote API static library. It currently
+supports DVBLink Remote API version 0.2.
+
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+Requires: libcurl-devel%{?_isa}
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use libdvblinkremote.
+
+
+%prep
+%setup -q -n %{name}-%{version}-%{prerelease}
+%patch0 -p0 -b .tinyxml2
+%patch1 -p1 -b .curl
+%patch2 -p1 -b .build
+%patch3 -p1 -b .shared_library
+%patch4 -p1 -b .install
+
+
+%build
+%cmake . \
+ -DDVBLINKREMOTE_BIN_DIR=%{_bindir} \
+ -DDVBLINKREMOTE_INCLUDE_DIR=%{_includedir}/lib%{name} \
+ -DDVBLINKREMOTE_LIB_DIR=%{_libdir}
+make %{?_smp_mflags}
+
+
+%install
+%make_install
+
+
+%post libs -p /sbin/ldconfig
+
+
+%postun libs -p /sbin/ldconfig
+
+
+%files
+%{_bindir}/%{name}
+
+
+%files libs
+%doc COPYING README.md
+%{_libdir}/*.so.*
+
+
+%files devel
+%{_includedir}/lib%{name}/
+%{_libdir}/*.so
+
+
+%changelog
+* Tue Mar 25 2014 Mohamed El Morabity <melmorabity at fedoraproject.org> - 0.2.0-0.1.beta
+- Initial RPM release
diff --git a/sources b/sources
index e69de29..f4c96a4 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+8bcac1a9a8d8d407f84c1aa1a0f7e9b2 dvblinkremote-0.2.0-beta.tar.gz
More information about the scm-commits
mailing list