Skip to content

Commit

Permalink
Debian formatted copyright file added to all debian packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
asmorkalov committed Oct 13, 2015
1 parent 59082c8 commit 9d24b3c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/OpenCVPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ OpenCV makes it easy for businesses to utilize and modify the code.")
set(CPACK_PACKAGE_VERSION_MINOR "${OPENCV_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OPENCV_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${OPENCV_VCSVERSION}")
set(OPENCV_DEBIAN_COPYRIGHT_FILE "")
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)

set(CPACK_STRIP_FILES 1)
Expand Down Expand Up @@ -192,7 +193,7 @@ if(CPACK_GENERATOR STREQUAL "DEB")
set(DEBIAN_CHANGELOG_OUT_FILE "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian")
set(DEBIAN_CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian.gz")
set(CHANGELOG_PACKAGE_NAME "${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY)
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY)

execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${DEBIAN_CHANGELOG_OUT_FILE}"
OUTPUT_FILE "${DEBIAN_CHANGELOG_OUT_FILE_GZ}"
Expand All @@ -214,6 +215,12 @@ if(CPACK_GENERATOR STREQUAL "DEB")
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")

if(OPENCV_DEBIAN_COPYRIGHT_FILE)
install(FILES "${OPENCV_DEBIAN_COPYRIGHT_FILE}"
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")
endif()

endforeach()
endif()

Expand Down
43 changes: 43 additions & 0 deletions cmake/templates/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Format: http://dep.debian.net/deps/dep5

Files: *
Copyright: 2000-2015, Intel Corporation
2009-2011, Willow Garage Inc.
2009-2015, NVIDIA Corporation
2010-2013, Advanced Micro Devices, Inc.
2015, OpenCV Foundation
2015, Itseez Inc.
License: BSD-3-clause
By downloading, copying, installing or using the software you agree to this
license. If you do not agree to this license, do not download, install, copy
or use the software.
.
.
License Agreement
For Open Source Computer Vision Library
(3-clause BSD License)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
\* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
\* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
\* Neither the names of the copyright holders nor the names of the
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

This software is provided by the copyright holders and contributors "as is"
and any express or implied warranties, including, but not limited to, the
implied warranties of merchantability and fitness for a particular purpose are
disclaimed. In no event shall copyright holders or contributors be liable for
any direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.

0 comments on commit 9d24b3c

Please sign in to comment.