Skip to content

Commit

Permalink
Add fend.spec based on sd.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Dec 27, 2023
1 parent c155d0b commit e11ca62
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions specs/fend.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
%global debug_package %{nil}

Name: fend
Version: v1.4.0
Release: 1%{?dist}
Summary: Arbitrary-precision unit-aware calculator

License: GPLv3+
URL: https://github.com/printfn/fend
Source0: %{url}/archive/v%{version}.tar.gz

BuildRequires: gcc pandoc

%description
fend is an arbitrary-precision unit-aware calculator

Unique features:

- Arbitrary-precision arithmetic using rational numbers
- Full support for complex numbers
- D&D-style dice rolls
- Variables
- Binary, octal, hexadecimal and all other bases between 2 and 36
- Keep track of units, with support for SI, US and UK customary and many
historical units
- Emacs-style CLI shortcuts
- Trigonometric functions
- Lambda calculus

%prep
%autosetup

# 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 --package %{name}

./documentation/build.sh

%check
source ~/.cargo/env
cargo test --package %{name} --package %{name}-core

%install
# bin
install -Dpm 755 target/release/%{name} %{buildroot}%{_bindir}/%{name}

# manpage
install -Dpm 644 documentation/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1

%files
%license LICENSE.md
%doc CHANGELOG.md README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*

%changelog
* Wed Dec 27 2023 cyqsimon - v1.4.0-1
- Release v1.4.0

0 comments on commit e11ca62

Please sign in to comment.