Skip to content
Snippets Groups Projects
Commit ed0d19eb authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Merge branch 'packaging'

parents 1482952c abc4de22
No related branches found
No related tags found
No related merge requests found
image: docker.io/labrobotica/labrobotica
stages:
- build
- test
- deploy
build-package:
stage: build
script:
# Uncomment to install dependencies
# - apt update
# - apt -y install iri-<package_name>-dev
- apt update
- apt -y install libdc1394-22-dev
- apt -y install iri-iriutils-dev
- mkdir -pv build
- cd build
- cmake -D CMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG ..
- make package -j $(nproc)
artifacts:
paths:
- build/*.deb
expire_in: 2 weeks
only:
- tags
update_repo:
stage: deploy
script:
- cd build
- "scp -i /root/.ssh/iriLabKeyNopwd -r *firewire-camera*.deb irilabo@147.83.76.226:packages/"
- "ssh irilabo@147.83.76.226 -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh firewire-camera"
only:
- tags
...@@ -8,18 +8,7 @@ endif(COMMAND cmake_policy) ...@@ -8,18 +8,7 @@ endif(COMMAND cmake_policy)
# The project name and the type of project # The project name and the type of project
PROJECT(firewire_camera) PROJECT(firewire_camera)
SET(CPACK_PACKAGE_VERSION "1.0.0") SET(PACKAGE_NAME firewire-camera)
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
SET (X86 TRUE)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
ELSE ()
SET (X86 FALSE)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
ENDIF()
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
...@@ -83,15 +72,29 @@ ELSE(UNIX) ...@@ -83,15 +72,29 @@ ELSE(UNIX)
) )
ENDIF(UNIX) ENDIF(UNIX)
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
SET (X86 TRUE)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
ELSE ()
SET (X86 FALSE)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
ENDIF()
IF (UNIX) IF (UNIX)
SET(CPACK_PACKAGE_FILE_NAME "iri-${PROJECT_NAME}-dev-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") SET(CPACK_PACKAGE_FILE_NAME "iri-${PACKAGE_NAME}-dev-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_PACKAGE_NAME "iri-${PROJECT_NAME}-dev") SET(CPACK_PACKAGE_NAME "iri-${PACKAGE_NAME}-dev")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at http://wikiri.upc.es/index.php/Robotics_Lab") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at https://gitlab.iri.upc.edu/labrobotica/labrobotica_how_to")
SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) SET(CPACK_PACKAGING_INSTALL_PREFIX /usr)
SET(CPACK_GENERATOR "DEB") SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "galenya - labrobotica@iri.upc.edu") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu")
SET(CPACK_SET_DESTDIR "ON") # Necessary because of the absolute install paths
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-iriutils-dev (>= 1.0~${DISTRIB})") # Uncomment to add the necessary mantainer scripts
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/package_scripts/preinst;${CMAKE_SOURCE_DIR}/package_scripts/postinst;${CMAKE_SOURCE_DIR}/package_scripts/prerm;${CMAKE_SOURCE_DIR}/package_scripts/postrm")
# Uncomment to add dependencies comma separated
# SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-<package_name>-dev (>= 1.0~${DISTRIB})")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-iriutils-dev (>= 1.0~${DISTRIB}), libdc1394-22-dev (>= 1.0~${DISTRIB})")
INCLUDE(CPack) INCLUDE(CPack)
ELSE(UNIX) ELSE(UNIX)
...@@ -101,3 +104,5 @@ ELSE(UNIX) ...@@ -101,3 +104,5 @@ ELSE(UNIX)
) )
ENDIF(UNIX) ENDIF(UNIX)
FIND_PATH(firewire_camera_INCLUDE_DIRS firewirecamera.h firewireserver.h firewireexceptions.h /usr/include/iri/firewire_camera /usr/local/include/iri/firewire_camera) FIND_PATH(firewire_camera_INCLUDE_DIRS firewirecamera.h firewireserver.h firewireexceptions.h ptg_camera.h bumblebee.h ladybug.h /usr/local/include/iri/firewire_camera /usr/include/iri/firewire_camera)
FIND_LIBRARY(firewire_camera_LIBRARIES FIND_LIBRARY(firewire_camera_LIBRARIES
NAMES firewire_camera NAMES firewire_camera
PATHS /usr/lib /usr/lib/iri/firewire_camera /usr/local/lib /usr/local/lib/iri/firewire_camera) PATHS /usr/local/lib/iri/firewire_camera /usr/lib/iri/firewire_camera)
SET(firewire_camera_INCLUDE_DIR ${firewire_camera_INCLUDE_DIRS}) SET(firewire_camera_INCLUDE_DIR ${firewire_camera_INCLUDE_DIRS})
SET(firewire_camera_LIBRARY ${firewire_camera_LIBRARIES}) SET(firewire_camera_LIBRARY ${firewire_camera_LIBRARIES})
...@@ -19,4 +19,4 @@ ELSE (firewire_camera_FOUND) ...@@ -19,4 +19,4 @@ ELSE (firewire_camera_FOUND)
IF (firewire_camera_FIND_REQUIRED) IF (firewire_camera_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find firewire_camera camera driver") MESSAGE(FATAL_ERROR "Could not find firewire_camera camera driver")
ENDIF (firewire_camera_FIND_REQUIRED) ENDIF (firewire_camera_FIND_REQUIRED)
ENDIF (firewire_camera_FOUND) ENDIF (firewire_camera_FOUND)
\ No newline at end of file
LICENSE 0 → 100644
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
firewire_camera library {#mainpage} Firewire\_camera library {#mainpage}
============ ============
## Description ## Description
Driver for firewire cameras. Driver for firewire cameras.
## Installation
* Add the labrobotica repository if it is not already added:
``` sudo sh -c 'echo "deb [arch=amd64] http://147.83.76.226/~irilabo/packages xenial main" > /etc/apt/sources.list.d/labrobotica_repo.list' ```
``` wget -O - http://147.83.76.226/~irilabo/labrobotica_repo.gpg.key | sudo apt-key add - ```
* Install the package:
``` sudo apt update && sudo apt install iri-firewire-camera-dev ```
## Disclaimer
Copyright (C) 2009-2018 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
Mantainer IRI labrobotics (labrobotica@iri.upc.edu)
This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair or correction.
In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
## For developers
<details><summary>click here</summary>
<p>
## Dependencies ## Dependencies
This package requires of the following system libraries and packages This package requires of the following system libraries and packages
* [cmake](https://www.cmake.org "CMake's Homepage"), a cross-platform build system. * [cmake](https://www.cmake.org "CMake's Homepage"), a cross-platform build system.
* libdc1394]: sudo apt install libdc1394-22-dev * [doxygen](http://www.doxygen.org "Doxygen's Homepage") and [graphviz](http://www.graphviz.org "Graphviz's Homepage") to generate the documentation.
* [libdc1394-22-dev](https://damien.douxchamps.net/ieee1394/libdc1394/), a driver to control IEEE 1394 based cameras.
* stdc++.
Under linux all of these utilities are available in ready-to-use packages.
Under MacOS most of the packages are available via [fink](http://www.finkproject.org/ "Fink's Homepage")
This package also requires of the following IRI libraries: This package also requires of the following IRI libraries:
* [iriutils](https://gitlab.iri.upc.edu/labrobotica/algorithms/iriutils "iriutils gitlab page"), a set of basic tools. * [iriutils](https://gitlab.iri.upc.edu/labrobotica/algorithms/iriutils "iriutils gitlab page"), a set of basic tools.
## Compilation and installation ## Compilation and installation from source
Download this repository and create a build folder inside: Clone this repository and create a build folder inside:
``` mkdir build ``` ``` mkdir build ```
...@@ -33,7 +68,7 @@ The RELEASE build mode optimizes for speed. To build in this mode execute instea ...@@ -33,7 +68,7 @@ The RELEASE build mode optimizes for speed. To build in this mode execute instea
The release mode will be kept until next time cmake is executed. The release mode will be kept until next time cmake is executed.
``` make ``` ``` make -j $(nproc)```
In case no errors are reported, the generated libraries (if any) will be located at the In case no errors are reported, the generated libraries (if any) will be located at the
_lib_ folder and the executables (if any) will be located at the _bin_ folder. _lib_ folder and the executables (if any) will be located at the _bin_ folder.
...@@ -43,9 +78,9 @@ To do that, execute ...@@ -43,9 +78,9 @@ To do that, execute
``` make install ``` ``` make install ```
as root and the shared libraries will be copied to */usr/local/lib/iridrivers* directory as root and the shared libraries will be copied to */usr/local/lib/iri/firewire_camera* directory
and the header files will be copied to */usr/local/include/iridrivers* dierctory. At and the header files will be copied to */usr/local/include/iri/firewire_camera* dierctory.
this point, the library may be used by any user. At this point, the library may be used by any user.
To remove the library from the system, exceute To remove the library from the system, exceute
...@@ -61,24 +96,20 @@ To generate the documentation execute the following command: ...@@ -61,24 +96,20 @@ To generate the documentation execute the following command:
To use this library in an other library or application, in the CMakeLists.txt file, first it is necessary to locate if the library has been installed or not using the following command To use this library in an other library or application, in the CMakeLists.txt file, first it is necessary to locate if the library has been installed or not using the following command
``` FIND_PACKAGE(<library name>) ``` ``` FIND_PACKAGE(firewire_camera) ```
In the case that the package is present, it is necessary to add the header files directory to the include directory path by using In the case that the package is present, it is necessary to add the header files directory to the include directory path by using
``` INCLUDE_DIRECTORIES(${<library name>_INCLUDE_DIR}) ``` ``` INCLUDE_DIRECTORIES(${firewire_camera_INCLUDE_DIRS}) ```
and it is also necessary to link with the desired libraries by using the following command and it is also necessary to link with the desired libraries by using the following command
``` TARGET_LINK_LIBRARIES(<executable name> ${<library name>_LIBRARY}) ``` ``` TARGET_LINK_LIBRARIES(<executable name> ${firewire_camera_LIBRARIES}) ```
## Disclaimer ## Examples
Copyright (C) 2009-2018 Institut de Robòtica i Informàtica Industrial, CSIC-UPC. There are several examples that show how to use the different classes.
Mantainer IRI labrobotics (labrobotica@iri.upc.edu)
This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair or correction. </p>
</details>
In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
File moved
File moved
File moved
File moved
File moved
File moved
# edit the following line to add the source code of the application # edit the following line to add the source code of the application
SET(sources firewirecamera.cpp firewireserver.cpp firewireexceptions.cpp ptg_camera.cpp bumblebee.cpp ladybug.cpp) SET(sources firewirecamera.cpp firewireserver.cpp firewireexceptions.cpp ptg_camera.cpp bumblebee.cpp ladybug.cpp)
# edit the following line to add the header files of the application # edit the following line to add the header files of the application
SET(headers firewirecamera.h firewireserver.h firewireexceptions.h ptg_camera.h bumblebee.h ladybug.h) SET(headers ../include/firewirecamera.h ../include/firewireserver.h ../include/firewireexceptions.h ../include/ptg_camera.h ../include/bumblebee.h ../include/ladybug.h)
#find the cv support and set HAVE_OPENCV_H for the conditional compilation #find the cv support and set HAVE_OPENCV_H for the conditional compilation
FIND_PACKAGE(OpenCV) FIND_PACKAGE(OpenCV)
...@@ -40,16 +40,16 @@ ENDIF (raw1394_INCLUDE_DIRS AND raw1394_LIBRARIES AND dc1394_INCLUDE_DIRS AND dc ...@@ -40,16 +40,16 @@ ENDIF (raw1394_INCLUDE_DIRS AND raw1394_LIBRARIES AND dc1394_INCLUDE_DIRS AND dc
IF (firewire_camera_ready) IF (firewire_camera_ready)
MESSAGE(STATUS "The system is libdc 2.0 capable") MESSAGE(STATUS "The system is libdc 2.0 capable")
# add all the necessary include directories (project_name_INDLUDE_DIR) # add all the necessary include directories (project_name_INDLUDE_DIR)
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR} ${dc1394_INCLUDE_DIRS} ${raw1394_INCLUDE_DIRS} .) INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIRS} ${dc1394_INCLUDE_DIRS} ${raw1394_INCLUDE_DIRS} ../include/)
ADD_LIBRARY(firewire_camera SHARED ${sources}) ADD_LIBRARY(firewire_camera SHARED ${sources})
#if CV then add the libraries #if CV then add the libraries
if (USE_CV) if (USE_CV)
TARGET_LINK_LIBRARIES(firewire_camera ${OpenCV_LIBS} ${iriutils_LIBRARY} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES}) TARGET_LINK_LIBRARIES(firewire_camera ${OpenCV_LIBS} ${iriutils_LIBRARIES} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES})
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
else(USE_CV) else(USE_CV)
TARGET_LINK_LIBRARIES(firewire_camera ${iriutils_LIBRARY} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES}) TARGET_LINK_LIBRARIES(firewire_camera ${iriutils_LIBRARIES} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES})
endif(USE_CV) endif(USE_CV)
INSTALL(TARGETS firewire_camera INSTALL(TARGETS firewire_camera
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment