Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
labrobotica
drivers
LidarLite
Commits
538b2d85
Commit
538b2d85
authored
Aug 29, 2019
by
Alejandro Lopez Gestoso
Browse files
Adapted to .deb package generation
parent
e0b1c79d
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
538b2d85
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 iri-iriutils-dev iri-comm-dev iri-usb-i2c-adapter-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
*lidar-lite*.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
lidar-lite"
only
:
-
tags
CMakeLists.txt
View file @
538b2d85
...
...
@@ -9,6 +9,8 @@ endif(COMMAND cmake_policy)
# The project name and the type of project
PROJECT
(
lidar_lite
)
SET
(
PACKAGE_NAME lidar-lite
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/bin
)
SET
(
LIBRARY_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib
)
...
...
@@ -61,3 +63,36 @@ ELSE(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
)
SET
(
CPACK_PACKAGE_FILE_NAME
"iri-
${
PACKAGE_NAME
}
-dev-
${
CPACK_PACKAGE_VERSION
}
-
${
CPACK_DEBIAN_PACKAGE_ARCHITECTURE
}
"
)
SET
(
CPACK_PACKAGE_NAME
"iri-
${
PACKAGE_NAME
}
-dev"
)
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 /usr
)
SET
(
CPACK_GENERATOR
"DEB"
)
SET
(
CPACK_DEBIAN_PACKAGE_MAINTAINER
"labrobotica - labrobotica@iri.upc.edu"
)
# 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
}
), iri-comm-dev (>= 1.0~
${
DISTRIB
}
), iri-usb-i2c-adapter-dev (>= 1.0~
${
DISTRIB
}
)"
)
INCLUDE
(
CPack
)
ELSE
(
UNIX
)
ADD_CUSTOM_COMMAND
(
COMMENT
"packaging only implemented in unix"
TARGET uninstall
)
ENDIF
(
UNIX
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment