summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimon Engelke2018-09-07 23:02:44 +0200
committerTimon Engelke2018-09-08 00:35:40 +0200
commitca8c9200b2d1385b151d4815f8b6c92a56052fa9 (patch)
treee6b223ece89ef2aa57ecedc2613332c02e463716
downloadaur-ca8c9200b2d1385b151d4815f8b6c92a56052fa9.tar.gz
Initial
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD48
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..44e5a4ac09d2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = ros-melodic-libviso2
+ pkgdesc = Library for visual odometry
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = http://moveit.ros.org
+ arch = any
+ license = BSD
+ makedepends = cmake
+ makedepends = gcc-libs
+ depends = gcc-libs
+ source = viso2::git+https://github.com/srv/viso2.git
+ sha256sums = SKIP
+
+pkgname = ros-melodic-libviso2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1ad51db98ba5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Timon Engelke <aur@timonengelke.de>
+pkgdesc="ROS - Library for visual odometry"
+url='http://www.ros.org/wiki/viso2'
+
+pkgname='ros-melodic-libviso2'
+pkgver='0.0.1'
+_pkgver_patch=0
+arch=('any')
+pkgrel=1
+license=('GPL')
+
+makedepends=('cmake' 'gcc-libs')
+depends=('gcc-libs')
+
+_dir="viso2/libviso2"
+source=("viso2"::"git+https://github.com/srv/viso2.git")
+sha256sums=('SKIP')
+
+prepare() {
+ sed -i -e "/install(DIRECTORY/s/$/\//" -e "/PATTERN/s/.cpp/*.cpp/" ${srcdir}/${_dir}/CMakeLists.txt
+}
+
+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
+
+ # 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.7 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython3.7.so \
+ -DPYTHON_BASENAME=-python3.7 \
+ -DSETUPTOOLS_DEB_LAYOUT=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}/" install
+}