]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: some unpackaged libs, should we pack them as ghosts? | |
3 | # | |
4 | Summary: Arbitrary precision calculator | |
5 | Summary(pl.UTF-8): Kalkulator operujący na liczbach z dowolną dokładnością | |
6 | Name: calc | |
7 | Version: 2.12.3.3 | |
8 | Release: 1 | |
9 | License: LGPL v2.1+ | |
10 | Group: Applications/Math | |
11 | Source0: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2 | |
12 | # Source0-md5: 2b6b511bba836653a444094622e65041 | |
13 | Source1: %{name}.desktop | |
14 | URL: http://www.isthe.com/chongo/tech/comp/calc/ | |
15 | BuildRequires: readline-devel >= 4.2 | |
16 | BuildRequires: sed >= 4.0 | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | Calc is arbitrary precision arithmetic system that uses a C-like | |
21 | language. Calc is useful as a calculator, an algorithm prototyped and | |
22 | as a mathematical research tool. It comes with a rich set of | |
23 | mathematical, programmatic and stdio functions. | |
24 | ||
25 | %description -l pl.UTF-8 | |
26 | Calc jest systemem arytmetycznym o nieograniczonej dokładności, | |
27 | używającym języka podobnego do C. Calc jest przydatny jako kalkulator, | |
28 | narzędzie do testowania algorytmów i do badań matematycznych. Do | |
29 | samego programu dołączony jest bogaty zestaw funkcji bibliotecznych - | |
30 | matematycznych, programistycznych i funkcji wejścia/wyjścia | |
31 | ||
32 | %package devel | |
33 | Summary: Calc header files and static libraries | |
34 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki statyczne Calca | |
35 | Group: Development/Libraries | |
36 | Requires: %{name} = %{version}-%{release} | |
37 | Obsoletes: calc-static | |
38 | ||
39 | %description devel | |
40 | These header files and static libraries are neccessary to build | |
41 | programs using Calc math libraries. These libraries contain a set of | |
42 | Calc functions to use in other applications. | |
43 | ||
44 | %description devel -l pl.UTF-8 | |
45 | Te pliki nagłówkowe i biblioteki statyczne są niezbędne przy budowaniu | |
46 | programów wykorzystujących biblioteki matematyczne Calca. Biblioteki | |
47 | te zawierające zbiór funkcji Calca do wykorzystania we własnych | |
48 | programach. | |
49 | ||
50 | %prep | |
51 | %setup -q | |
52 | ||
53 | %build | |
54 | %{__make} -j1 \ | |
55 | LCC="%{__cc}" \ | |
56 | DEBUG="%{rpmcflags}" \ | |
57 | USE_READLINE=-DUSE_READLINE \ | |
58 | READLINE_LIB="-lreadline -lhistory" \ | |
59 | READLINE_INCLUDE=%{_includedir} \ | |
60 | SCRIPTDIR=%{_datadir}/calc/cscript | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %{__make} install \ | |
66 | LIBDIR=%{_libdir} \ | |
67 | T=$RPM_BUILD_ROOT \ | |
68 | SCRIPTDIR=%{_datadir}/calc/cscript | |
69 | ||
70 | install -D %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop | |
71 | ||
72 | rm -f $RPM_BUILD_ROOT%{_datadir}/calc/README | |
73 | ||
74 | find $RPM_BUILD_ROOT%{_datadir}/calc -type f | \ | |
75 | xargs %{__sed} -i -e 's|#!/usr/local/bin/calc|#!%{_bindir}/calc|g' | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %post -p /sbin/ldconfig | |
81 | %postun -p /sbin/ldconfig | |
82 | ||
83 | %files | |
84 | %defattr(644,root,root,755) | |
85 | # COPYING is not just LGPL text, only some explanations | |
86 | %doc BUGS CHANGES COPYING README | |
87 | %attr(755,root,root) %{_bindir}/calc | |
88 | %attr(755,root,root) %{_libdir}/libcalc.so.*.*.*.* | |
89 | %attr(755,root,root) %{_libdir}/libcustcalc.so.*.*.*.* | |
90 | %{_datadir}/calc | |
91 | %{_desktopdir}/calc.desktop | |
92 | %{_mandir}/man1/calc.1* | |
93 | ||
94 | %files devel | |
95 | %defattr(644,root,root,755) | |
96 | %doc LIBRARY | |
97 | %attr(755,root,root) %{_libdir}/libcalc.so | |
98 | %attr(755,root,root) %{_libdir}/libcustcalc.so | |
99 | %{_includedir}/calc |