1 |
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) |
2 |
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined") |
3 |
%global php_version %(php-config --version 2>/dev/null || echo 0) |
4 |
|
5 |
Summary: Fileinfo is a PHP extension that wraps the libmagic library |
6 |
Name: php-pecl-Fileinfo |
7 |
Version: 1.0.4 |
8 |
Release: 3%{?dist} |
9 |
License: PHP License |
10 |
Group: Development/Languages |
11 |
URL: http://pecl.php.net/package/Fileinfo |
12 |
|
13 |
Source: http://pecl.php.net/get/Fileinfo-%{version}.tgz |
14 |
Source1: PHP-LICENSE-3.01 |
15 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
16 |
|
17 |
Patch0: fixconfigure.patch |
18 |
|
19 |
Provides: php-pecl(Fileinfo), |
20 |
Provides: php-Fileinfo |
21 |
Requires: php-api = %{php_apiver} |
22 |
BuildRequires: php-devel, zlib-devel, openssl-devel, autoconf, automake, libtool |
23 |
BuildRequires: file |
24 |
|
25 |
%description |
26 |
This extension allows the retrieval of file type information for the vast |
27 |
majority of files. This information may include such information as dimensions |
28 |
or compression quality of images, duration of sound files, etc... |
29 |
|
30 |
Additionally, it can also be used to retrieve the MIME type for a particular |
31 |
file, and for text files, the proper language encoding. |
32 |
|
33 |
%prep |
34 |
%setup -c -q |
35 |
%{__install} -m 644 -c %{SOURCE1} Fileinfo-%{version}/LICENSE |
36 |
|
37 |
%patch0 -p0 -b .fixconfigure |
38 |
|
39 |
%build |
40 |
cd Fileinfo-%{version} |
41 |
phpize |
42 |
%configure |
43 |
%{__make} %{?_smp_mflags} |
44 |
|
45 |
%install |
46 |
%{__rm} -rf %{buildroot} |
47 |
cd Fileinfo-%{version} |
48 |
%{__make} install INSTALL_ROOT=%{buildroot} |
49 |
|
50 |
# Drop in the bit of configuration |
51 |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d |
52 |
%{__cat} > %{buildroot}%{_sysconfdir}/php.d/Fileinfo.ini << 'EOF' |
53 |
; Enable Filinfo extension module |
54 |
extension=fileinfo.so |
55 |
EOF |
56 |
|
57 |
%clean |
58 |
%{__rm} -rf %{buildroot} |
59 |
|
60 |
%files |
61 |
%defattr(-, root, root, -) |
62 |
%doc Fileinfo-%{version}/LICENSE Fileinfo-%{version}/CREDITS |
63 |
%config(noreplace) %{_sysconfdir}/php.d/Fileinfo.ini |
64 |
%{php_extdir}/fileinfo.so |
65 |
|
66 |
%changelog |
67 |
* Fri Jul 20 2007 Johnny Hughes <johnny@centos.org> 1.0.4-3 |
68 |
- changed file-devel buildrequires to file for centos 5. |
69 |
- added this buildrequires: |
70 |
zlib-devel, openssl-devel, autoconf, automake, libtool |
71 |
|
72 |
* Mon Apr 16 2007 Brandon Holbrook <fedora AT theholbrooks DOT org> 1.0.4-3 |
73 |
- magic.h is now part of file-devel, not file. Changed buildreqs |
74 |
|
75 |
* Sat Apr 14 2007 Brandon Holbrook <fedora AT theholbrooks DOT org> 1.0.4-2 |
76 |
- Added a patch to config.m4 that fixes improper detection of the system's magic database file [bz 235110] |
77 |
|
78 |
* Fri Dec 29 2006 Brandon Holbrook <fedora AT theholbrooks DOT org> 1.0.4-1 |
79 |
- Bumped to upstream 1.0.4 |
80 |
|
81 |
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 1.0.3-3 |
82 |
- rebuilt for unwind info generation, broken in gcc-4.1.1-21 |
83 |
|
84 |
* Sun Sep 17 2006 Brandon Holbrook <fedora AT theholbrooks DOT org> 1.0.3-2 |
85 |
- Strict Requires: php_api |
86 |
- Grammatically correct Summary + Description |
87 |
|
88 |
* Wed Sep 13 2006 Brandon Holbrook <fedora AT theholbrooks DOT org> 1.0.3-1 |
89 |
- initial RPM |