initial commit
This commit is contained in:
commit
9723055fa6
7 changed files with 60 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
debs/*.deb
|
||||||
|
debs/*.ddeb
|
||||||
|
src/*/
|
||||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
FROM ros:humble
|
||||||
|
|
||||||
|
RUN mkdir -p /ros2/src
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y \
|
||||||
|
python3-bloom \
|
||||||
|
python3-rosdep \
|
||||||
|
fakeroot \
|
||||||
|
debhelper \
|
||||||
|
dh-python \
|
||||||
|
&& rosdep init; exit 0 \
|
||||||
|
&& rosdep update \
|
||||||
|
&& rosdep install --from paths /ros2/src -y --ignore-src \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
ENV TERM xterm-256color
|
||||||
|
|
||||||
|
WORKDIR /ros2/src
|
||||||
|
|
||||||
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
CMD [""]
|
||||||
|
|
||||||
2
build
Executable file
2
build
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
docker build . -t ros2-deb-builder
|
||||||
0
debs/.gitkeep
Normal file
0
debs/.gitkeep
Normal file
25
entrypoint.sh
Normal file
25
entrypoint.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
PKGS="$@"
|
||||||
|
|
||||||
|
cp -R /src/* /ros2/src/
|
||||||
|
|
||||||
|
for pkg in $PKGS; do
|
||||||
|
echo "Processing $pkg"
|
||||||
|
current_dir=$(pwd)
|
||||||
|
cd "$pkg"
|
||||||
|
bloom-generate rosdebian
|
||||||
|
export DEB_BUILD_OPTIONS="parallel=`nproc`"
|
||||||
|
fakeroot debian/rules "binary --parallel"
|
||||||
|
cd "${current_dir}"
|
||||||
|
done
|
||||||
|
|
||||||
|
PKGS=$(find . -type f -name '*.deb')
|
||||||
|
for pkg in $PKGS; do
|
||||||
|
mv "$pkg" /debs/
|
||||||
|
done
|
||||||
|
|
||||||
|
PKGS=$(find . -type f -name '*.ddeb')
|
||||||
|
for pkg in $PKGS; do
|
||||||
|
mv "$pkg" /debs/
|
||||||
|
done
|
||||||
3
run
Executable file
3
run
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
docker run -v ./debs:/debs -v ./src:/src ros2-deb-builder:latest px4_msgs
|
||||||
|
|
||||||
0
src/.gitkeep
Normal file
0
src/.gitkeep
Normal file
Loading…
Reference in a new issue