File php5-fileinfo.spec of Package php5-fileinfo
x
1
# norootforbuild
2
%define pkg_name fileinfo
3
%define pkg_version 1.0.4
4
%define php_version %(php-config --version 2>/dev/null)
5
#
6
Name: php5-fileinfo
7
Version: 1.0.4
8
Release: 0
9
License: PHP
10
Group: Productivity/Networking/Web/Servers
11
BuildRoot: %{_tmppath}/%{name}-%{version}-build
12
BuildRequires: php5-devel file-devel
13
Requires: php5 = %{php_version}
14
Patch0: php5-fileinfo-lib64.patch
15
#
16
URL: http://pecl.php.net/package/fileinfo
17
Source: http://pecl.php.net/get/%{pkg_name}-%{pkg_version}.tar.bz2
18
#
19
Summary: PHP libmagic bindings
20
%description
21
22
This extension allows retrieval of information regarding vast majority of file.
23
This information may include dimensions, quality, length etc...
24
25
Additionally it can also be used to retrieve the mime type for a particular
26
file and for text files proper language encoding.
27
28
29
Authors:
30
---------
31
32
Ilia Alshanetsky <ilia@prohost.org>
33
34
%debug_package
35
%prep
36
37
%setup -q -n %{pkg_name}-%{pkg_version}
38
39
%patch0
40
41
%{__mkdir} %{name}
42
43
%build
44
/usr/bin/phpize
45
pushd %{name}
46
47
CFLAGS="%{optflags} -fno-strict-aliasing"
48
CXXFLAGS="%{optflags} -fno-strict-aliasing"
49
50
%if 0%{?suse_version} > 1000
51
CFLAGS="$CFLAGS -fstack-protector"
52
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
53
%endif
54
55
export CFLAGS
56
export CXXFLAGS
57
export LDFLAGS="-Wl,--as-needed"
58
59
../configure --with-libdir=%{_lib}
60
61
%{__make} %{?jobs:-j%jobs}
62
63
popd
64
65
%install
66
67
%makeinstall -C %{name} INSTALL_ROOT=%{buildroot}
68
69
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php5/conf.d
70
71
echo "extension= fileinfo.so" >> %{buildroot}%{_sysconfdir}/php5/conf.d/fileinfo.ini
72
73
%clean
74
75
%{__rm} -rf %{buildroot}
76
77
%files
78
%defattr(-,root,root,-)
79
%{_libdir}/php5/extensions/%{pkg_name}.so
80
%config(noreplace) %{_sysconfdir}/php5/conf.d/%{pkg_name}.ini
81
82
%doc CREDITS
83
84
%changelog
85
* Sat Dec 23 2006 - judas_iscariote@shorewall.net
86
- add lib64 fix.
87
* Sun Oct 10 2006 - soporte@onfocus.cl
88
- First Build
89