Skip to content

Commit

Permalink
rpkg: Use %setup in %prep, add version to tarball
Browse files Browse the repository at this point in the history
By automatically generating the name of the source tarball, an
rpkg macro is no longer needed for the setup macro in %prep.
  • Loading branch information
sl-mlx committed Aug 4, 2020
1 parent ce84a23 commit 740ec7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mlxbf-bfscripts.spec.rpkg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BuildArch: noarch
# cd bfscripts
# git checkout {{{ v=$(git describe --tags); if grep -q -- '-g' <<<"$v"; then printf $(git rev-parse HEAD); else printf "$v"; fi }}}
# rpkg spec --sources
Source: {{{ git_dir_pack dir_name=bfscripts source_name=mlxbf-bfscripts.tar.gz }}}
Source: {{{ name=$(rpmspec -q --qf "%{name}-%{version}\n" mlxbf-bfscripts.spec.rpkg); git_dir_pack dir_name="$name" source_name="$name".tar.gz }}}

BuildRequires: systemd-rpm-macros
BuildRequires: python3-devel
Expand All @@ -37,8 +37,7 @@ Requires: systemd
Useful scripts for managing Mellanox BlueField hardware.

%prep
# Note: source generated by rpkg, see Source
{{{ git_dir_setup_macro dir_name=bfscripts }}}
%setup
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" mlx-mkbfb

%build
Expand Down

0 comments on commit 740ec7d

Please sign in to comment.