Sophie

Sophie

distrib > Arklinux > devel > x86_64 > by-pkgid > 5166b44b3b9c8c47bf59b04b24ea223f > files > 5

bc-1.06-13ark.src.rpm

Summary: GNU's bc (a numeric processing language) and dc (a calculator).
Name: bc
Version: 1.06
Release: 13ark
License: GPL
URL: http://www.gnu.org/software/bc/
Group: Applications/Engineering
Source: ftp://ftp.gnu.org/gnu/bc/bc-%{version}.tar.lz
Patch1: bc-1.06-readline42.patch
Patch2: bc-1.06-s390.patch
Patch3: bc-1.06-flex-2.5.33.patch
Prereq: /sbin/install-info grep
Buildroot: %{_tmppath}/%{name}-%{version}-root

%description
The bc package includes bc and dc. Bc is an arbitrary precision
numeric processing arithmetic language. Dc is an interactive
arbitrary precision stack based calculator, which can be used as a
text mode calculator.

Install the bc package if you need its number handling capabilities or
if you would like to use its text mode calculator.

%prep
%setup -q
%patch1 -p1 -b .rl22~
%patch2 -p1 -b .s390~
%patch3 -p1 -b .flex~
aclocal
autoheader
automake -a
autoconf

%build
%configure --with-readline
make %?_smp_mflags

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir


%clean
rm -rf $RPM_BUILD_ROOT

%post
# previous versions of bc put an improper entry into %{_infodir}/dir -- remove
# it
if grep 'dc: (bc)' %{_infodir}/dir > /dev/null; then
    tmpfile=`mktemp ${_infodir}/dir.XXXXXX`
    grep -v 'The GNU RPN calculator' < %{_infodir}/dir > $tmpfile
    mv -f $tmpfile %{_infodir}/dir
fi

/sbin/install-info %{_infodir}/dc.info.bz2 %{_infodir}/dir --entry="* dc: (dc).                      The GNU RPN calculator."

%preun
if [ $1 = 0 ]; then
  /sbin/install-info --delete %{_infodir}/dc.info.bz2 %{_infodir}/dir --entry="* dc: (dc).                      The GNU RPN calculator."
fi

%files
%defattr(-,root,root)
%doc COPYING COPYING.LIB FAQ AUTHORS NEWS README
/usr/bin/dc
/usr/bin/bc
%{_mandir}/*/*
%{_infodir}/*.*

%changelog
* Fri Jan 11 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 1.06-13ark
- Rebuild to get a package into the x86_64 tree and to benefit from gcc 4.3
  optimizations
- Truncate changelog, everything in there was prehistoric (only "automated
  rebuild" entries in the last 6 years...)
- Make it compile with flex 2.5.33