-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
%global debug_package %{nil} | ||
|
||
Name: fend | ||
Version: 1.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 |