summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b0d07a6738d3775d4099a80aba0685147417d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
_pkgname=octomap_server
pkgname=ros2-humble-octomap-server
pkgver=2.0.0
path="octomap_mapping-$pkgver/$_pkgname"
pkgrel=1
pkgdesc="Loads a 3D map (as Octree-based OctoMap) and distributes it to other nodes."
url="https://index.ros.org/p/$_pkgname/"
arch=('any')
depends=('ros2-humble' 'ros2-humble-octomap-ros')
source=("https://github.com/OctoMap/octomap_mapping/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('da4e946a0a7f448d548ab4026f48f1f3bb49d5db90e7420d0b1b2faf6244a50a')

prepare() {
    #https://github.com/OctoMap/octomap_mapping/pull/118 
    sed -i "1113s/FilterLimits//" $srcdir/$path/src/octomap_server.cpp
}

build() {
    source /opt/ros/humble/setup.bash

    cmake -B build -S "$path" \
        -DCMAKE_BUILD_TYPE='Release' \
        -DCMAKE_INSTALL_PREFIX='/opt/ros/humble' \
        -Wno-dev
    
    cmake --build build
}

package() {
    DESTDIR="$pkgdir" cmake --install build
}