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