diff options
author | Timon Engelke | 2018-09-07 16:09:04 +0200 |
---|---|---|
committer | Timon Engelke | 2018-09-07 16:09:04 +0200 |
commit | a50cef676992028dc9b40ef828bdad3cc59ed52d (patch) | |
tree | 0b3ec0939ea5d61633dbe7649391ac503d4d5e63 /PKGBUILD | |
download | aur-a50cef676992028dc9b40ef828bdad3cc59ed52d.tar.gz |
Initial
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3b797175e01a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Timon Engelke <aur@timonengelke.de> +pkgdesc="ROS - amcl is a probabilistic localization system for a robot moving in 2D." +url='http://wiki.ros.org/amcl' + +pkgname='ros-melodic-amcl' +pkgver='1.16.2' +_pkgver_patch=0 +arch=('any') +pkgrel=1 +license=('LGPL') + +ros_makedepends=(ros-melodic-tf + ros-melodic-roscpp + ros-melodic-rostest + ros-melodic-std-srvs + ros-melodic-nav-msgs + ros-melodic-catkin + ros-melodic-dynamic-reconfigure + ros-melodic-message-filters) +makedepends=('cmake' 'ros-build-tools' + ${ros_makedepends[@]}) + +ros_depends=(ros-melodic-dynamic-reconfigure + ros-melodic-tf + ros-melodic-roscpp + ros-melodic-nav-msgs) +depends=(${ros_depends[@]}) + +# Git version (e.g. for debugging) +# _tag=release/melodic/amcl/${pkgver}-${_pkgver_patch} +# _dir=${pkgname} +# source=("${_dir}"::"git+https://github.com/ros-gbp/navigation-release.git"#tag=${_tag}) +# sha256sums=('SKIP') + +# Tarball version (faster download) +_dir="navigation-release-release-melodic-amcl-${pkgver}-${_pkgver_patch}" +source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-gbp/navigation-release/archive/release/melodic/amcl/${pkgver}-${_pkgver_patch}.tar.gz") +sha256sums=('01fc59bbf881b23905d1df0d056f0d2a76d1ce4801c70e68f3f6bfb7f2a6c818') + +build() { + # Use ROS environment variables + source /usr/share/ros-build-tools/clear-ros-env.sh + [ -f /opt/ros/melodic/setup.bash ] && source /opt/ros/melodic/setup.bash + + # Create build directory + [ -d ${srcdir}/build ] || mkdir ${srcdir}/build + cd ${srcdir}/build + + # Fix Python2/Python3 conflicts + /usr/share/ros-build-tools/fix-python-scripts.sh -v 3 ${srcdir}/${_dir} + + # Build project + cmake ${srcdir}/${_dir} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCATKIN_BUILD_BINARY_PACKAGE=ON \ + -DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \ + -DPYTHON_EXECUTABLE=/usr/bin/python3 \ + -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m \ + -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so \ + -DPYTHON_BASENAME=-python3.7m \ + -DSETUPTOOLS_DEB_LAYOUT=OFF + make +} + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}/" install +} |