[cppmyth/f21] First import

Mohamed ElMorabity melmorabity at fedoraproject.org
Thu Jan 1 23:16:44 UTC 2015


commit b6b453d625ef29ea8eb32744c49d7b02b8e4d1aa
Author: Mohamed El Morabity <melmorabity at fedoraproject.org>
Date:   Fri Jan 2 00:13:53 2015 +0100

    First import

 .gitignore                               |    1 +
 cppmyth-1.1.0-flags.patch                |   42 ++++++++++++++++
 cppmyth-1.1.0-use_external_jansson.patch |   77 ++++++++++++++++++++++++++++++
 cppmyth.spec                             |   75 +++++++++++++++++++++++++++++
 sources                                  |    1 +
 5 files changed, 196 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..9103286 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cppmyth-1.1.0.2.tar.gz
diff --git a/cppmyth-1.1.0-flags.patch b/cppmyth-1.1.0-flags.patch
new file mode 100644
index 0000000..ae1fa7b
--- /dev/null
+++ b/cppmyth-1.1.0-flags.patch
@@ -0,0 +1,42 @@
+diff -up ./cppmyth/CMakeLists.txt.orig ./cppmyth/CMakeLists.txt
+--- ./cppmyth/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./cppmyth/CMakeLists.txt	2014-12-24 21:30:47.899428637 +0100
+@@ -29,8 +29,8 @@ if (MSVC)
+ endif ()
+ 
+ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+-   set (CMAKE_C_FLAGS "-fPIC")
+-   set (CMAKE_CXX_FLAGS "-fPIC")
++   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ endif ()
+ 
+ ###############################################################################
+diff -up ./demo/CMakeLists.txt.orig ./demo/CMakeLists.txt
+--- ./demo/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./demo/CMakeLists.txt	2014-12-24 21:31:16.025634705 +0100
+@@ -22,8 +22,8 @@ if (MSVC)
+ endif (MSVC)
+ 
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+-   set(CMAKE_C_FLAGS "-fPIC")
+-   set(CMAKE_CXX_FLAGS "-fPIC")
++   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ 
+ ###############################################################################
+diff -up ./test/CMakeLists.txt.orig ./test/CMakeLists.txt
+--- ./test/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./test/CMakeLists.txt	2014-12-24 21:31:04.106971140 +0100
+@@ -22,8 +22,8 @@ if (MSVC)
+ endif (MSVC)
+ 
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+-   set(CMAKE_C_FLAGS "-fPIC")
+-   set(CMAKE_CXX_FLAGS "-fPIC")
++   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ 
+ ###############################################################################
diff --git a/cppmyth-1.1.0-use_external_jansson.patch b/cppmyth-1.1.0-use_external_jansson.patch
new file mode 100644
index 0000000..e2c0175
--- /dev/null
+++ b/cppmyth-1.1.0-use_external_jansson.patch
@@ -0,0 +1,77 @@
+diff -up ./CMakeLists.txt.orig ./CMakeLists.txt
+--- ./CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./CMakeLists.txt	2014-12-24 21:14:34.988887636 +0100
+@@ -1,10 +1,16 @@
+ cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
+ cmake_policy (VERSION 2.6)
++
++find_package(PkgConfig REQUIRED)
++pkg_search_module(JANSSON REQUIRED jansson)
++include_directories(${JANSSON_INCLUDE_DIRS})
++add_definitions(${JANSSON_CFLAGS_OTHER})
++link_directories(${JANSSON_LIBRARY_DIRS})
++
+ #
+ # Every module has a CMakeLists.txt in it's root. As we saw, those files
+ # provide the necessary directions to build each module.
+ set (MODULES
+-  ${CMAKE_SOURCE_DIR}/jansson
+   ${CMAKE_SOURCE_DIR}/cppmyth
+   ${CMAKE_SOURCE_DIR}/test
+   ${CMAKE_SOURCE_DIR}/demo)
+diff -up ./cppmyth/CMakeLists.txt.orig ./cppmyth/CMakeLists.txt
+--- ./cppmyth/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./cppmyth/CMakeLists.txt	2014-12-24 21:15:56.459591761 +0100
+@@ -147,7 +147,7 @@ set (CPPMYTH_SOURCES
+ # add targets
+ if (BUILD_SHARED_LIBS)
+   add_library (cppmyth SHARED ${CPPMYTH_SOURCES})
+-  target_link_libraries (cppmyth pthread jansson)
++  target_link_libraries (cppmyth pthread ${JANSSON_LIBRARIES})
+   set_target_properties (cppmyth PROPERTIES
+     VERSION "${CPPMYTH_LIB_VERSION}"
+     SOVERSION "${CPPMYTH_LIB_SOVERSION}")
+diff -up ./demo/CMakeLists.txt.orig ./demo/CMakeLists.txt
+--- ./demo/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./demo/CMakeLists.txt	2014-12-24 21:16:52.850000000 +0100
+@@ -42,15 +42,15 @@ set(livetvdemo_SOURCES
+ ###############################################################################
+ # add targets
+ add_executable(livetvdemo ${livetvdemo_SOURCES})
+-add_dependencies(livetvdemo cppmyth jansson)
++add_dependencies(livetvdemo cppmyth)
+ if(MSVC)
+   target_link_libraries(livetvdemo cppmyth jansson ws2_32.lib)
+ else(MSVC)
+   find_library(LIBRT rt)
+   if(LIBRT)
+-    target_link_libraries(livetvdemo cppmyth jansson rt pthread)
++    target_link_libraries(livetvdemo cppmyth ${JANSSON_LIBRARIES} rt pthread)
+   else(LIBRT)
+-    target_link_libraries(livetvdemo cppmyth jansson pthread)
++    target_link_libraries(livetvdemo cppmyth ${JANSSON_LIBRARIES} pthread)
+   endif(LIBRT)
+ endif(MSVC)
+ 
+diff -up ./test/CMakeLists.txt.orig ./test/CMakeLists.txt
+--- ./test/CMakeLists.txt.orig	2014-12-10 19:20:51.000000000 +0100
++++ ./test/CMakeLists.txt	2014-12-24 21:16:31.218610600 +0100
+@@ -42,15 +42,15 @@ set(CPPMYTHTEST_SOURCES
+ ###############################################################################
+ # add targets
+ add_executable(cppmythtest ${CPPMYTHTEST_SOURCES})
+-add_dependencies(cppmythtest cppmyth jansson)
++add_dependencies(cppmythtest cppmyth)
+ if(MSVC)
+   target_link_libraries(cppmythtest cppmyth jansson ws2_32.lib)
+ else(MSVC)
+   find_library(LIBRT rt)
+   if(LIBRT)
+-    target_link_libraries(cppmythtest cppmyth jansson rt pthread)
++    target_link_libraries(cppmythtest cppmyth ${JANSSON_LIBRARIES} rt pthread)
+   else(LIBRT)
+-    target_link_libraries(cppmythtest cppmyth jansson pthread)
++    target_link_libraries(cppmythtest cppmyth ${JANSSON_LIBRARIES} pthread)
+   endif(LIBRT)
+ endif(MSVC)
+ 
diff --git a/cppmyth.spec b/cppmyth.spec
new file mode 100644
index 0000000..55993d6
--- /dev/null
+++ b/cppmyth.spec
@@ -0,0 +1,75 @@
+Name:           cppmyth
+Version:        1.1.0.2
+Release:        2%{?dist}
+Summary:        Client interface for the MythTV backend
+
+Group:          System Environment/Libraries
+License:        GPLv2+
+URL:            https://github.com/janbar/cppmyth/
+Source0:        https://github.com/janbar/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Use system jansson library
+Patch0:         %{name}-1.1.0-use_external_jansson.patch
+# Fix compilation flags
+Patch1:         %{name}-1.1.0-flags.patch
+
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(jansson)
+
+%description
+This project is intended to create a easy client interface for the MythTV
+backend. Its development started from January 2014 and today the API supports
+the protocol version of MythTV 0.26 to 0.28-pre.
+
+
+%package        devel
+Summary:        Development files for %{name}
+Group:          Development/Libraries
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description    devel
+The %{name}-devel package contains libraries and header files for developing
+applications that use %{name}.
+
+
+%prep
+%setup -q
+%patch0 -p0 -b .use_external_jansson
+%patch1 -p0 -b .flags
+
+# Delete bundled library jansson
+rm -r jansson/
+
+
+%build
+%cmake . -DCMAKE_INSTALL_LIBDIR=%{_lib}
+make %{?_smp_mflags}
+
+
+%install
+%make_install
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc README
+%{_libdir}/*.so.*
+
+
+%files devel
+%{_includedir}/%{name}/
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/%{name}.pc
+
+
+%changelog
+* Tue Dec 30 2014 Mohamed El Morabity <melmorabity at fedoraproject.org> - 1.1.0.2-2
+- Fix License tag
+- Fix misspelling in Description
+
+* Wed Dec 24 2014 Mohamed El Morabity <melmorabity at fedoraproject.org> - 1.1.0.2-1
+- Initial RPM release
diff --git a/sources b/sources
index e69de29..0187939 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6a511645b07fb029052ae99e3b9a7a6d  cppmyth-1.1.0.2.tar.gz


More information about the scm-commits mailing list