]> git.pld-linux.org Git - packages/calc.git/blobdiff - calc.spec
- updated to 2.12.7.2
[packages/calc.git] / calc.spec
index 164b911f85f2b839ea6b36246ae55b7aeb87e578..5bbb083a6ee04ea3a15958ef6d3ed142b2e26250 100644 (file)
--- a/calc.spec
+++ b/calc.spec
+#
+# TODO: some unpackaged libs, should we pack them as ghosts?
+#
+%bcond_without tests
 Summary:       Arbitrary precision calculator
-Summary(pl):   Kalkulator operuj±cy na liczbach z dowoln± dok³adno¶ci±
+Summary(pl.UTF-8):     Kalkulator operujący na liczbach z dowolną dokładnością
 Name:          calc
-Version:       2.11.1t3.0
+Version:       2.12.7.2
 Release:       1
-License:       GPL
+License:       LGPL v2.1+
 Group:         Applications/Math
-Group(pl):     Aplikacje/Matematyczne
-Source0:       ftp://ftp.uu.net/pub/calc/%{name}-%{version}.tar.gz
-Requires:      readline
-BuildRequires: readline-devel
-Buildroot:     /tmp/%{name}-%{version}-root
+Source0:       http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2
+# Source0-md5: 86ba447318108da52e4d9ab93e00aca9
+Source1:       %{name}.desktop
+Patch0:                %{name}-ppc.patch
+URL:           http://www.isthe.com/chongo/tech/comp/calc/
+BuildRequires: readline-devel >= 4.2
+BuildRequires: sed >= 4.0
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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 as a
-mathematical research tool. It comes with a rich set of mathematical,
-programmatic and stdio functions.
-
-%description -l pl
-Calc jest systemem arytmetycznym o nieograniczonej dok³adno¶ci, u¿ywaj±cym
-jêzyka podobnego do C. Calc jest przydatny jako kalkulator, narzêdzie do
-testowania algorytmów i do badañ matematycznych. Do samego programu
-do³±czony jest bogaty zestaw funkcji bibliotecznych - matematycznych,
-programistycznych i funkcji wej¶cia/wyj¶cia
+Calc is arbitrary precision arithmetic system that uses a C-like
+language. Calc is useful as a calculator, an algorithm prototyped and
+as a mathematical research tool. It comes with a rich set of
+mathematical, programmatic and stdio functions.
+
+%description -l pl.UTF-8
+Calc jest systemem arytmetycznym o nieograniczonej dokładności,
+używającym języka podobnego do C. Calc jest przydatny jako kalkulator,
+narzędzie do testowania algorytmów i do badań matematycznych. Do
+samego programu dołączony jest bogaty zestaw funkcji bibliotecznych -
+matematycznych, programistycznych i funkcji wejścia/wyjścia
 
 %package devel
-Summary:       Calc header files
-Summary(pl):   Pliki nag³ówkowe Calca
+Summary:       Calc header files and static libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe i biblioteki statyczne Calca
 Group:         Development/Libraries
-Group(pl):     Programowanie/Biblioteki
-Requires:      calc = %{version}
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     calc-static
 
 %description devel
-These header files are neccessary to build programs using Calc math
-libraries.
-
-%description devel -l pl
-Te pliki nag³ówkowe s± niezbêdne przy budowaniu programów wykorzystuj±cych
-biblioteki matematyczne Calca.
-
-%package static
-Summary:       Calc static libraries
-Summary(pl):   Biblioteki statyczne Calca
-Group:         Development/Libraries
-Group(pl):     Programowanie/Biblioteki
-Requires:      calc = %{version}
-Requires:      calc-devel = %{version}
-
-%description static
-Libraries containing a set of Calc functions to use in other applications
-
-%description static -l pl
-Biblioteki zawieraj±ce komplet funkcji Calca do wykorzystania we w³asnych
+These header files and static libraries are neccessary to build
+programs using Calc math libraries. These libraries contain a set of
+Calc functions to use in other applications.
+
+%description devel -l pl.UTF-8
+Te pliki nagłówkowe i biblioteki statyczne są niezbędne przy budowaniu
+programów wykorzystujących biblioteki matematyczne Calca. Biblioteki
+te zawierające zbiór funkcji Calca do wykorzystania we własnych
 programach.
 
 %prep
-%setup  -q
+%setup -q
+%patch0 -p1
 
 %build
-make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
+%{__make} -j1 \
+       LCC="%{__cc}" \
+       DEBUG="%{rpmcflags}" \
        USE_READLINE=-DUSE_READLINE \
        READLINE_LIB="-lreadline -lhistory" \
        READLINE_INCLUDE=%{_includedir} \
-       BINDIR=%{_bindir} \
-       TOPDIR=%{_datadir} \
-       INCDIR=%{_includedir} \
-       MANDIR=%{_mandir}/man1 \
-       HELPDIR=%{_datadir}/calc/help \
-       CUSTOMLIBDIR=%{_datadir}/calc/custom \
-       CUSTOMHELPDIR=%{_datadir}/calc/custhelp \
        SCRIPTDIR=%{_datadir}/calc/cscript
 
+%{?with_tests:%{__make} check}
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/calc{,/cscript,/custom,/help}} \
-       $RPM_BUILD_ROOT{%{_includedir},%{_mandir}/man1,%{_libdir}} \
-       $RPM_BUILD_ROOT%{_bindir}
 
-make install \
-       BINDIR=$RPM_BUILD_ROOT%{_bindir} \
-       TOPDIR=$RPM_BUILD_ROOT%{_datadir} \
-       INCDIR=$RPM_BUILD_ROOT%{_includedir} \
-       MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
-       HELPDIR=$RPM_BUILD_ROOT%{_datadir}/calc/help \
-       CUSTOMLIBDIR=$RPM_BUILD_ROOT%{_datadir}/calc/custom \
-       CUSTOMHELPDIR=$RPM_BUILD_ROOT%{_datadir}/calc/custhelp \
-       SCRIPTDIR=$RPM_BUILD_ROOT%{_datadir}/calc/cscript
+%{__make} install \
+       LIBDIR=%{_libdir} \
+       T=$RPM_BUILD_ROOT \
+       SCRIPTDIR=%{_datadir}/calc/cscript
+
+install -D %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+
+rm -f $RPM_BUILD_ROOT%{_datadir}/calc/README
 
-mv $RPM_BUILD_ROOT%{_datadir}/calc{/,/custom}/*.a $RPM_BUILD_ROOT%{_libdir}
+find $RPM_BUILD_ROOT%{_datadir}/calc -type f | \
+       xargs %{__sed} -i -e 's|#!/usr/local/bin/calc|#!%{_bindir}/calc|g'
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
-       BUGS CHANGES README LIBRARY
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+# COPYING is not just LGPL text, only some explanations
+%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.*.*.*.*
 %{_datadir}/calc
-%{_mandir}/man*/*
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/*
+%{_desktopdir}/calc.desktop
+%{_mandir}/man1/calc.1*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/*
-
-%clean 
-rm -rf $RPM_BUILD_ROOT
+%doc LIBRARY
+%attr(755,root,root) %{_libdir}/libcalc.so
+%attr(755,root,root) %{_libdir}/libcustcalc.so
+%{_includedir}/calc
This page took 0.03656 seconds and 4 git commands to generate.