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