Hi, I had a look packaging libvidstab (based on the work in [1]).
There are two upstream issues (patches attached): * The library is not installed in Multi-Arch directories. * The test program returns 1 upon success. Georg, can you include these patches upstream? I'm also a bit concerned about the soname versioning: Currently the soversion is set to ${MAJOR_VERSION}.${MINOR_VERSION}, i.e. 0.9 or 1.0. This means that there will have to be a transition, whenever the (major/minor) version changes. So if the API/ABI is stable, which it should be, one can end up with versions such as 1.09998. I think it would be better to use a separate soversion, starting with 0 and only incrementing it, when the API/ABI is broken. Best regards, Andreas 1: https://github.com/rbrito/pkg-libvidstab
>From 8019116661556a800166ee84947f8808feef3086 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> Date: Sun, 26 Apr 2015 20:01:43 +0200 Subject: [PATCH 1/2] use GNUInstallDirs for automatic Multi-Arch support --- CMakeLists.txt | 13 +++++++++---- CMakeModules/create_pkgconfig_file.cmake | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9a2af4..256663c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,11 @@ set(HEADERS src/frameinfo.h src/transformtype.h src/libvidstab.h src/transform.h src/motiondetect.h src/serialize.h src/localmotion2transform.h src/boxblur.h src/vsvector.h ) +# Installation paths +include(GNUInstallDirs) +set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING "Relative installation path for binaries.") +set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Relative installation path for libraries.") +set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "Relative installation path for headers.") # Create the vidstab library add_library (vidstab ${SOURCES}) @@ -63,13 +68,13 @@ endif() #if(!NOHEADERS) FILE(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h") -INSTALL(FILES ${HEADERS} DESTINATION include/vid.stab) +INSTALL(FILES ${HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/vid.stab) #endif() INSTALL(TARGETS vidstab - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib${LIB_SUFFIX} - ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ) include(create_pkgconfig_file) diff --git a/CMakeModules/create_pkgconfig_file.cmake b/CMakeModules/create_pkgconfig_file.cmake index da31712..3c8fd10 100644 --- a/CMakeModules/create_pkgconfig_file.cmake +++ b/CMakeModules/create_pkgconfig_file.cmake @@ -10,8 +10,8 @@ macro (create_pkgconfig_file name desc) file(WRITE "${_pkgfname}" "# file generated by vid.stab cmake build prefix=${CMAKE_INSTALL_PREFIX} -libdir=\${prefix}/lib${LIB_SUFFIX} -includedir=\${prefix}/include +libdir=\${prefix}/${LIB_INSTALL_DIR} +includedir=\${prefix}/${INCLUDE_INSTALL_DIR} Name: ${name} Description: ${desc} @@ -21,5 +21,5 @@ Cflags: -I\${includedir} ") - install(FILES ${_pkgfname} DESTINATION lib${LIB_SUFFIX}/pkgconfig) -endmacro() \ No newline at end of file + install(FILES ${_pkgfname} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +endmacro() -- 2.1.4
>From 55653d91626d7617a43dc9870380b41f2e4b5ccb Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> Date: Sun, 26 Apr 2015 20:05:40 +0200 Subject: [PATCH 2/2] tests: return 0 upon success --- tests/testframework.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testframework.c b/tests/testframework.c index a38851c..a889560 100644 --- a/tests/testframework.c +++ b/tests/testframework.c @@ -36,7 +36,7 @@ int unittest_summary(){ fprintf(stderr, "UNIT TESTs succeeded:\t %s%i/%i\033[0m\n", units_failed>0 ? "\033[1;31m" : "\033[1;32m", units_success, units_success + units_failed); - return units_failed==0; + return units_failed!=0; } -- 2.1.4