summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhirui Dai2023-10-08 23:07:13 -0700
committerZhirui Dai2023-10-08 23:07:13 -0700
commitc0dc0896212ddf814b2081a46a05abe78399cd57 (patch)
tree4d620e6572d45606b243605e8a503f321e7dc993
downloadaur-c0dc0896212ddf814b2081a46a05abe78399cd57.tar.gz
0.2.11
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD76
-rwxr-xr-xfix-python-scripts.sh48
3 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..73632a3afd3c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = ros-noetic-rosdoc-lite
+ pkgdesc="ROS - This ROS package wraps documentation tools like doxygen, sphinx, and epydoc, making it convenient to generate ROS package documentation."
+ pkgver=0.2.11
+ pkgrel=1
+ url='http://wiki.ros.org/rosdoc_lite'
+ arch = i686
+ arch = x86_64
+ arch = aarch64
+ arch = armv7h
+ arch = armv6h
+ license = BSD
+ makedepends = cmake
+ makedepends = ros-build-tools
+ makedepends = ros-noetic-catkin
+ makedepends = python-setuptools
+ depends = graphviz
+ depends = epydoc
+ depends = python-rospkg
+ depends = python-yaml
+ depends = doxygen
+ depends = python-sphinx
+ depends = python-kitchen
+ depends = python-catkin_pkg
+ source = ros-noetic-rosdoc-lite-0.2.11.tar.gz::https://github.com/ros-infrastructure/rosdoc_lite/archive/refs/tags/0.2.11.tar.gz
+ source = fix-python-scripts.sh
+ sha256sums = 5a987c22435aaf9a5e0b5d3065e5efb431720b890bfedda3965d127686c49aa5
+ sha256sums = 91138936856fad15bc66402db3e2571fb77ef41fe92f7713728410ee484718b6
+
+pkgname = ros-noetic-rosdoc-lite
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..768597da91a6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,76 @@
+pkgdesc="ROS - This ROS package wraps documentation tools like doxygen, sphinx, and epydoc, making it convenient to generate ROS package documentation."
+url='http://wiki.ros.org/rosdoc_lite'
+
+pkgname='ros-noetic-rosdoc-lite'
+pkgver='0.2.11'
+arch=('i686' 'x86_64' 'aarch64' 'armv7h' 'armv6h')
+pkgrel=1
+license=('BSD')
+
+ros_makedepends=(
+ ros-noetic-catkin
+)
+
+makedepends=(
+ cmake
+ ros-build-tools
+ ${ros_makedepends[@]}
+ python-setuptools
+)
+
+ros_depends=(
+ ros-noetic-genmsg
+)
+
+depends=(
+ ${ros_depends[@]}
+ graphviz
+ epydoc
+ python-rospkg
+ python-yaml
+ doxygen
+ python-sphinx
+ python-kitchen
+ python-catkin_pkg
+)
+
+_dir="rosdoc_lite-${pkgver}/"
+source=(
+ "${pkgname}-${pkgver}.tar.gz"::"https://github.com/ros-infrastructure/rosdoc_lite/archive/refs/tags/${pkgver}.tar.gz"
+ "fix-python-scripts.sh"
+)
+sha256sums=(
+ '5a987c22435aaf9a5e0b5d3065e5efb431720b890bfedda3965d127686c49aa5'
+ '91138936856fad15bc66402db3e2571fb77ef41fe92f7713728410ee484718b6'
+)
+
+
+build() {
+ # Use ROS environment variables
+ source /usr/share/ros-build-tools/clear-ros-env.sh
+ [ -f /opt/ros/noetic/setup.bash ] && source /opt/ros/noetic/setup.bash
+
+ # Create build directory
+ [ -d ${srcdir}/build ] || mkdir ${srcdir}/build
+ cd ${srcdir}/build
+
+ # Fix Python2/Python3 conflicts
+ $srcdir/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/noetic \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython3.11.so \
+ -DPYTHON_BASENAME=.cpython-311 \
+ -DSETUPTOOLS_DEB_LAYOUT=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}/" install
+}
diff --git a/fix-python-scripts.sh b/fix-python-scripts.sh
new file mode 100755
index 000000000000..cfbc307b58b0
--- /dev/null
+++ b/fix-python-scripts.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 [-v/--version PYTHON_VERSION] <directory>"
+ echo ""
+ echo "Makes sure that all Python scripts use the right python command."
+ echo "PYTHON_VERSION: either 2 or 3 (default = 2)."
+ echo "
+Note that according to PEP 394, developers should use \"python\" in
+the shebang line for code compatible with both Python 2 and 3, but
+since this may not be the case, we always overwrite the shebang line.
+For more information: http://legacy.python.org/dev/peps/pep-0394/"
+ exit 1
+fi
+
+# Default Python version: 2
+PYTHON_VERSION=2
+
+while [[ $# > 1 ]]
+do
+ key="$1"
+ shift
+
+ case $key in
+ -v|--version)
+ PYTHON_VERSION="$1"
+ shift
+ ;;
+ *)
+ # unknown option
+ ;;
+ esac
+done
+
+# Check user input
+if [[ "$PYTHON_VERSION" != "2" && "$PYTHON_VERSION" != "3" ]]; then
+ echo "Error: invalid Python version given: $PYTHON_VERSION"
+ exit 2
+fi
+
+for file in $(grep -rl -e 'env python *$' -e 'bin/python *$' $1); do
+ if [ -z "$file" ]; then
+ echo "Error finding files."
+ exit 1
+ fi
+ sed -i "s,env python *$,env python${PYTHON_VERSION},g" $file
+ sed -i "s,/usr/bin/python *$,/usr/bin/env python${PYTHON_VERSION},g" $file
+done