]> git.pld-linux.org Git - packages/php-pecl-fileinfo.git/blob - php-pecl-fileinfo.spec
- use new php extension related macros
[packages/php-pecl-fileinfo.git] / php-pecl-fileinfo.spec
1 %define         _modname        fileinfo
2 %define         _smodname       Fileinfo
3 %define         _status         beta
4 Summary:        %{_modname} - libmagic bindings
5 Summary(pl):    %{_modname} - dowi±zania biblioteki libmagic
6 Name:           php-pecl-%{_modname}
7 Version:        1.0.4
8 Release:        2
9 License:        PHP
10 Group:          Development/Languages/PHP
11 Source0:        http://pecl.php.net/get/%{_smodname}-%{version}.tgz
12 # Source0-md5:  2854e749db157365c769cb9496f5586f
13 URL:            http://pecl.php.net/package/Fileinfo/
14 BuildRequires:  libmagic-devel
15 BuildRequires:  php-devel >= 3:5.0.0
16 BuildRequires:  rpmbuild(macros) >= 1.344
17 %{?requires_php_extension}
18 Requires:       php-common >= 4:5.0.4
19 Obsoletes:      php-pear-%{_modname}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 This extension allows retrieval of information regarding vast majority
24 of file. This information may include dimensions, quality, length
25 etc...
26
27 Additionally it can also be used to retrieve the MIME type for a
28 particular file and for text files proper language encoding.
29
30 In PECL status of this extension is: %{_status}.
31
32 %description -l pl
33 To rozszerzenie pozwala na uzyskanie wielu informacji na temat plików.
34 Informacje te uwzglêdniaj± miêdzy innymi rozmiar, jako¶æ, d³ugo¶æ itp.
35
36 Dodatkowo mo¿e byæ u¿yte do uzyskania typu MIME danego pliku, a dla
37 plików tekstowych - u¿ytego kodowania.
38
39 To rozszerzenie ma w PECL status: %{_status}.
40
41 %prep
42 %setup -q -c
43
44 %build
45 cd %{_smodname}-%{version}
46 phpize
47 %configure
48 %{__make}
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
53
54 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
55 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
56 ; Enable %{_modname} extension module
57 extension=%{_modname}.so
58 EOF
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 %php_webserver_restart
65
66 %postun
67 if [ "$1" = 0 ]; then
68         %php_webserver_restart
69 fi
70
71 %files
72 %defattr(644,root,root,755)
73 %doc %{_smodname}-%{version}/{CREDITS,EXPERIMENTAL,fileinfo.php}
74 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
75 %attr(755,root,root) %{php_extensiondir}/%{_modname}.so
This page took 0.027808 seconds and 4 git commands to generate.