#
-# TODO: some unpackaged libs, should we pack them as ghosts?
-#
-%bcond_without tests
+# Conditional build:
+%bcond_without tests # unit tests
+
Summary: Arbitrary precision calculator
Summary(pl.UTF-8): Kalkulator operujący na liczbach z dowolną dokładnością
Name: calc
-Version: 2.12.4.3
-Release: 2
+Version: 2.15.0.2
+Release: 1
License: LGPL v2.1+
Group: Applications/Math
Source0: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2
-# Source0-md5: d95dccde71cc8d920af0f8375e85e9c8
+# Source0-md5: 232590e366c3f51de993d99252d9ad34
Source1: %{name}.desktop
Patch0: %{name}-ppc.patch
URL: http://www.isthe.com/chongo/tech/comp/calc/
BuildRequires: sed >= 4.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# libraries have circular dependencies
+%define no_install_post_check_so 1
+
%description
Calc is arbitrary precision arithmetic system that uses a C-like
language. Calc is useful as a calculator, an algorithm prototyped and
Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki statyczne Calca
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Obsoletes: calc-static
+Obsoletes: calc-static < 2.11.8
%description devel
These header files and static libraries are neccessary to build
install -D %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-rm -f $RPM_BUILD_ROOT%{_datadir}/calc/README
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/calc/README
find $RPM_BUILD_ROOT%{_datadir}/calc -type f | \
xargs %{__sed} -i -e 's|#!/usr/local/bin/calc|#!%{_bindir}/calc|g'
+# redundant symlinks
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so.%(echo %{version} | cut -d. -f1-3)
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
# COPYING is not just LGPL text, only some explanations
-%doc BUGS CHANGES COPYING README
+%doc BUGS CHANGES COPYING README.md
%attr(755,root,root) %{_bindir}/calc
%attr(755,root,root) %{_libdir}/libcalc.so.*.*.*.*
%attr(755,root,root) %{_libdir}/libcustcalc.so.*.*.*.*