From b583f0f6c6df778343aaa6398315da98da208f28 Mon Sep 17 00:00:00 2001 From: Christian Muck Date: Fri, 23 Sep 2011 16:01:49 +0200 Subject: Fixed some packaging bugs --- CMakeLists.txt | 33 +++------------- automotive-dlt.spec.in | 98 ++++++++++++++++++++++++++++++++++++++++++++++ distfiles | 11 ++++-- include/dlt/dlt_version.h | 2 +- testscripts/CMakeLists.txt | 34 ---------------- 5 files changed, 111 insertions(+), 67 deletions(-) create mode 100644 automotive-dlt.spec.in diff --git a/CMakeLists.txt b/CMakeLists.txt index c36f5bb..1c192ef 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,6 @@ ENDIF(NOT DEFINED PRINT_REVISION) ##################### RPM SPEC CONFIG ######################## SET( GENIVI_RPM_RELEASE "1${PRINT_REVISION}") SET( LICENSE "LGPL v2.1 with special exception" ) -SET( SPEC_DIR "package") ######################################################### SET(GENIVI_BUILDSYSTEM_AVAILABLE $ENV{GENIVI_BUILDSYSTEM}) @@ -178,11 +177,11 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/config.h @ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/dlt/dlt_version.h.cmake ${CMAKE_SOURCE_DIR}/include/dlt/dlt_version.h @ONLY) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doxygen.cfg.cmake ${CMAKE_SOURCE_DIR}/doxygen.cfg @ONLY) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/automotive-dlt.pc.cmake ${CMAKE_SOURCE_DIR}/automotive-dlt.pc @ONLY) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/systemd/dlt.service.cmake ${CMAKE_SOURCE_DIR}/systemd/dlt.service @ONLY) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/systemd/dlt-syslog.service.cmake ${CMAKE_SOURCE_DIR}/systemd/dlt-syslog.service @ONLY) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/testscripts/Meego/dlt-daemon.cmake ${CMAKE_SOURCE_DIR}/testscripts/Meego/dlt-daemon @ONLY) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/testscripts/Ubuntu/dlt-daemon.cmake ${CMAKE_SOURCE_DIR}/testscripts/Ubuntu/dlt-daemon @ONLY) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/automotive-dlt.spec.cmake ${CMAKE_SOURCE_DIR}/automotive-dlt.spec ESCAPE_QUOTES) +#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/systemd/dlt.service.cmake ${CMAKE_SOURCE_DIR}/systemd/dlt.service @ONLY) +#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/systemd/dlt-syslog.service.cmake ${CMAKE_SOURCE_DIR}/systemd/dlt-syslog.service @ONLY) +#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/testscripts/Meego/dlt-daemon.cmake ${CMAKE_SOURCE_DIR}/testscripts/Meego/dlt-daemon @ONLY) +#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/testscripts/Ubuntu/dlt-daemon.cmake ${CMAKE_SOURCE_DIR}/testscripts/Ubuntu/dlt-daemon @ONLY) + OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON ) OPTION(ENABLE_BUILD_DOC "Set to ON to build Documentation" OFF) @@ -241,25 +240,3 @@ CONFIGURE_FILE( # "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") EXPORT_LIBRARY_DEPENDENCIES( "${PROJECT_NAME}LibDeps.cmake" ) - - -################ CPack configuration ################# -SET(CPACK_GENERATOR "DEB;RPM;TGZ") -SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Alexander Wenzel") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "automotive-dlt") -SET(CPACK_PACKAGE_DESCRIPTION "This component provides a standardised log and trace interface, based on the -standardised protocol specified in the AUTOSAR standard 4.0 DLT. -This component can be used by GENIVI components and other applications as -logging facility providing -- the DLT shared library -- the DLT daemon, including startup scripts -- the DLT daemon adaptors -- the DLT client console utilities -- the DLT test applications ") -SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") -SET(CPACK_PACKAGE_VERSION_MAJOR ${PRINT_MAJOR_VERSION}) -SET(CPACK_PACKAGE_VERSION_MINOR ${PRINT_MINOR_VERSION}) -SET(CPACK_PACKAGE_VERSION_PATCH ${PRINT_PATCH_LEVEL}) - -INCLUDE(CPack) diff --git a/automotive-dlt.spec.in b/automotive-dlt.spec.in new file mode 100644 index 0000000..0ebe728 --- /dev/null +++ b/automotive-dlt.spec.in @@ -0,0 +1,98 @@ +Name: @PROJECT_NAME@ +Summary: %{name} - Diagnostic Log and Trace +Version: @GENIVI_PROJECT_VERSION@ +Release: @GENIVI_RPM_RELEASE@ +License: @LICENSE@ +Group: System Environment/Base +Vendor: BMW Group AG +Source: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Requires: %{name} = %{version}-%{release}, pkgconfig + +%description +This component provides a standardised log and trace interface, based on the +standardised protocol specified in the AUTOSAR standard 4.0 DLT. +This component can be used by GENIVI components and other applications as +logging facility providing +- the DLT shared library +- the DLT daemon, including startup scripts +- the DLT daemon adaptors +- the DLT client console utilities +- the DLT test applications + +%package doc +Summary: %{name} - Diagnostic Log and Trace: Documentation +Group: Documentation + +%description doc +This component provides the documentation for %{name}. + +%package devel +Summary: %{name} - Diagnostic Log and Trace: Development files +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, pkgconfig + +%description devel +This component provides the development libraries and includes for %{name}. + + +%prep +%setup +echo "building package automotive-dlt" + + +%build +rm -rf build +mkdir -p build +cd build +../configure --host=@HOST_TYPE@ --prefix=%{_usr} +make + + +%install +rm -rf $RPM_BUILD_ROOT +cd build +mkdir -p $RPM_BUILD_ROOT%{_bindir} +make install DESTDIR=$RPM_BUILD_ROOT +#/usr/bin/install -c -m 755 testscripts/Meego/dlt-daemon $RPM_BUILD_ROOT/etc/init.d + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +#/etc/init.d/dlt-daemon +%{_libdir}/libdlt.so.@PRINT_MAJOR_VERSION@ +%{_libdir}/libdlt.so.@GENIVI_PROJECT_VERSION@ +%{_libdir}/libdlt.so +%{_bindir}/dlt-convert +%{_bindir}/dlt-receive +%{_bindir}/dlt-adaptor-stdin +%{_bindir}/dlt-adaptor-udp +%{_bindir}/dlt-test-client +%{_bindir}/dlt-test-user +%{_bindir}/dlt-test-stress +%{_bindir}/dlt-test-stress-client +%{_bindir}/dlt-test-stress-user +%{_bindir}/dlt-test-internal +%attr(0755,root,root) %{_bindir}/dlt-daemon +%{_bindir}/dlt-example-user +%{_bindir}/dlt-example-user-func + + +%files doc +%{_usr}/doc/dlt2/LICENSE.txt + + +%files devel +%{_libdir}/pkgconfig/*.pc +%{_includedir}/dlt/*.h +%{_libdir}/pkgconfig/automotive-dlt.pc + +%pre + +%post + +%changelog +* Wed Nov 24 2010 dlt_maintainer 2.2.0 +- Creation diff --git a/distfiles b/distfiles index 9a74daf..6d57c12 100755 --- a/distfiles +++ b/distfiles @@ -1,13 +1,16 @@ CMakeLists.txt (src|include|wxctb|testscripts|doc).*CMakeLists.txt (src|include|wxctb|testscripts).*\.(cpp|h|c|cxx) -testscripts/Ubuntu/dlt-daemon +include/dlt/.*(\.h|\.cpp|\.cmake) +#testscripts/Ubuntu/.*(\.h|\.cpp|\.cmake) +#testscripts/Meego/.*(\.h|\.cpp|\.cmake) +#systemd/.*(\.h|\.cpp|\.cmake) doc/.*\.(odt|vsd) configure distfiles -package/automotive-dlt.spec.in +automotive-dlt.spec.in cmake_uninstall.cmake.in [^/]*\.cmake -create-svnversion .*\.xpm -LICENSE\.txt +LICENSE.txt +README \ No newline at end of file diff --git a/include/dlt/dlt_version.h b/include/dlt/dlt_version.h index cb4391b..1ea8756 100755 --- a/include/dlt/dlt_version.h +++ b/include/dlt/dlt_version.h @@ -7,6 +7,6 @@ #define PACKAGE_MAJOR_VERSION "2" #define PACKAGE_MINOR_VERSION "3" #define PACKAGE_PATCH_LEVEL "0" -#define PACKAGE_REVISION "v2.3.0-RC-3-g357378f" +#define PACKAGE_REVISION "v2.3.0" #endif diff --git a/testscripts/CMakeLists.txt b/testscripts/CMakeLists.txt index 16d618f..d81b036 100755 --- a/testscripts/CMakeLists.txt +++ b/testscripts/CMakeLists.txt @@ -34,37 +34,3 @@ # # @licence end@ ######## -if(UNIX) - if(CMAKE_SYSTEM_NAME MATCHES "Linux") - if(EXISTS "/etc/issue") - FILE(READ "/etc/issue" LINUX_ISSUE) - # Fedora case - if(LINUX_ISSUE MATCHES "Fedora") - set(DISTRIBUTION "Fedora") - endif(LINUX_ISSUE MATCHES "Fedora") - # Ubuntu case - if(LINUX_ISSUE MATCHES "Ubuntu") - set(DISTRIBUTION "Ubuntu") - endif(LINUX_ISSUE MATCHES "Ubuntu") - # Debian case - if(LINUX_ISSUE MATCHES "Debian") - set(DISTRIBUTION "Debian") - endif(LINUX_ISSUE MATCHES "Debian") - # Open SuSE case - if(LINUX_ISSUE MATCHES "SUSE") - set(DISTRIBUTION "SUSE") - endif(LINUX_ISSUE MATCHES "SUSE") - if(LINUX_ISSUE MATCHES "Meego") - set(DISTRIBUTION "Meego") - endif(LINUX_ISSUE MATCHES "Meego") - - install(PROGRAMS ${DISTRIBUTION}/dlt-daemon - DESTINATION /etc/init.d/ - COMPONENT base) - - endif(EXISTS "/etc/issue") - endif(CMAKE_SYSTEM_NAME MATCHES "Linux") -endif(UNIX) - - - -- cgit v1.2.1