]> git.pld-linux.org Git - packages/perl-Math-Symbolic.git/blob - perl-Math-Symbolic.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Math-Symbolic.git] / perl-Math-Symbolic.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define         pdir    Math
6 %define         pnam    Symbolic
7 Summary:        Math::Symbolic - symbolic calculations
8 Summary(pl.UTF-8):      Math::Symbolic - obliczenia symboliczne
9 Name:           perl-Math-Symbolic
10 Version:        0.606
11 Release:        1
12 # same as perl
13 License:        GPL v1+ or Artistic
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  6272de6bfc780ec1476e08d209816dcf
17 URL:            http://search.cpan.org/dist/Math-Symbolic/
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 BuildRequires:  perl(Data::Dumper)
22 BuildRequires:  perl(Memoize) >= 1.01
23 BuildRequires:  perl(Test::More)
24 BuildRequires:  perl-Parse-RecDescent >= 1.94
25 BuildRequires:  perl-Pod-Coverage >= 0.11
26 %endif
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Math::Symbolic is intended to offer symbolic calculation capabilities
32 to the Perl programmer without using external (and commercial)
33 libraries and/or applications.
34
35 There are several ways to construct Math::Symbolic trees. There are no
36 actual Math::Symbolic objects, but rather trees of objects of
37 subclasses of Math::Symbolic. The most general but unfortunately also
38 the least intuitive way of constructing trees is to use the
39 constructors of the Math::Symbolic::Operator,
40 Math::Symbolic::Variable, and Math::Symbolic::Constant classes to
41 create (nested) objects of the corresponding types.
42
43 Furthermore, you may use the overloaded interface to apply the
44 standard Perl operators (and functions) to existing Math::Symbolic
45 trees and standard Perl expressions.
46
47 Possibly the most convenient way of constructing Math::Symbolic trees
48 is using the builtin parser to generate trees from expressions such as
49 '2 * x^5'. You may use the Math::Symbolic->parse_from_string() class
50 method for this.
51
52 Of course, you may combine the overloaded interface with the parser to
53 generate trees with Perl code such as "$term * 5 * 'sin(omega*t+phi)'"
54 which will create a tree of the existing tree $term times 5 times the
55 sine of the vars omega times t plus phi.
56
57 %description -l pl.UTF-8
58 Pakiet Math::Symbolic oferuje programistom perlowym możliwość obliczeń
59 symbolicznych bez używania zewnętrznych (i komercyjnych) bibliotek
60 i/lub aplikacji.
61
62 Drzewa Math::Symbolic można tworzyć na kilka sposobów. Nie ma
63 właściwych obiektów Math::Symbolic, zamiast nich używa się podklas
64 Math::Symbolic. Najbardziej ogólnym, ale niestety najmniej intuicyjnym
65 sposobem tworzenia drzew jest użycie konstruktorów klas
66 Math::Symbolic::Operator, Math::Symbolic::Variable i
67 Math::Symbolic::Constant do tworzenia (zagnieżdżonych) obiektów
68 odpowiednich typów.
69
70 Poza tym można używać interfejsu przeciążania, aby używać
71 standardowych operatorów (i funkcji) Perla na istniejących drzewach
72 Math::Symbolic i standardowych wyrażeniach perlowych.
73
74 Prawdopodobnie najwygodniejszym sposobem tworzenia drzew
75 Math::Symbolic jest używanie wbudowanego parsera do generowania drzew
76 z wyrażeń takich jak '2 * x^5'. Można do tego użyć metody klasy
77 Math::Symbolic->parse_from_string().
78
79 Oczywiście można łączyć interfejs przeciążania z parserem przy
80 generowaniu drzew w kodzie perlowym - na przykład "$term * 5 *
81 'sin(omega*t+fi)'" stworzy drzewo z istniejącego drzewa $term
82 pomnożonego przez 5 razy sinus omega razy t plus fi.
83
84 %prep
85 %setup -q -n %{pdir}-%{pnam}-%{version}
86
87 %build
88 %{__perl} Makefile.PL \
89         INSTALLDIRS=vendor
90 %{__make}
91
92 %{?with_tests:%{__make} test}
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
97
98 %{__make} install \
99         DESTDIR=$RPM_BUILD_ROOT
100
101 cp -p examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %files
107 %defattr(644,root,root,755)
108 %doc Changes README TODO
109 %{perl_vendorlib}/Math/Symbolic.pm
110 %{perl_vendorlib}/Math/Symbolic
111 %{_mandir}/man3/*
112 %{_examplesdir}/%{name}-%{version}
This page took 0.104488 seconds and 4 git commands to generate.