Skip to content

Commit

Permalink
Generated RPM files for 8
Browse files Browse the repository at this point in the history
  • Loading branch information
victorpaleologue committed Nov 20, 2023
1 parent 5090ddd commit 722a3ca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 33 deletions.
Empty file added .write_tar
Empty file.
59 changes: 26 additions & 33 deletions rpm/template.spec.em → rpm/template.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@
%bcond_without weak_deps

%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$
%global __provides_exclude_from ^/opt/ros/humble/.*$
%global __requires_exclude_from ^/opt/ros/humble/.*$

Name: @(Package)
Version: @(Version)
Release: @(RPMInc)%{?dist}%{?release_suffix}
Summary: ROS @(Name) package
Name: ros-humble-nao-meshes
Version: 2.1.0
Release: 1%{?dist}%{?release_suffix}
Summary: ROS nao_meshes package

License: @(License)
@[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]@
License: Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License
URL: http://github.com/ros-naoqi/nao_meshes2/
Source0: %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch: noarch@\n@[end if]@

@[for p in Depends]Requires: @p@\n@[end for]@
@[for p in BuildDepends]BuildRequires: @p@\n@[end for]@
@[for p in Conflicts]Conflicts: @p@\n@[end for]@
@[for p in Replaces]Obsoletes: @p@\n@[end for]@
@[for p in Provides]Provides: @p@\n@[end for]@
@[if TestDepends]@\n%if 0%{?with_tests}
@[for p in TestDepends]BuildRequires: @p@\n@[end for]@
%endif@\n@[end if]@
@[if Supplements]@\n%if 0%{?with_weak_deps}
@[for p in Supplements]Supplements: @p@\n@[end for]@
%endif@\n@[end if]@
Requires: ros-humble-ros-workspace
BuildRequires: java
BuildRequires: ros-humble-ament-cmake
BuildRequires: ros-humble-ros-workspace
Provides: %{name}-devel = %{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}
Provides: %{name}-runtime = %{version}-%{release}

%description
@(Description)
ROS2 Meshes for the NAO robot

%prep
%autosetup -p1
Expand All @@ -37,17 +32,17 @@ Source0: %{name}-%{version}.tar.gz
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it. It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
%cmake3 \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DAMENT_PREFIX_PATH="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DCMAKE_INSTALL_PREFIX="/opt/ros/humble" \
-DAMENT_PREFIX_PATH="/opt/ros/humble" \
-DCMAKE_PREFIX_PATH="/opt/ros/humble" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
%if !0%{?with_tests}
-DBUILD_TESTING=OFF \
Expand All @@ -60,7 +55,7 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it. It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
%make_install -C .obj-%{_target_platform}

%if 0%{?with_tests}
Expand All @@ -71,18 +66,16 @@ if [ -n "$TEST_TARGET" ]; then
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it. It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi
CTEST_OUTPUT_ON_FAILURE=1 \
%make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
else echo "RPM TESTS SKIPPED"; fi
%endif

%files
@[for lf in LicenseFiles]%license @lf@\n@[end for]@
@(InstallationPrefix)
/opt/ros/humble

%changelog@
@[for change_version, (change_date, main_name, main_email) in changelogs]
* @(change_date) @(main_name) <@(main_email)> - @(change_version)
%changelog
* Mon Nov 20 2023 Victor Paleologue <[email protected]> - 2.1.0-1
- Autogenerated by Bloom
@[end for]

0 comments on commit 722a3ca

Please sign in to comment.