]> git.pld-linux.org Git - packages/php-pecl-big_int.git/blob - php-pecl-big_int.spec
- ./adapter -s
[packages/php-pecl-big_int.git] / php-pecl-big_int.spec
1 %define         _modname        big_int
2 %define         _status         stable
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5
6 Summary:        %{_modname} - set of functions for calculations with arbitrary length integers
7 Summary(pl):    %{_modname} - zestaw funkcji do obliczeñ z u¿yciem liczb o dowolnej wielko¶ci
8 Name:           php-pecl-%{_modname}
9 Version:        1.0.6
10 Release:        2
11 License:        PHP 2.02
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5:  844332ab0a40ea12aa8339d7d2c20770
15 URL:            http://pecl.php.net/package/big_int/
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.230
18 %requires_eq_to php-common php-devel
19 Requires:       %{_sysconfdir}/conf.d
20 Obsoletes:      php-pear-%{_modname}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 This package is useful for number theory applications. For example, in
25 two-keys cryptography. See tests/RSA.php in the package for example of
26 implementation of RSA-like cryptoalgorithm.
27
28 Also the package has many bitset functions, which allow to work with
29 arbitrary length bitsets.
30
31 This package is much faster than bundled into PHP BCMath. It
32 implements almost all functions as in GMP extension, but it needn't
33 any additional external libraries.
34
35 In PECL status of this extension is: %{_status}.
36
37 %description -l pl
38 Ten pakiet jest przydatny do zastosowañ z teorii liczb, na przyk³ad do
39 kryptografii z u¿yciem dwóch kluczy. Przyk³adow± implementacjê
40 algorytmu kryptograficznego podobnego do RSA mo¿na znale¼æ w tym
41 pakiecie w pliku tests/RSA.php.
42
43 Pakiet ma tak¿e wiele funkcji operuj±cych na bitach, umo¿liwiaj±cych
44 dzia³anie na zbiorach bitów dowolnej d³ugo¶ci.
45
46 Ten pakiet jest du¿o szybszy ni¿ wbudowany w PHP BCMath. Implementuje
47 prawie wszystkie funkcje z rozszerzenia GMP, ale nie wymaga ¿adnych
48 dodatkowych bibliotek zewnêtrznych.
49
50 To rozszerzenie ma w PECL status: %{_status}.
51
52 %prep
53 %setup -q -c
54
55 %build
56 cd %{_modname}-%{version}
57 phpize
58 %configure
59 %{__make}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
64
65 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
66 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
67 ; Enable %{_modname} extension module
68 extension=%{_modname}.so
69 EOF
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
76 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
77
78 %postun
79 if [ "$1" = 0 ]; then
80         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
81         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
82 fi
83
84 %files
85 %defattr(644,root,root,755)
86 %doc %{_modname}-%{version}/{docs,tests,CREDITS,README}
87 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
88 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.066451 seconds and 3 git commands to generate.