Skip to content

Commit

Permalink
hck: fix cmake config for EL7
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Apr 16, 2024
1 parent bc10e26 commit c263f7d
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions specs/hck.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

Name: hck
Version: 0.10.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A sharp cut(1) clone

License: MIT OR Unlicense
URL: https://github.com/sstadick/hck
Source0: %{url}/archive/v%{version}.tar.gz

BuildRequires: gcc
%if 0%{?rhel} >= 8
BuildRequires: cmake
%else
BuildRequires: cmake3
%endif
BuildRequires: cmake3 gcc

%description
hck is a shortening of hack, a rougher form of cut.
Expand All @@ -33,18 +28,15 @@ filling a gap between cut and awk.
%prep
%autosetup

%if 0%{?rhel} < 8
# symlink cmake3 to cmake
mkdir -p "$HOME/.local/bin"
ln -s "/usr/bin/cmake3" "$HOME/.local/bin/cmake"
%endif

# use latest stable version from rustup
curl -Lf "https://sh.rustup.rs" | sh -s -- --profile minimal -y

%build
source ~/.cargo/env
RUSTFLAGS="-C strip=symbols" cargo build --release

# On EL7 `cmake` links to cmake2
CMAKE=cmake3 RUSTFLAGS="-C strip=symbols" cargo build --release

%check
source ~/.cargo/env
Expand All @@ -60,6 +52,9 @@ install -Dpm 755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
%{_bindir}/%{name}

%changelog
* Tue Apr 16 2024 cyqsimon - 0.10.0-2
- Fix cmake config for EL7

* Tue Apr 16 2024 cyqsimon - 0.10.0-1
- Release 0.10.0

Expand Down

0 comments on commit c263f7d

Please sign in to comment.