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