Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > dffb1fc12b99442825555bd9613ff77e > files > 1

php-gd-4.3.4-1mdk.src.rpm

%define phpsource       %{_prefix}/src/php-devel
%define _docdir %{_datadir}/doc/%{name}-%{version}
%{expand:%(cat /usr/src/php-devel/PHP_BUILD||(echo -e "error: failed build dependencies:\n        php-devel >= 430 (4.3.0) is needed by this package." >/dev/stderr;kill -2 $PPID))}

%define release 1mdk

%define realname GD
%define modname gd
%define dirname %{modname}
%define soname %{modname}.so
%define inifile 23_%{modname}.ini


Summary:	The %{realname} module for PHP
Name:		php-%{modname}
Version:	%{phpversion}
Release:	%{release}
Group:		System/Servers
URL:		http://www.php.net
License:	PHP License
Requires:	php%{libversion}
BuildRequires:  php%{libversion}-devel
BuildRoot:	%{_tmppath}/%{name}-root
#No longer required since builtin in PHP
#Requires:      libgd1.8 >= 1.8.4
Requires:       libpng >= 1.2.0
BuildRequires:  freetype2-devel
BuildRequires:  libjpeg-devel
#No longer required since builtin in PHP
#BuildRequires:  gd-devel >= 1.8.4
BuildRequires:  libpng-devel 
BuildRequires:  libxpm-devel
BuildRequires:  XFree86-devel
BuildRequires:  chrpath >= 0.10-4mdk
Provides:       mod_php-gd
Provides:       mod_php3-gd
Obsoletes:      mod_php-gd
Obsoletes:      mod_php3-gd
Provides: 	ADVXpackage


%description
The %{name} package is a dynamic shared object (DSO) that adds
%{realname} support to PHP. PHP is an HTML-embedded scripting language. 
If you need %{realname} support for PHP applications, you will need to 
install this package in addition to the php package.

%build
[ -e ./%{dirname} ] && rm -fr ./%{dirname}
cp -dpR %{phpsource}/extensions/%{dirname} .
cd %{dirname}

#%{phpsource}/buildext %{extname} "gd.c gdttf.c gdcache.c gdt1.c" \
#        "-ljpeg -lpng -lgd -lttf -lt1 -lc" "-DCOMPILE_DL_GD \
#        -DHAVE_LIBGD -DHAVE_LIBGD13 -DHAVE_LIBGD15 \
#        -DHAVE_COLORCLOSESTHWB -DHAVE_GDIMAGECOLORRESOLVE \
#        -DHAVE_GD_PNG -DHAVE_LIGPNG \
#        -DHAVE_GD_JPG -DHAVE_LIBJPEG \
#        -DHAVE_GD_WBMP -DHAVE_WMBP -DHAVE_GD_XPM -DHAVE_GD_XBM \
#        -DHAVE_LIBT1 -DHAVE_LIBFREETYPE -DHAVE_LIBT1_OUTLINE \
#        -DENABLE_GD_TTF -DUSE_GD_IMGSTRTTF \
#        -DHAVE_GD_STRINGTTF -DHAVE_GD_STRINGFT \
#        -I/usr/include/freetype2 -I/usr/include/freetype2/freetype"

phpize
export LIBS="$LIBS -lm"
%configure \
    --with-jpeg-dir=%{_prefix} \
    --with-png-dir=%{_prefix} \
    --with-zlib-dir=%{_prefix} \
    --with-xpm-dir=%{_prefix}/X11R6 \
    --with-ttf=%{_prefix} \
    --with-freetype-dir=%{_prefix} \
    --enable-gd-native-ttf 

