2006-12-19 00:15:12 +01:00
|
|
|
#
|
2011-12-02 09:25:47 +01:00
|
|
|
# spec file for package bc
|
2006-12-19 00:15:12 +01:00
|
|
|
#
|
2024-06-20 12:00:58 +02:00
|
|
|
# TEST
|
2020-10-15 16:22:35 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2006-12-19 00:15:12 +01:00
|
|
|
#
|
2009-06-18 17:00:27 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-03-13 11:51:45 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:15:12 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2007-03-29 12:10:29 +02:00
|
|
|
Name: bc
|
2017-04-10 10:02:06 +02:00
|
|
|
Version: 1.07.1
|
2011-12-02 09:25:47 +01:00
|
|
|
Release: 0
|
2007-03-29 12:10:29 +02:00
|
|
|
Summary: GNU Command Line Calculator
|
2019-03-13 11:51:45 +01:00
|
|
|
License: GPL-2.0-or-later
|
2012-05-31 17:21:28 +02:00
|
|
|
Group: Productivity/Scientific/Math
|
2020-10-15 16:22:35 +02:00
|
|
|
URL: https://www.gnu.org/software/bc/
|
2017-04-10 10:02:06 +02:00
|
|
|
Source0: https://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz
|
|
|
|
Source1: https://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz.sig
|
|
|
|
Source2: %{name}.keyring
|
2019-03-13 11:51:45 +01:00
|
|
|
# Correct return value after 'q' [bsc#1129038]
|
|
|
|
Patch2: bc-dc-correct-return-value.patch
|
2014-11-28 21:49:52 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: ed
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
Requires(post): %{install_info_prereq}
|
2015-03-17 07:30:03 +01:00
|
|
|
Requires(preun): %{install_info_prereq}
|
2006-12-19 00:15:12 +01:00
|
|
|
|
|
|
|
%description
|
2007-03-29 12:10:29 +02:00
|
|
|
bc is an interpreter that supports numbers of arbitrary precision and
|
|
|
|
the interactive execution of statements. The syntax has some
|
|
|
|
similarities to the C programming language. A standard math library is
|
2006-12-19 00:15:12 +01:00
|
|
|
available through command line options. When used, the math library is
|
2007-03-29 12:10:29 +02:00
|
|
|
read in before any other input files. bc then reads in all other files
|
2006-12-19 00:15:12 +01:00
|
|
|
from the command line, evaluating their contents. Then bc reads from
|
|
|
|
standard input (usually the keyboard).
|
|
|
|
|
2007-03-29 12:10:29 +02:00
|
|
|
The dc program is also included. dc is a calculator that supports
|
2006-12-19 00:15:12 +01:00
|
|
|
reverse-polish notation and allows unlimited precision arithmetic.
|
|
|
|
Macros can also be defined. Normally, dc reads from standard input but
|
|
|
|
can also read in files specified on the command line. A calculator with
|
|
|
|
reverse-polish notation saves numbers to a stack. Arguments to
|
|
|
|
mathematical operations (operands) are "pushed" onto the stack until
|
2007-03-29 12:10:29 +02:00
|
|
|
the next operator is read in, which "pops" its arguments off the stack
|
2006-12-19 00:15:12 +01:00
|
|
|
and "pushes" its results back onto the stack.
|
|
|
|
|
|
|
|
%prep
|
2024-02-22 11:11:44 +01:00
|
|
|
%autosetup -p1
|
2006-12-19 00:15:12 +01:00
|
|
|
|
|
|
|
%build
|
2014-11-28 21:49:52 +01:00
|
|
|
%configure \
|
2017-04-10 10:02:06 +02:00
|
|
|
--with-readline \
|
|
|
|
--without-libedit
|
2014-11-28 21:49:52 +01:00
|
|
|
make %{?_smp_mflags}
|
2006-12-19 00:15:12 +01:00
|
|
|
|
|
|
|
%install
|
2017-04-10 10:02:06 +02:00
|
|
|
%make_install
|
2006-12-19 00:15:12 +01:00
|
|
|
|
|
|
|
%post
|
2017-04-10 10:02:06 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/bc.info%{ext_info}
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/dc.info%{ext_info}
|
2006-12-19 00:15:12 +01:00
|
|
|
|
2015-03-17 07:30:03 +01:00
|
|
|
%preun
|
2017-04-10 10:02:06 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bc.info%{ext_info}
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/dc.info%{ext_info}
|
2006-12-19 00:15:12 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2019-08-29 16:32:10 +02:00
|
|
|
%license COPYING.LIB COPYING
|
|
|
|
%doc NEWS README FAQ
|
2014-11-28 21:49:52 +01:00
|
|
|
%{_bindir}/bc
|
|
|
|
%{_bindir}/dc
|
2017-04-10 10:02:06 +02:00
|
|
|
%{_infodir}/bc.info%{ext_info}
|
|
|
|
%{_infodir}/dc.info%{ext_info}
|
|
|
|
%{_mandir}/man1/bc.1%{ext_man}
|
|
|
|
%{_mandir}/man1/dc.1%{ext_man}
|
2006-12-19 00:15:12 +01:00
|
|
|
|
2007-03-29 12:10:29 +02:00
|
|
|
%changelog
|