summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-08-09 12:20:48 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-08-09 12:20:48 +0200
commitbf30a848ad7ac00218aab6589df7a19d868728cd (patch)
treed585e4bb57212708b379f1e84f260e513817485f
parentcad65db83f908afa02325bf3c8343b72544aa359 (diff)
parent2235306b05d29f22fd33eafdced3081f70ac7e37 (diff)
downloaduca-bf30a848ad7ac00218aab6589df7a19d868728cd.tar.gz
uca-bf30a848ad7ac00218aab6589df7a19d868728cd.tar.bz2
uca-bf30a848ad7ac00218aab6589df7a19d868728cd.tar.xz
uca-bf30a848ad7ac00218aab6589df7a19d868728cd.zip
Merge branch 'iss-master'
-rw-r--r--CMakeLists.txt3
-rw-r--r--libuca.spec.in76
-rw-r--r--src/CMakeLists.txt11
3 files changed, 88 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 109b7a6..ade68ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket")
set(CPACK_GENERATOR "DEB;RPM;")
+set(CPACK_PACKAGE_RELEASE 3)
set(CPACK_DEBIAN_PACKAGE_NAME "libuca")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Vogelgesang <matthias.vogelgesang@kit.edu>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${UCA_DESCRIPTION})
@@ -24,5 +25,7 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY ${UCA_DESCRIPTION})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
+SET(UCA_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
add_subdirectory(src)
add_subdirectory(test)
diff --git a/libuca.spec.in b/libuca.spec.in
new file mode 100644
index 0000000..9e21bb2
--- /dev/null
+++ b/libuca.spec.in
@@ -0,0 +1,76 @@
+# -*- 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: @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@/include/uca/*.h
+@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/libuca.so
+@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/libuca.so.@UCA_VERSION_MINOR@
+@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@/libuca.so.@UCA_ABI_VERSION@
+@CMAKE_INSTALL_PREFIX@/lib/pkgconfig/uca.pc
+
+
+%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/src/CMakeLists.txt b/src/CMakeLists.txt
index 02a1005..84b6199 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -144,10 +144,14 @@ set_target_properties(uca PROPERTIES
target_link_libraries(uca
${uca_LIBS})
+if (NOT DEFINED WITH_REFERENCE)
+ set(WITH_REFERENCE TRUE)
+endif()
+
# --- Build documentation -----------------------------------------------------
pkg_check_modules(GTK_DOC gtk-doc)
-if(GTK_DOC_FOUND)
+if(GTK_DOC_FOUND AND WITH_REFERENCE)
option(WITH_GTK_DOC "Build documentation" ON)
if (WITH_GTK_DOC)
set(docs_dir "${CMAKE_CURRENT_BINARY_DIR}")
@@ -229,7 +233,7 @@ if(GTK_DOC_FOUND)
install(FILES ${reference_files} DESTINATION share/gtk-doc/html/uca)
endif()
-endif(GTK_DOC_FOUND)
+endif(GTK_DOC_FOUND AND WITH_REFERENCE)
# --- Install target ----------------------------------------------------------
@@ -278,4 +282,7 @@ set(CPACK_SOURCE_IGNORE_FILES ".git" "tags" ".bzr" ".swp")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "libuca-${UCA_VERSION_STRING}" CACHE INTERNAL "tarball basename")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${UCA_VERSION_STRING}-${CMAKE_SYSTEM_PROCESSOR}")
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../libuca.spec.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/../libuca.spec" @ONLY IMMEDIATE)
+
include(CPack)