This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
72 lines (60 loc) · 1.62 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
pkgdesc="ROS - Low-level build system macros and infrastructure for ROS."
url='https://www.wiki.ros.org/catkin'
pkgname='ros-melodic-catkin'
pkgver='0.7.29'
epoch=1
arch=('any')
pkgrel=3
license=('BSD')
ros_makedepends=(
)
makedepends=(
'cmake'
${ros_makedepends[@]}
python-catkin_pkg
python-empy
python
)
ros_depends=(
)
depends=(
${ros_depends[@]}
python-nose
gtest
python-catkin_pkg
python-empy
gmock
python
ros-build-tools-py3
)
_dir="catkin-${pkgver}/"
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/ros/catkin/archive/${pkgver}.tar.gz"
"${pkgname}-${pkgver}-7fa3eb3.patch"::"https://github.com/ros/catkin/commit/7fa3eb3508ba12c34d85b8e54bbdf4bbdc60a5c1.patch")
sha256sums=('8a86803b9081b19d2d37c3d028cc9f7bdfc7122f6204ec7e77ae0cbfda57ff71'
'96c39f295fedb8efd47dd7b899ac4aaa221c4a9731e117e09db001388642dbeb')
prepare() {
cd ${srcdir}/${_dir}
patch -p1 < "${srcdir}/${pkgname}-${pkgver}-7fa3eb3.patch"
}
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 the 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 the project.
cmake ${srcdir}/${_dir} \
-DCMAKE_BUILD_TYPE=Release \
-DCATKIN_BUILD_BINARY_PACKAGE=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DSETUPTOOLS_DEB_LAYOUT=OFF
make
}
package() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}/" install
}