Added Install fixes to branch, .pc generation now correct. Ubuntu natty 32-bit build now fixed.

ranzbak [2011-05-09 18:06]
Added Install fixes to branch, .pc generation now correct. Ubuntu natty 32-bit build now fixed.

git-svn-id: https://old.setv.nl/svn/swarmtv@314 88541080-9ad6-de11-9093-5254007c1f44
Filename
branches/qtswarmtv-episodes/seasonepisodewidget.cpp
branches/qtswarmtv-episodes/seasonepisodewidget.ui
branches/swarmtv-installfix/cmake_modules/FindGLIB2.cmake
branches/swarmtv-installfix/libswarmtv/CMakeLists.txt
branches/swarmtv-installfix/libswarmtv/createpc.sh
branches/swarmtv-installfix/shellfront/CMakeLists.txt
diff --git a/branches/qtswarmtv-episodes/seasonepisodewidget.cpp b/branches/qtswarmtv-episodes/seasonepisodewidget.cpp
index 7d1d075..768fcb6 100644
--- a/branches/qtswarmtv-episodes/seasonepisodewidget.cpp
+++ b/branches/qtswarmtv-episodes/seasonepisodewidget.cpp
@@ -57,9 +57,6 @@ void seasonEpisodeWidget::setSeriesId(int id)

 void seasonEpisodeWidget::retrieveEpisodeData()
 {
-  //int rc=0;
-  //tvdb_buffer_t buf;
-  //tvdb_list_front_t seriesInfo;

   // Disable the tree view to show we are searching
   ui->treeWidget->setDisabled(true);
@@ -76,31 +73,6 @@ void seasonEpisodeWidget::retrieveEpisodeData()

   // start taskqueue
   tc.start();
-
-#if 0
-  // Initialize structs
-  memset(&buf, 0, sizeof(tvdb_buffer_t));
-
-
-  // Execute query
-  rc = tvdb_series_info(tvdb, seriesId, "en", &buf);
-  if(rc != TVDB_OK){
-    qDebug() << "tvdb_series_info returned not okay.";
-    return;
-  }
-
-  // Parse the XML data
-  rc = tvdb_parse_series_info(&buf, "", &seriesInfo);
-  if(rc != TVDB_OK){
-    qDebug() << "tvdb_parse_series_info returned not okay.";
-  }
-
-  // Add the data to the ListView
-  fillListView(&seriesInfo);
-
-  // Detroy the tvdb instance
-  tvdb_list_remove(&seriesInfo);
-#endif
 }

 void seasonEpisodeWidget::seriesResults(tvdb_buffer_t *series_xml)
diff --git a/branches/qtswarmtv-episodes/seasonepisodewidget.ui b/branches/qtswarmtv-episodes/seasonepisodewidget.ui
index a4f50da..2a45cc8 100644
--- a/branches/qtswarmtv-episodes/seasonepisodewidget.ui
+++ b/branches/qtswarmtv-episodes/seasonepisodewidget.ui
@@ -53,7 +53,7 @@
        <item>
         <widget class="QPushButton" name="OkPushButton">
          <property name="text">
-          <string>ok</string>
+          <string>Ok</string>
          </property>
         </widget>
        </item>
diff --git a/branches/swarmtv-installfix/cmake_modules/FindGLIB2.cmake b/branches/swarmtv-installfix/cmake_modules/FindGLIB2.cmake
index 71a040d..9fa16ea 100644
--- a/branches/swarmtv-installfix/cmake_modules/FindGLIB2.cmake
+++ b/branches/swarmtv-installfix/cmake_modules/FindGLIB2.cmake
@@ -49,6 +49,7 @@ else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS AND GLIB2_PUBLIC_LINK_FLAGS)
       /usr/lib64/glib-2.0/include
       /usr/lib/glib-2.0/include
       /usr/lib/x86_64-linux-gnu/glib-2.0/include
+      /usr/lib/i386-linux-gnu/glib-2.0/include
       /include
   )

diff --git a/branches/swarmtv-installfix/libswarmtv/CMakeLists.txt b/branches/swarmtv-installfix/libswarmtv/CMakeLists.txt
index 23b7b1c..62f597d 100644
--- a/branches/swarmtv-installfix/libswarmtv/CMakeLists.txt
+++ b/branches/swarmtv-installfix/libswarmtv/CMakeLists.txt
@@ -75,7 +75,8 @@ SET_TARGET_PROPERTIES(swarmtv
 		SOVERSION 1)

 # Generating pkg-config file
