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