summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Brandner <simon.brandner@partner.bmw.de>2013-03-20 13:11:36 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2013-07-19 16:54:54 +0200
commit285b8362828d3323e01a494ee6763eac119787f6 (patch)
treee7106168f3fd7907879e3ff5ee1992d331fa6a8e
parent1f04be47b58dc6ab0352d685626beabf4423cb7a (diff)
downloaddlt-daemon-285b8362828d3323e01a494ee6763eac119787f6.tar.gz
dlt-daemon-285b8362828d3323e01a494ee6763eac119787f6.tar.bz2
dlt-daemon-285b8362828d3323e01a494ee6763eac119787f6.zip
spec file does not package man files when cmake is run with -DWITH_DOC=OFF
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
-rw-r--r--CMakeLists.txt7
-rw-r--r--automotive-dlt.spec.in15
2 files changed, 15 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a70d812..50cdb44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,6 +98,12 @@ endif(WITH_GPROF)
add_definitions( "-Wall" )
add_definitions( "-Wextra" )
+IF(${WITH_DOC} STREQUAL "OFF")
+ SET(PACKAGE_DOC "#")
+ELSE (${WITH_DOC} STREQUAL "OFF")
+ SET(PACKAGE_DOC "")
+ENDIF(${WITH_DOC} STREQUAL "OFF")
+
configure_file(${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.spec.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.spec)
configure_file(${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig COMPONENT devel)
@@ -129,6 +135,7 @@ message( STATUS "Build for Version ${DLT_VERSION} build ${DLT_REVISION} version
message( STATUS "WITH_SYSTEMD = ${WITH_SYSTEMD}" )
message( STATUS "WITH_SYSTEMD_WATCHDOG = ${WITH_SYSTEMD_WATCHDOG}" )
message( STATUS "WITH_DOC = ${WITH_DOC}" )
+
message( STATUS "WITH_MAN = ${WITH_MAN}" )
message( STATUS "WTIH_DLT_ADAPTOR = ${WTIH_DLT_ADAPTOR}")
message( STATUS "WITH_DLT_CONSOLE = ${WITH_DLT_CONSOLE}")
diff --git a/automotive-dlt.spec.in b/automotive-dlt.spec.in
index 7dea8b3..e93833f 100644
--- a/automotive-dlt.spec.in
+++ b/automotive-dlt.spec.in
@@ -106,13 +106,14 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/dlt-example-filetransfer
-%files doc
-%{_mandir}/man1/dlt-convert.1.gz
-%{_mandir}/man1/dlt-daemon.1.gz
-%{_mandir}/man1/dlt-receive.1.gz
-%{_mandir}/man1/dlt-system.1.gz
-%{_mandir}/man5/dlt-system.conf.5.gz
-%{_mandir}/man5/dlt.conf.5.gz
+%files doc
+
+@PACKAGE_DOC@%{_mandir}/man1/dlt-convert.1.gz
+@PACKAGE_DOC@%{_mandir}/man1/dlt-daemon.1.gz
+@PACKAGE_DOC@%{_mandir}/man1/dlt-receive.1.gz
+@PACKAGE_DOC@%{_mandir}/man1/dlt-system.1.gz
+@PACKAGE_DOC@%{_mandir}/man5/dlt-system.conf.5.gz
+@PACKAGE_DOC@%{_mandir}/man5/dlt.conf.5.gz
%files devel
%{_includedir}/dlt/*.h