summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD68
2 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d8fced06170
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = ros-noetic-cartographer-ros-msgs-git
+ pkgdesc = ROS - ROS messages for the cartographer_ros package.
+ pkgver = r584.151c563
+ pkgrel = 1
+ url = https://github.com/googlecartographer/cartographer_ros
+ arch = i686
+ arch = x86_64
+ arch = aarch64
+ arch = armv7h
+ arch = armv6h
+ license = Apache 2.0
+ makedepends = cmake
+ makedepends = ros-build-tools
+ makedepends = ros-noetic-std-msgs
+ makedepends = ros-noetic-catkin
+ makedepends = ros-noetic-geometry-msgs
+ makedepends = ros-noetic-message-generation
+ depends = ros-noetic-message-runtime
+ depends = ros-noetic-geometry-msgs
+ depends = ros-noetic-std-msgs
+ provides = ros-noetic-cartographer-ros-msgs
+ source = ros-noetic-cartographer-ros-msgs-git::git://github.com/cartographer-project/cartographer_ros.git
+ sha256sums = SKIP
+
+pkgname = ros-noetic-cartographer-ros-msgs-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..295e1f1e08b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Achmad Fathoni<fathoni.id(at)gmail.com>
+
+pkgdesc="ROS - ROS messages for the cartographer_ros package."
+url='https://github.com/googlecartographer/cartographer_ros'
+
+pkgname='ros-noetic-cartographer-ros-msgs-git'
+pkgver=r584.151c563
+arch=('i686' 'x86_64' 'aarch64' 'armv7h' 'armv6h')
+pkgrel=1
+license=('Apache 2.0')
+provides=(${pkgname::-4})
+
+ros_makedepends=(
+ ros-noetic-std-msgs
+ ros-noetic-catkin
+ ros-noetic-geometry-msgs
+ ros-noetic-message-generation
+)
+
+makedepends=(
+ cmake
+ ros-build-tools
+ ${ros_makedepends[@]}
+)
+
+ros_depends=(
+ ros-noetic-message-runtime
+ ros-noetic-geometry-msgs
+ ros-noetic-std-msgs
+)
+depends=(${ros_depends[@]})
+
+source=($pkgname::git://github.com/cartographer-project/cartographer_ros.git)
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+
+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_ros_msgs \
+ -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
+}