summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAchmad Fathoni2021-02-07 07:18:48 +0700
committerAchmad Fathoni2021-02-07 07:18:48 +0700
commitffd5fe80ac2afa56fdad2b4aed7fd7f98d046022 (patch)
treed91a07d9fad903de83747217b7de69765543b3bf /PKGBUILD
downloadaur-ffd5fe80ac2afa56fdad2b4aed7fd7f98d046022.tar.gz
r584.151c563.1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD96
1 files changed, 96 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..91aa74fc759
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,96 @@
+# Maintainer: Achmad Fathoni<fathoni.id(at)gmail.com>
+
+pkgdesc="ROS - Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations."
+url='https://github.com/cartographer-project/cartographer_ros'
+
+pkgname='ros-noetic-cartographer-rviz-git'
+pkgver=r584.151c563
+arch=('i686' 'x86_64' 'aarch64' 'armv7h' 'armv6h')
+pkgrel=1
+license=('Apache 2.0')
+provides=(${pkgname::-4})
+
+ros_makedepends=(
+ ros-noetic-message-runtime
+ ros-noetic-cartographer
+ ros-noetic-cartographer-ros
+ ros-noetic-rviz
+ ros-noetic-catkin
+ ros-noetic-cartographer-ros-msgs
+ ros-noetic-roslib
+ ros-noetic-eigen-conversions
+ ros-noetic-roscpp
+)
+makedepends=(
+ cmake
+ ros-build-tools
+ ${ros_makedepends[@]}
+ gcc
+ qt5-base
+ abseil-cpp-git
+)
+
+ros_depends=(
+ ros-noetic-message-runtime
+ ros-noetic-cartographer
+ ros-noetic-cartographer-ros
+ ros-noetic-rviz
+ ros-noetic-cartographer-ros-msgs
+ ros-noetic-roslib
+ ros-noetic-eigen-conversions
+ ros-noetic-roscpp
+)
+
+depends=(
+ ${ros_depends[@]}
+ qt5-base
+ abseil-cpp-git
+)
+
+source=(
+ $pkgname::git://github.com/cartographer-project/cartographer_ros.git
+ CMakeLists.patch
+)
+
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+sha256sums=(
+ 'SKIP'
+ '7e706acef5e7029a50acee352221a035605ecc51b81d32f795f9c1c9be646556'
+)
+
+prepare() {
+ cd "${srcdir}/${pkgname}/cartographer_rviz"
+ patch -uN CMakeLists.txt ../../CMakeLists.patch || return 1
+}
+
+build() {
+ # Use ROS environment variables
+ source /usr/share/ros-build-tools/clear-ros-env.sh
+ [ -f /opt/ros/noetic/setup.bash ] && source /opt/ros/noetic/setup.bash
+
+ # Create build directory
+ [ -d ${srcdir}/build ] || mkdir ${srcdir}/build
+ cd ${srcdir}/build
+
+ # Build project
+ cmake ${srcdir}/${pkgname}/cartographer_rviz \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCATKIN_ENABLE_TESTING=0 \
+ -DCATKIN_BUILD_BINARY_PACKAGE=ON \
+ -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DPYTHON_INCLUDE_DIR=/usr/include/python3.9 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython3.9.so \
+ -DPYTHON_BASENAME=-python3.9 \
+ -DSETUPTOOLS_DEB_LAYOUT=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}/" install
+}