%make
mv modules/*.so .
chrpath -d %{soname}

#########################################################
## Nothing to be changed after this, except changelog! ##
#########################################################

%install
cd %{dirname}
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} 

install -d %{buildroot}%{phpdir}/extensions
install -d %{buildroot}%{_docdir}
install -d %{buildroot}%{_sysconfdir}/php

install -m755 %{soname} %{buildroot}%{phpdir}/extensions/

cat > %{buildroot}%{_docdir}/README <<EOF
The %{name} package contains a dynamic shared object (DSO) for PHP. 
To activate it, make sure a file /etc/php/%{inifile} is present and
contains the line 'extension = %{soname}'.
EOF

cat > %{buildroot}%{_sysconfdir}/php/%{inifile} << EOF
extension = %{soname}
EOF

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
[ -e ./%{dirname} ] && rm -fr ./%{dirname}

%files 
%defattr(-,root,root)
%doc %{_docdir}/README
%{phpdir}/extensions/%{soname}
%config(noreplace) %{_sysconfdir}/php/%{inifile}

%changelog
* Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.4-1mdk
- built for php 4.3.4

* Mon Oct 13 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.3-1mdk
- 4.3.3

* Mon Sep 08 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.2-4mdk
- built for 4.3.3
- buildrequires chrpath >= 0.10-4mdk
- t1lib is not required anymore
- misc spec file fixes

* Wed Aug 20 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.3.2-3mdk
- Nuke implicit Requires

* Mon Jul 21 2003 David Baudens <baudens@mandrakesoft.com> 4.3.2-2mdk
- Rebuild to fix bad signature

* Tue Jun 03 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.2-1mdk
- built for 4.3.2

* Tue May 06 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.1-1mdk
- the obvious rebuild (thanks to Pascal Terjan for the help!)

* Thu Feb 13 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.3.0-2mdk
- rebuild

* Sun Jan  5 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.3.0-1mdk
- New 4.3.0 release
- Totally macroize based on suggestions from Alexander Skwar
- New method of installing extensions thanks to Oden Eriksson
- Use phpize instead of buildext since GD is now bundled with PHP, 
  and there are *tons* of new defines...
- Add Provides: ADVXpackage, all ADVX package will have this tag, 
  so we can easily do a rpm --whatprovides ADVXpackage to find out
  what ADVX packages a user has installed on his system. 

* Sat Sep  7 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.2.3-1mdk
- 4.2.3 maintenance release
- Do not reload apache

* Thu Aug 22 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.2.2-1mdk
- Rebuild for 4.2.2
- Macroize a bit more, make version depend on "php -v"

* Tue Aug  6 2002 Frederic Lepied <flepied@mandrakesoft.com> 4.2.1-3mdk
- rebuild for libintl.so.2

* Sun May 26 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.2.1-2mdk
- updated by Oden Eriksson <oden.eriksson@kvikkjokk.net>
	- misc spec file fixes

* Tue May 21 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.2.1-1mdk
- updated by Oden Eriksson <oden.eriksson@kvikkjokk.net>
	- misc spec file fixes
	- PHP 4.2.1

* Mon Apr 29 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.2.0-1mdk
- Updated by Oden Eriksson <oden.eriksson@kvikkjokk.net>:
	- misc spec file fixes
	- PHP 4.2.0

* Mon Mar 04 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.1.2-1mdk
- PHP 4.1.2

* Wed Jan 09 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-2mdk
- Add -DHAVE_GD_STRINGTTF -DHAVE_GD_STRINGFT -DHAVE_GD_STRINGFTEX

* Mon Jan 07 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-1mdk
- PHP 4.1.1.

* Tue Dec 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.0-1mdk
- Update Requires and BuildRequires.
- PHP 4.1.0.

* Fri Nov 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.0.6-4mdk
- Fix no-url-tag and invalid-packager warnings in rpmlint.

* Wed Oct 10 2001 Stefan van der Eijk <stefan@eijk.nu> 4.0.6-3mdk
- BuildRequires: libjpeg-devel
- Adjust Requires: libpng2 --> libpng3

* Mon Sep 10 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.0.6-2mdk
- Provides the Obsoletes for compatibility.

* Wed Jul  4 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.6-1mdk
- 4.0.6
- BuildRequires: freetype-devel
- remove -D_HAVE_CONFIG from buildext command

* Thu Apr 19 2001 David BAUDENS <baudens@mandrakesoft.com> 4.0.4pl1-7mdk
- Fix BuildRequires on libgd*-devel to allow build

* Fri Apr 13 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-6mdk
- fix requires
- made it working with gd 1.8.4 to have working jpeg support at last

* Mon Apr  9 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-5mdk
- fix post scripts for good 

* Mon Apr  2 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-4mdk
- Split gd package from php package so that when a new gd 
  package comes out, we don't have to recompile php, only this module