diff options
author | Mihael Koep <koep@schneide.com> | 2013-03-21 12:08:14 +0100 |
---|---|---|
committer | Mihael Koep <koep@schneide.com> | 2013-03-21 12:08:14 +0100 |
commit | 9bdf1616c6f1360658c7a97c0d7e681a932b4ee7 (patch) | |
tree | 89d5d51904286e778a3ead0dcd49dd360843300f | |
parent | b9bfef1a6032e0ce0cc8f9cc95a28121a17331ce (diff) | |
download | libuca-9bdf1616c6f1360658c7a97c0d7e681a932b4ee7.tar.gz libuca-9bdf1616c6f1360658c7a97c0d7e681a932b4ee7.tar.bz2 libuca-9bdf1616c6f1360658c7a97c0d7e681a932b4ee7.tar.xz libuca-9bdf1616c6f1360658c7a97c0d7e681a932b4ee7.zip |
Improve libuca package compatibility with RPM systems.
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | libuca.spec.in | 75 | ||||
-rw-r--r-- | package.sh.in | 6 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/libuca.pc.in (renamed from src/uca.pc.in) | 0 |
5 files changed, 7 insertions, 83 deletions
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 <volker.kaiser@softwareschneiderei.de> -pack only existing header files -* Tue Aug 7 2012 Volker Kaiser <volker.kaiser@softwareschneiderei.de> -using more variables in spec file -* Tue Aug 2 2012 Volker Kaiser <volker.kaiser@softwareschneiderei.de> -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/uca.pc.in b/src/libuca.pc.in index 6401368..6401368 100644 --- a/src/uca.pc.in +++ b/src/libuca.pc.in |