From 1649082dabef075d6c3ffaf5c46d9bb46c87e744 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 5 Mar 2013 18:24:49 +0100 Subject: Trying to improve dexela plugin packaging. --- CMakeLists.txt | 11 +++++----- plugins/dexela/.swp.CMakeLists.txt | Bin 0 -> 129 bytes plugins/dexela/CMakeLists.txt | 12 +++++++++++ plugins/dexela/libucadexela.so | Bin 0 -> 18705 bytes plugins/dexela/ucadexela.spec.in | 43 +++++++++++++++++++++++++++++++++++++ plugins/mock/libucamock.so | Bin 0 -> 18045 bytes plugins/package-plugin.sh.in | 2 +- 7 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 plugins/dexela/.swp.CMakeLists.txt create mode 100755 plugins/dexela/libucadexela.so create mode 100644 plugins/dexela/ucadexela.spec.in create mode 100755 plugins/mock/libucamock.so diff --git a/CMakeLists.txt b/CMakeLists.txt index 299cec2..443f33c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,19 +10,20 @@ set(UCA_DESCRIPTION "Unified Camera Access") set(UCA_VERSION_STRING "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}") set(UCA_ABI_VERSION "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}") -set(PACKAGE_VERSION "${UCA_VERSION_STRING}") -set(PACKAGE_NAME "${TARNAME}") +set(CPACK_PACKAGE_VERSION "${UCA_VERSION_STRING}") +set(CPACK_PACKAGE_NAME "${TARNAME}") set(PACKAGE_TARNAME "${TARNAME}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") -set(CPACK_GENERATOR "RPM") +set(CPACK_GENERATOR "DEB;RPM") set(CPACK_PACKAGE_RELEASE 3) -set(CPACK_DEBIAN_PACKAGE_NAME "libuca") +set(CPACK_RPM_PACKAGE_RELEASE 3) +set(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Vogelgesang ") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${UCA_DESCRIPTION}) set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY ${UCA_DESCRIPTION}) -set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") diff --git a/plugins/dexela/.swp.CMakeLists.txt b/plugins/dexela/.swp.CMakeLists.txt new file mode 100644 index 0000000..610f745 Binary files /dev/null and b/plugins/dexela/.swp.CMakeLists.txt differ diff --git a/plugins/dexela/CMakeLists.txt b/plugins/dexela/CMakeLists.txt index 8522192..03ff968 100644 --- a/plugins/dexela/CMakeLists.txt +++ b/plugins/dexela/CMakeLists.txt @@ -1,11 +1,23 @@ cmake_minimum_required(VERSION 2.8) project(ucadexela C) +set(VERSION "1.0.0") find_package(DEXELA) if (DEXELA_FOUND) set(UCA_CAMERA_NAME "dexela") + set(PLUGIN_SPECIFIC_FLAGS "-D CMAKE_CURRENT_BINARY_DIR=`pwd` -D CPACK_RPM_USER_BINARY_SPECFILE=${CMAKE_CURRENT_BINARY_DIR}/ucadexela.spec") + set(CPACK_PACKAGE_VERSION ${VERSION}) + set(CPACK_GENERATOR "RPM") + set(CPACK_PACKAGE_NAME "uca-plugin-dexela") + set(CPACK_PACKAGE_RELEASE 1) + set(CPACK_PACKAGE_CONTACT "Mihael Koep") + set(CPACK_PACKAGE_VENDOR "ANKA Computing Group") + set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ucadexela.spec.in + ${CMAKE_CURRENT_BINARY_DIR}/ucadexela.spec) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) diff --git a/plugins/dexela/libucadexela.so b/plugins/dexela/libucadexela.so new file mode 100755 index 0000000..11070f5 Binary files /dev/null and b/plugins/dexela/libucadexela.so differ diff --git a/plugins/dexela/ucadexela.spec.in b/plugins/dexela/ucadexela.spec.in new file mode 100644 index 0000000..6ca4d3d --- /dev/null +++ b/plugins/dexela/ucadexela.spec.in @@ -0,0 +1,43 @@ +# -*- rpm-spec -*- +Buildroot: $CMAKE_CURRENT_BINARY_DIR/_CPack_Packages/Linux/RPM/@CPACK_PACKAGE_FILE_NAME@ +Summary: Dexela Plugin for libuca +Name: @CPACK_PACKAGE_NAME@ +Version: @CPACK_PACKAGE_VERSION@ +Release: @CPACK_PACKAGE_RELEASE@ +License: GPL +Group: Development/Libraries +Vendor: @CPACK_PACKAGE_VENDOR@ +Prefix: @CPACK_PACKAGING_INSTALL_PREFIX@ +Requires: libuca = @UCA_VERSION_STRING@ + +%define _rpmdir $RPM_BUILD_ROOT +%define _rpmfilename @CPACK_PACKAGE_FILE_NAME@.rpm +%define _unpackaged_files_terminate_build 0 +%define _topdir $CMAKE_CURRENT_BINARY_DIR/_CPack_Packages/Linux/RPM + +%description +Dexela Plugin for libuca + +# This is a shortcutted spec file generated by CMake RPM generator +# we skip _install step because CPack does that for us. +# We do only save CPack installed tree in _prepr +# and then restore it in build. +%prep +echo $RPM_BUILD_ROOT +echo @CMAKE_CURRENT_BINARY_DIR@ +mv $RPM_BUILD_ROOT @CMAKE_CURRENT_BINARY_DIR@/_CPack_Packages/Linux/RPM/tmpBBroot + +%install +if [ -e $RPM_BUILD_ROOT ]; +then + rm -Rf $RPM_BUILD_ROOT +fi +mv "@CMAKE_CURRENT_BINARY_DIR@/_CPack_Packages/Linux/RPM/tmpBBroot" $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +@CPACK_PACKAGING_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/* + +%changelog +* Thu Feb 21 2013 Mihael Koep 1.0.2-1 +- let MCS flush input buffer on startup too diff --git a/plugins/mock/libucamock.so b/plugins/mock/libucamock.so new file mode 100755 index 0000000..5fd342e Binary files /dev/null and b/plugins/mock/libucamock.so differ diff --git a/plugins/package-plugin.sh.in b/plugins/package-plugin.sh.in index c624d52..ea96404 100644 --- a/plugins/package-plugin.sh.in +++ b/plugins/package-plugin.sh.in @@ -1 +1 @@ -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}" +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}" ${PLUGIN_SPECIFIC_FLAGS} -- cgit v1.2.3 From bc7527f2e2c22a0f27c73a4086fe51d12504c826 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 14 Mar 2013 16:51:37 +0100 Subject: Cleanup of dexela plugin build file and package-plugin.sh.in to include sensible metadata information. --- plugins/dexela/.swp.CMakeLists.txt | Bin 129 -> 0 bytes plugins/dexela/CMakeLists.txt | 18 ++++++------------ plugins/dexela/changelog.txt | 2 ++ plugins/package-plugin.sh.in | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 plugins/dexela/.swp.CMakeLists.txt diff --git a/plugins/dexela/.swp.CMakeLists.txt b/plugins/dexela/.swp.CMakeLists.txt deleted file mode 100644 index 610f745..0000000 Binary files a/plugins/dexela/.swp.CMakeLists.txt and /dev/null differ diff --git a/plugins/dexela/CMakeLists.txt b/plugins/dexela/CMakeLists.txt index 60350cf..d98644c 100644 --- a/plugins/dexela/CMakeLists.txt +++ b/plugins/dexela/CMakeLists.txt @@ -6,19 +6,16 @@ find_package(DEXELA) if (DEXELA_FOUND) set(UCA_CAMERA_NAME "dexela") - set(PLUGIN_REVISION "2") + set(PLUGIN_REVISION "3") set(PLUGIN_VERSION "1.0.0") + set(PLUGIN_SUMMARY "Dexela plugin for libuca") set(PLUGIN_CHANGELOG "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt") + set(PLUGIN_DESCRIPTION "Plugin for the Dexela 1207 detector.") set(PLUGIN_REQUIRES "libuca = 1.1.0, libdexela >= 0.9.2") - set(PLUGIN_SPECIFIC_FLAGS - "-D CPACK_PACKAGE_NAME=\"uca-plugin-dexela\" -D CPACK_PACKAGE_VERSION=\"${PLUGIN_VERSION}\" -D CPACK_RPM_PACKAGE_RELEASE=\"${PLUGIN_REVISION}\" -D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG} -D CPACK_RPM_PACKAGE_REQUIRES=${PLUGIN_REQUIRES}") - set(CPACK_PACKAGE_VERSION ${VERSION}) set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_NAME "uca-plugin-dexela") - set(CPACK_PACKAGE_RELEASE 1) - set(CPACK_PACKAGE_CONTACT "Mihael Koep") - set(CPACK_PACKAGE_VENDOR "ANKA Computing Group") + set(PLUGIN_VENDOR "ANKA Computing Group") set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in @@ -26,12 +23,9 @@ if (DEXELA_FOUND) include_directories(${DEXELA_INCLUDE_DIRS}) - add_library(ucadexela SHARED - uca-dexela-camera.c) + add_library(ucadexela SHARED uca-dexela-camera.c) - target_link_libraries(ucadexela - ${UCA_DEPS} - ${DEXELA_LIBRARIES}) + target_link_libraries(ucadexela ${UCA_DEPS} ${DEXELA_LIBRARIES}) install(TARGETS ucadexela LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca diff --git a/plugins/dexela/changelog.txt b/plugins/dexela/changelog.txt index 8b84fa5..2998374 100644 --- a/plugins/dexela/changelog.txt +++ b/plugins/dexela/changelog.txt @@ -1,2 +1,4 @@ +* Thu Mar 14 2013 Mihael Koep 1.0.0-3 +- improve package metadata and build scripts * Thu Mar 7 2013 Mihael Koep 1.0.0-2 - add changelog and improve package metadata diff --git a/plugins/package-plugin.sh.in b/plugins/package-plugin.sh.in index bfd1eb3..796517e 100644 --- a/plugins/package-plugin.sh.in +++ b/plugins/package-plugin.sh.in @@ -1 +1 @@ -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" ${PLUGIN_SPECIFIC_FLAGS} +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_STRING}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" -D CPACK_PACKAGE_NAME="uca-plugin-${UCA_CAMERA_NAME}" -D CPACK_RPM_PACKAGE_SUMMARY="${PLUGIN_SUMMARY}" -D CPACK_PACKAGE_VERSION="${PLUGIN_VERSION}" -D CPACK_RPM_PACKAGE_RELEASE="${PLUGIN_REVISION}" -D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG} -D CPACK_RPM_PACKAGE_REQUIRES="${PLUGIN_REQUIRES}" -D CPACK_RPM_PACKAGE_DESCRIPTION="${PLUGIN_DESCRIPTION}" -D CPACK_RPM_PACKAGE_VENDOR="${PLUGIN_VENDOR}" -- cgit v1.2.3 From 975a9a965f54e7a3461ea5d0d98191199e8f129b Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 19 Mar 2013 12:16:20 +0100 Subject: Build package flags inside package-plugin.sh.in This will use the information provided by each plugin. Conflicts: plugins/dexela/CMakeLists.txt plugins/package-plugin.sh.in --- plugins/dexela/CMakeLists.txt | 6 +----- plugins/mock/CMakeLists.txt | 3 +++ plugins/package-plugin.sh.in | 5 ++++- plugins/pco/CMakeLists.txt | 3 +++ plugins/pf/CMakeLists.txt | 3 +++ plugins/ufo/CMakeLists.txt | 3 +++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/dexela/CMakeLists.txt b/plugins/dexela/CMakeLists.txt index d98644c..e853b53 100644 --- a/plugins/dexela/CMakeLists.txt +++ b/plugins/dexela/CMakeLists.txt @@ -6,17 +6,13 @@ find_package(DEXELA) if (DEXELA_FOUND) set(UCA_CAMERA_NAME "dexela") - set(PLUGIN_REVISION "3") + set(PLUGIN_REVISION "4") set(PLUGIN_VERSION "1.0.0") set(PLUGIN_SUMMARY "Dexela plugin for libuca") set(PLUGIN_CHANGELOG "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt") set(PLUGIN_DESCRIPTION "Plugin for the Dexela 1207 detector.") set(PLUGIN_REQUIRES "libuca = 1.1.0, libdexela >= 0.9.2") - - set(CPACK_GENERATOR "RPM") - set(CPACK_PACKAGE_NAME "uca-plugin-dexela") set(PLUGIN_VENDOR "ANKA Computing Group") - set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) diff --git a/plugins/mock/CMakeLists.txt b/plugins/mock/CMakeLists.txt index d5b6771..40118b9 100644 --- a/plugins/mock/CMakeLists.txt +++ b/plugins/mock/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8) project(ucamock C) set(UCA_CAMERA_NAME "mock") +set(PLUGIN_VERSION "1.0.0") +set(PLUGIN_REVISION "0") +set(PLUGIN_REQUIRES "libuca >= 1.1.0") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) diff --git a/plugins/package-plugin.sh.in b/plugins/package-plugin.sh.in index 796517e..cdbd4dd 100644 --- a/plugins/package-plugin.sh.in +++ b/plugins/package-plugin.sh.in @@ -1 +1,4 @@ -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_STRING}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" -D CPACK_PACKAGE_NAME="uca-plugin-${UCA_CAMERA_NAME}" -D CPACK_RPM_PACKAGE_SUMMARY="${PLUGIN_SUMMARY}" -D CPACK_PACKAGE_VERSION="${PLUGIN_VERSION}" -D CPACK_RPM_PACKAGE_RELEASE="${PLUGIN_REVISION}" -D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG} -D CPACK_RPM_PACKAGE_REQUIRES="${PLUGIN_REQUIRES}" -D CPACK_RPM_PACKAGE_DESCRIPTION="${PLUGIN_DESCRIPTION}" -D CPACK_RPM_PACKAGE_VENDOR="${PLUGIN_VENDOR}" +FILE_NAME_FLAG="-D CPACK_PACKAGE_FILE_NAME=uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_STRING}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" +PACKAGE_NAME_FLAG="-D CPACK_PACKAGE_NAME=uca-plugin-${UCA_CAMERA_NAME}" + +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" $FILE_NAME_FLAG $PACKAGE_NAME_FLAG -D CPACK_RPM_PACKAGE_SUMMARY="${PLUGIN_SUMMARY}" -D CPACK_PACKAGE_VERSION=${PLUGIN_VERSION} -D CPACK_RPM_PACKAGE_RELEASE=${PLUGIN_REVISION} -D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG} -D CPACK_RPM_PACKAGE_REQUIRES="${PLUGIN_REQUIRES}" -D CPACK_RPM_PACKAGE_DESCRIPTION="${PLUGIN_DESCRIPTION}" -D CPACK_RPM_PACKAGE_VENDOR="${PLUGIN_VENDOR}" diff --git a/plugins/pco/CMakeLists.txt b/plugins/pco/CMakeLists.txt index a526f4d..040026f 100644 --- a/plugins/pco/CMakeLists.txt +++ b/plugins/pco/CMakeLists.txt @@ -7,6 +7,9 @@ find_package(ClSerMe4) if (PCO_FOUND AND CLSERME4_FOUND AND FGLIB5_FOUND) set(UCA_CAMERA_NAME "pco") + set(PLUGIN_VERSION "1.0.0") + set(PLUGIN_REVISION "0") + set(PLUGIN_REQUIRES "libuca >= 1.1.0") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) diff --git a/plugins/pf/CMakeLists.txt b/plugins/pf/CMakeLists.txt index ef11f8f..6abfcdf 100644 --- a/plugins/pf/CMakeLists.txt +++ b/plugins/pf/CMakeLists.txt @@ -7,6 +7,9 @@ find_package(ClSerMe4) if (PF_FOUND AND CLSERME4_FOUND AND FGLIB5_FOUND) set(UCA_CAMERA_NAME "pco") + set(PLUGIN_VERSION "1.0.0") + set(PLUGIN_REVISION "0") + set(PLUGIN_REQUIRES "libuca >= 1.1.0") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) diff --git a/plugins/ufo/CMakeLists.txt b/plugins/ufo/CMakeLists.txt index c7fd21b..3162e12 100644 --- a/plugins/ufo/CMakeLists.txt +++ b/plugins/ufo/CMakeLists.txt @@ -5,6 +5,9 @@ find_package(IPE) if (IPE_FOUND) set(UCA_CAMERA_NAME "ufo") + set(PLUGIN_VERSION "1.0.0") + set(PLUGIN_REVISION "0") + set(PLUGIN_REQUIRES "libuca >= 1.1.0") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) -- cgit v1.2.3 From ab6fdf70c85773d7ebf4b1da2cf5aa4b1b649a32 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 18 Mar 2013 11:14:13 +0100 Subject: Revert control glade path to install location It was not a cool move to change it to the current directory ... --- src/config.h.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config.h.in b/src/config.h.in index d16158b..ec1fb62 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -6,5 +6,4 @@ #cmakedefine HAVE_DEXELA_CL #cmakedefine HAVE_MOCK_CAMERA -//#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" -#define CONTROL_GLADE_PATH "./control.glade" +#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" -- cgit v1.2.3 From b9bfef1a6032e0ce0cc8f9cc95a28121a17331ce Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 21 Mar 2013 11:48:12 +0100 Subject: Update package script Allows to set additional information in each plugin's CMakeLists.txt. Conflicts: plugins/package-plugin.sh.in --- plugins/package-plugin.sh.in | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/plugins/package-plugin.sh.in b/plugins/package-plugin.sh.in index cdbd4dd..65c401c 100644 --- a/plugins/package-plugin.sh.in +++ b/plugins/package-plugin.sh.in @@ -1,4 +1,25 @@ -FILE_NAME_FLAG="-D CPACK_PACKAGE_FILE_NAME=uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_STRING}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" -PACKAGE_NAME_FLAG="-D CPACK_PACKAGE_NAME=uca-plugin-${UCA_CAMERA_NAME}" +PACKAGE_CHANGELOG="-D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG}" +PACKAGE_FILE_NAME="-D CPACK_PACKAGE_FILE_NAME=uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_STRING}-${PLUGIN_VERSION}-${PLUGIN_REVISION}" +PACKAGE_NAME="-D CPACK_PACKAGE_NAME=uca-plugin-${UCA_CAMERA_NAME}" +PACKAGE_DEPENDENCIES="-D CPACK_RPM_PACKAGE_REQUIRES=\"${PLUGIN_REQUIRES}\"" +PACKAGE_DESCRIPTION="-D CPACK_RPM_PACKAGE_DESCRIPTION=\"${PLUGIN_DESCRIPTION}\"" +PACKAGE_RELEASE="-D CPACK_RPM_PACKAGE_RELEASE=${PLUGIN_REVISION}" +PACKAGE_SUMMARY="-D CPACK_RPM_PACKAGE_SUMMARY=\"${PLUGIN_SUMMARY}\"" +PACKAGE_VENDOR="-D CPACK_RPM_PACKAGE_VENDOR=\"${PLUGIN_VENDOR}\"" +PACKAGE_VERSION="-D CPACK_PACKAGE_VERSION=${PLUGIN_VERSION}" -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" $FILE_NAME_FLAG $PACKAGE_NAME_FLAG -D CPACK_RPM_PACKAGE_SUMMARY="${PLUGIN_SUMMARY}" -D CPACK_PACKAGE_VERSION=${PLUGIN_VERSION} -D CPACK_RPM_PACKAGE_RELEASE=${PLUGIN_REVISION} -D CPACK_RPM_CHANGELOG_FILE=${PLUGIN_CHANGELOG} -D CPACK_RPM_PACKAGE_REQUIRES="${PLUGIN_REQUIRES}" -D CPACK_RPM_PACKAGE_DESCRIPTION="${PLUGIN_DESCRIPTION}" -D CPACK_RPM_PACKAGE_VENDOR="${PLUGIN_VENDOR}" +FLAGS=" \ + $PACKAGE_CHANGELOG \ + $PACKAGE_DEPENDENCIES \ + $PACKAGE_DESCRIPTION \ + $PACKAGE_FILE_NAME \ + $PACKAGE_NAME \ + $PACKAGE_RELEASE \ + $PACKAGE_SUMMARY \ + $PACKAGE_VENDOR \ + $PACKAGE_VERSION \ + " + +cmd="cpack -D CPACK_INSTALL_CMAKE_PROJECTS=\"${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/\" $FLAGS" + +eval $cmd -- cgit v1.2.3 From 9bdf1616c6f1360658c7a97c0d7e681a932b4ee7 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 21 Mar 2013 12:08:14 +0100 Subject: Improve libuca package compatibility with RPM systems. --- CMakeLists.txt | 3 --- libuca.spec.in | 75 ------------------------------------------------------ package.sh.in | 6 +++-- src/CMakeLists.txt | 6 ++--- src/libuca.pc.in | 13 ++++++++++ src/uca.pc.in | 13 ---------- 6 files changed, 20 insertions(+), 96 deletions(-) delete mode 100644 libuca.spec.in create mode 100644 src/libuca.pc.in delete mode 100644 src/uca.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 443f33c..03abdad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,9 +40,6 @@ set(UCA_ENUM_HDRS configure_file(${CMAKE_CURRENT_SOURCE_DIR}/package.sh.in ${CMAKE_CURRENT_BINARY_DIR}/package.sh) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libuca.spec.in" - "${CMAKE_CURRENT_BINARY_DIR}/libuca.spec" @ONLY IMMEDIATE) - # --- Common flags ------------------------------------------------------------ diff --git a/libuca.spec.in b/libuca.spec.in deleted file mode 100644 index 0f77f95..0000000 --- a/libuca.spec.in +++ /dev/null @@ -1,75 +0,0 @@ -# -*- rpm-spec -*- -Buildroot: @UCA_BUILD_DIR@/_CPack_Packages/Linux/RPM/@CPACK_PACKAGE_FILE_NAME@ -Summary: Abstract interface for different camera classes and frame grabber devices -Name: libuca -Version: @PACKAGE_VERSION@ -Release: @CPACK_PACKAGE_RELEASE@ -License: unknown -Group: unknown -Vendor: Karlsruhe Institute of Technology/IPE -Prefix: @CMAKE_INSTALL_PREFIX@ - - - - -#p define prefix /usr/local -%define _rpmdir @UCA_BUILD_DIR@/_CPack_Packages/Linux/RPM -%define _rpmfilename @CPACK_PACKAGE_FILE_NAME@.rpm -%define _unpackaged_files_terminate_build 0 -%define _topdir @UCA_BUILD_DIR@/_CPack_Packages/Linux/RPM - - - -%description -DESCRIPTION -=========== - -This is an installer created using CPack (http://www.cmake.org). No additional installation instructions provided. - - - -# This is a shortcutted spec file generated by CMake RPM generator -# we skip _install step because CPack does that for us. -# We do only save CPack installed tree in _prepr -# and then restore it in build. -%prep -mv $RPM_BUILD_ROOT @UCA_BUILD_DIR@/_CPack_Packages/Linux/RPM/tmpBBroot - -#p build - -%install -if [ -e $RPM_BUILD_ROOT ]; -then - rm -Rf $RPM_BUILD_ROOT -fi -mv "@UCA_BUILD_DIR@/_CPack_Packages/Linux/RPM/tmpBBroot" $RPM_BUILD_ROOT - -%clean - -%post - - -%postun - - -%pre - - -%preun - - -%files -%defattr(-,root,root,-) -@CMAKE_INSTALL_PREFIX@/bin/control -@CMAKE_INSTALL_PREFIX@/include/uca/*.h -@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/* -@CMAKE_INSTALL_PREFIX@/share/* - - -%changelog -* Tue Aug 7 2012 Volker Kaiser -pack only existing header files -* Tue Aug 7 2012 Volker Kaiser -using more variables in spec file -* Tue Aug 2 2012 Volker Kaiser -First package version diff --git a/package.sh.in b/package.sh.in index 7c15b78..b9ac673 100644 --- a/package.sh.in +++ b/package.sh.in @@ -1,5 +1,7 @@ -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;libraries;/" -cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;headers;/" -D CPACK_PACKAGE_FILE_NAME="libuca-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}-devel" +HEADERS_POSTFIX="devel" + +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;libraries;/" -D CPACK_PACKAGE_VERSION=${UCA_VERSION_STRING} +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;headers;/" -D CPACK_PACKAGE_NAME="${CPACK_PACKAGE_NAME}-$HEADERS_POSTFIX" -D CPACK_PACKAGE_FILE_NAME="${CPACK_PACKAGE_NAME}-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}-$HEADERS_POSTFIX" # Build packages for all available cameras for shell_script in `find -name 'package-plugin-*.sh'`; do diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 160c52b..fcacfa0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,8 +53,8 @@ set(libdir ${prefix}/${LIB_INSTALL_DIR}) set(includedir "\${prefix}/include") set(VERSION ${UCA_VERSION_STRING}) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/uca.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/uca.pc" @ONLY IMMEDIATE) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libuca.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/libuca.pc" @ONLY IMMEDIATE) # --- Build target ------------------------------------------------------------ @@ -198,7 +198,7 @@ install(TARGETS uca LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uca.pc +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libuca.pc DESTINATION lib/pkgconfig COMPONENT libraries) diff --git a/src/libuca.pc.in b/src/libuca.pc.in new file mode 100644 index 0000000..6401368 --- /dev/null +++ b/src/libuca.pc.in @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir_old=@includedir@/uca +includedir_new=@includedir@ + +Name: libuca +Description: @UCA_DESCRIPTION@ +Version: @VERSION@ +Libs: -L${libdir} -luca +Cflags: -I${includedir_old} -I${includedir_new} diff --git a/src/uca.pc.in b/src/uca.pc.in deleted file mode 100644 index 6401368..0000000 --- a/src/uca.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -# Package Information for pkg-config - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir_old=@includedir@/uca -includedir_new=@includedir@ - -Name: libuca -Description: @UCA_DESCRIPTION@ -Version: @VERSION@ -Libs: -L${libdir} -luca -Cflags: -I${includedir_old} -I${includedir_new} -- cgit v1.2.3