diff options
author | Finn-Thorben Sell | 2019-07-13 09:01:59 +1000 |
---|---|---|
committer | Finn-Thorben Sell | 2019-07-13 09:01:59 +1000 |
commit | d5db08f3b2707e360d46d77e48b48fd0383df6d1 (patch) | |
tree | 58d2755317da0ea4328c0da1e29fbd06e2841b0f /PKGBUILD | |
download | aur-ros-dashing-ament-cmake-core.tar.gz |
add package to aur
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0d12c29d7e9f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Finn-Thorben Sell <aur@finn-thorben.me> +pkgname="ros-dashing-ament-cmake-core" +pkgdesc="ROS - The core of the ament buildsystem in CMake" +url="https://index.ros.org/doc/ros2/" +license=("Apache License 2.0") + +pkgver=0.7.3 +_pkgver_patch=0 +pkgrel=1 +arch=('any') + +_ros_makedepends=() +makedepends=(ros-build-tools + ${_ros_makedepends[@]}) + +_ros_depends=(ros-dashing-ament-package) +depends=(cmake python-setuptools python-catkin_pkg + ${_ros_depends[@]}) + +_dir="ament_cmake-release-release-dashing-ament_cmake_core" +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ros2-gbp/ament_cmake-release/archive/release/dashing/ament_cmake_core/${pkgver}-${_pkgver_patch}.tar.gz") +sha256sums=('9339e4ee30d0325f8ea35222fef0874fb6a9b8fda71a3d45a54a8dd375549693') + + +build() { + # Figure out installed python version + PYTHON_VERSION=$(python --version | cut -d " " -f 2 | sed 's/\.[0-9]$//g') + + # Use empty ROS dashing environment + export ROS_PREFIX=/opt/ros/dashing + source /usr/share/ros-build-tools/clear-ros-env.sh + [ -f ${ROS_PREFIX}/setup.bash ] && source ${ROS_PREFIX}/setup.bash + export PYTHONPATH="${PYTHONPATH}:${ROS_PREFIX}/lib/python${PYTHON_VERSION}/site-packages" + + # Create build directory + [ -d "${srcdir}/build" ] || mkdir "${srcdir}/build" + cd "${srcdir}/build" + + # Build package + cmake "${srcdir}/${_dir}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=Off \ + -DCMAKE_INSTALL_PREFIX=${ROS_PREFIX} + make +} + + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}/" install +} |