-EXEC_PROGRAM( libswarmtv/createpc.sh ARGS ${CMAKE_INSTALL_PREFIX} )
+# create .pc file <install base path> <template path> <destination path>
+EXEC_PROGRAM( ${CMAKE_CURRENT_SOURCE_DIR}/createpc.sh ARGS ${CMAKE_INSTALL_PREFIX} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})

 # Create libtool .la file
 CREATE_LIBTOOL_FILE(swarmtv /lib)
diff --git a/branches/swarmtv-installfix/libswarmtv/createpc.sh b/branches/swarmtv-installfix/libswarmtv/createpc.sh
index a90ce62..be53b26 100755
--- a/branches/swarmtv-installfix/libswarmtv/createpc.sh
+++ b/branches/swarmtv-installfix/libswarmtv/createpc.sh
@@ -1,3 +1,4 @@
 #!/usr/bin/env bash

-cat libswarmtv/libswarmtv.pc.template | sed "s|@PREFIX@|${1}|" > libswarmtv.pc
+#cat libswarmtv/libswarmtv.pc.template | sed "s|@PREFIX@|${1}|" > libswarmtv.pc
+cat ${2}/libswarmtv.pc.template | sed "s|@PREFIX@|${1}|" > ${3}/libswarmtv.pc
diff --git a/branches/swarmtv-installfix/shellfront/CMakeLists.txt b/branches/swarmtv-installfix/shellfront/CMakeLists.txt
index 8730d07..caef4ad 100644
--- a/branches/swarmtv-installfix/shellfront/CMakeLists.txt
+++ b/branches/swarmtv-installfix/shellfront/CMakeLists.txt
@@ -46,10 +46,10 @@ endif (UNIX AND NOT WIN32)
 IF(DEBUG_ENABLE)
   add_definitions(-g)
 ENDIF()
-include_directories(. ${RSSTORRENT_BASE_DIR}/libswarmtv)
+include_directories(. ${CMAKE_CURRENT_SOURCE_DIR}/../libswarmtv)

 # Make sure the linker can find the Hello library once it is built.
-link_directories (${RSSTORRENT_BASE_DIR}/libswarmtv)
+link_directories (${CMAKE_CURRENT_BINARY_DIR}/../libswarmtv)

 # Add the sources to be build
 SET(SRC swarmtv handleopts present frontfuncts daemonize simplewizard runloop xmlencode)
@@ -65,13 +65,13 @@ IF(DBUSGLIB_FOUND)
 ENDIF(DBUSGLIB_FOUND)

 # Add manpage
-SET(RSS_SRC man/swarmtv.1)
-SET(RSS_MAN man/swarmtv.1.gz)
+SET(RSS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/man/swarmtv.1)
+SET(RSS_MAN ${CMAKE_CURRENT_SOURCE_DIR}/man/swarmtv.1.gz)

 # Compression of the manuals
 FOREACH(man ${RSS_SRC})
   ADD_CUSTOM_COMMAND(OUTPUT ${man}.gz
-      COMMAND gzip -c ${man} > ${man}.gz
+      COMMAND gzip --best -c ${man} > ${man}.gz
       DEPENDS ${man}
       COMMENT
       "Building
@@ -90,7 +90,7 @@ SET_TARGET_PROPERTIES(swarmtv_exec PROPERTIES OUTPUT_NAME "swarmtv")
 if (UNIX AND NOT WIN32)
 	TARGET_LINK_LIBRARIES(swarmtv_exec ${optionalLibs} libswarmtv.so )
 	# We install to /usr/local/bin
-	INSTALL(PROGRAMS swarmtv DESTINATION /usr/local/bin)
+	INSTALL(TARGETS swarmtv_exec DESTINATION bin)
 else (WIN32)
 	TARGET_LINK_LIBRARIES(swarmtv_exec ${optionalLibs} libswarmtv.dll )
 	INSTALL(PROGRAMS swarmtv.exe DESTINATION C:\\Program\ Files\\swarmtv)