diff options
author | MichaelChou | 2018-08-02 13:52:24 +0800 |
---|---|---|
committer | MichaelChou | 2018-08-02 13:52:24 +0800 |
commit | b8cf4b9a3408666bc5f5527f9dc0fd9e62ad1287 (patch) | |
tree | 7f2f04b8031269ff8fc0a5aac1ad08deccbd9a7e /PKGBUILD | |
download | aur-b8cf4b9a3408666bc5f5527f9dc0fd9e62ad1287.tar.gz |
0.8.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9993c8048fcf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: michaelchou <michaeljchou at the hotmail domain which is .com> +# Contributor: michaelchou <michaeljchou at the hotmail domain which is .com> + +pkgname=ros-melodic-socketcan-bridge +_pkgname=socketcan_bridge +pkgdesc='Conversion nodes for messages from SocketCAN to a ROS Topic and vice versa.' +url="http://wiki.ros.org/${_pkgname}?distro=melodic" + +pkgver=0.8.0 +pkgrel=1 +arch=('any') +license=('LGPL3') + +_parent_pkgname="ros_canopen" +_dir="ros_canopen-${pkgver}" +source=("${_parent_pkgname}-${pkgver}.tar.gz::https://github.com/ros-industrial/ros_canopen/archive/${pkgver}.tar.gz") +sha256sums=('b822d2a70eb273076d7dfde847bd52593d6577503207beb98a43b96855f64250') + +ros_makedepends=( +) +makedepends=(cmake ros-build-tools ${ros_makedepends[@]}) + +ros_depends=( + ros-melodic-can-msgs + ros-melodic-roscpp + ros-melodic-socketcan-interface +) +depends=(${ros_depends[@]}) + +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 + +# # Fix Python2/Python3 conflicts +# /usr/share/ros-build-tools/fix-python-scripts.sh -v 2 ${srcdir}/${_dir} + + # Create build directory + [ -d ${srcdir}/build ] || mkdir -p ${srcdir}/build + cd ${srcdir}/build + + # Build project + cmake ${srcdir}/${_dir}/${_pkgname} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCATKIN_BUILD_BINARY_PACKAGE=ON \ + -DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \ + -DPYTHON_EXECUTABLE=/usr/bin/python2 \ +# -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \ +# -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \ +# -DPYTHON_BASENAME=-python2.7 \ +# -DSETUPTOOLS_DEB_LAYOUT=OFF + make +} + +package() { + cd ${srcdir}/build + make DESTDIR="${pkgdir}/" install +} |