Skip to content

Commit

Permalink
More RPM spec fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Feb 13, 2025
1 parent f855d07 commit 39b7502
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/actions/build-rpm-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ runs:
docker run --rm \
-v "$GITHUB_WORKSPACE:/workspace" \
-e ICE_VERSION="${{ inputs.ice_version }}" \
-e GIT_TAG="${{ github.ref_name }}" \
-e TARGET_ARCH="${{ inputs.arch }}" \
ice-rpm-package-builder /workspace/ice/packaging/rpm/build-package.sh
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions packaging/rpm/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ RPM_MACROS=()
RPM_MACROS+=(-D "_topdir $RPM_BUILD_ROOT")
RPM_MACROS+=(-D "vendor ZeroC, Inc.")

if [[ -n "${GIT_TAG:-}" ]]; then
RPM_MACROS+=(-D "git_tag $GIT_TAG")
fi

# Download sources
cd "$RPM_BUILD_ROOT/SOURCES"
spectool -g "$ICE_SPEC_DEST" || { echo "Error: Failed to download sources."; exit 1; }
Expand Down
7 changes: 2 additions & 5 deletions packaging/rpm/ice.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
#
%if 0%{?git_tag:1}
%define archive_tag %{git_tag}
%define archive_dir_suffix %{git_tag}
%else
# if git_tag is not defined we build the package from the main branch.
%define archive_tag main
%define archive_dir_suffix main
%define archive_tag main
%endif

%define shadow shadow-utils
Expand Down Expand Up @@ -354,7 +351,7 @@ your application logic.
%endif #%{_host_cpu}

%prep
%setup -q -n ice-%{archive_dir_suffix}
%setup -q -n %{name}-%{version}

%build
#
Expand Down

0 comments on commit 39b7502

Please sign in to comment.