[Á°][¼¡][ÈÖ¹æ½ç°ìÍ÷][¥¹¥ì¥Ã¥É°ìÍ÷]

mysql:3699

From: Yasuhide OMORI / Â翹ÊÝ±Ñ <Yasuhide OMORI / Â翹ÊÝ±Ñ <omori@xxxxxxxxxx>>
Date: Mon, 28 May 2001 16:21:52 +0900
Subject: [mysql 03699] Re: PHP ¥¢¥¯¥»¥¹¤Ç¥¨¥é¡¼

#%define patch_level 2

# anyone update ok :-)
# See [VineSeed-Plus:00193]

# for Vine-2.1 (default)
%{!?RH7:%define contentdir /home/httpd/html}

# for RedHat7
%{?RH7:%define contentdir /var/www}

%{?with_mysql:Requires: MySQL}
%{?with_mysql:BuildRequires: MySQL-devel}

%{?with_pgsql:Requires: postgresql}
%{?with_pgsql:BuildRequires: postgresql-devel}

%{?with_mcrypt:Requires: libmcrypt}
%{?with_mcrypt:BuildRequires: libmcrypt-devel}

%{?with_gd:Requires: gd,VFlib}
%{?with_gd:BuildRequires: gd-devel,VFlib-devel}

%{?with_jpeg:Requires: libjpeg}
%{?with_jpeg:BuildRequires: libjpeg-devel}

%{?with_png:Requires: libpng}
%{?with_png:BuildRequires: libpng-devel}

%{?with_tiff:Requires: libtiff}
%{?with_tiff:BuildRequires: libtiff-devel}

%define php_mandir manual/php

#%define dso_sysconfdir /etc/httpd/conf
#%define cgi_sysconfdir /etc/php/cgi

%define sysconfdir /etc

Name: php
Version: 4.0.5
Release: 0vl1
Summary: PHP: Hypertext Preprocessor
Group: Development/Languages
License: PHP
Source0: http://www.php.net/distributions/php-%{version}.tar.gz
Source1: http://snaps.php.net/manual/ja/manual-ja-current.tar.gz
Source2: http://snaps.php.net/manual/en/manual-en-current.tar.gz
Source3: ftp://night.fminn.nagano.nagano.jp/php4/php4_mbregex-1.2.tar.gz
Source4: ftp://night.fminn.nagano.nagano.jp/php4/php-4.0RC2_jstring-1.0.tar.gz
Source5: http://www.php.net/extra/number4.tar.gz
Patch: php-4.0.3pl1-DESTDIR.patch.gz
Patch1: php-4.0.3pl1.no_apxs_install.patch.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
NoSource: 0

%description
PHP: Hypertext Preprocessor

%package manual
Group: Development/Languages
Summary: manual for PHP: Hypertext Preprocessor
%description manual
manual for PHP: Hypertext Preprocessor

%prep
#%setup -q -a 1 -n php-%{version}
#patch -p1 -b --suffix .i18n -s< I18N-ja.diff
%setup -q -n php-%{version} -a 5
%patch -p1
%patch1 -p1

mkdir -p %{php_mandir}/{ja,en}
tar zxf %{SOURCE1} -C %{php_mandir}/ja
tar zxf %{SOURCE2} -C %{php_mandir}/en
for i in %{php_mandir}/{ja,en} ; do
    ln -s manual.html $i/index.html
done

tar zxf %{SOURCE2} -C ext
tar zxf %{SOURCE3} -C ext

%build
export CFLAGS="${RPM_OPT_FLAGS}"

# http://sidecar.ics.es.osaka-u.ac.jp/php-jp/archives/msg04095.html
rm configure
./buildconf
./configure --prefix=%{_prefix} \
--with-apxs=/usr/sbin/apxs \
--with-mod_charset=yes \
%{?with_gd:--with-gd} \
--enable-jstring \
%{?with_mysql:--with-mysql=/usr} \
%{?with_pgsql:--with-pgsql=/usr} \
%{?with_mcrypt:--with-mcrypt} \
%{?with_xml:--with-xml} \
%{?with_ibm_db2:--with-ibm-db2=/usr/IBMdb2/V6.1} \
--with-zlib-dir=/usr \
--enable-sysvshm=yes \
--enable-sysvsem=yes \
--with-config-file-path=%{sysconfdir} \
--enable-mbregex \
--enable-safe-mode=yes \
--enable-track-vars=yes \
--enable-magic-quotes=yes \
--enable-debugger=yes \
--enable-bcmath=yes \
--enable-force-cgi-redirect=yes \
--enable-discard-path=yes \
--enable-memory-limit=yes \
--enable-i18n \
--with-gdbm \
--enable-versioning \
%{!?with_jpeg:--without-jpeg} \
%{!?with_png:--without-png} \
%{!?with_tiff:--without-tiff} \
#--with-system-regex=yes \

# `/usr/sbin/apxs -q CFLAGS` adds optflags :-<
# This is an example for Vine-2.1
perl -i.bak -p -e 's/-O2 -m486 -fno-strength-reduce//' Makefile */Makefile
make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT}
#make prefix=${RPM_BUILD_ROOT}%{_prefix} install
make DESTDIR=${RPM_BUILD_ROOT} peardir=${RPM_BUILD_ROOT}%{_datadir}/php install

mkdir -p ${RPM_BUILD_ROOT}/usr/lib/apache
mkdir -p ${RPM_BUILD_ROOT}%{sysconfdir}

install -m 755 .libs/libphp4.so ${RPM_BUILD_ROOT}/usr/lib/apache/
install -m 644 php.ini-dist ${RPM_BUILD_ROOT}%{sysconfdir}/php.ini

mkdir -p ${RPM_BUILD_ROOT}%{contentdir}
tar cf - manual/ | tar xf - -C ${RPM_BUILD_ROOT}%{contentdir}

%clean
[ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != / ] && rm -rf ${RPM_BUILD_ROOT}

%post
#perl -i.bak -p -e 's/^#(LoadModule\s+php3_module\s+modules\/libphp3\.so).*$/$1/;s/^#(AddModule\s+mod_php3.c).*$/$1/' /etc/httpd/conf/httpd.conf
echo AddType application/x-httpd-php .php >> /etc/httpd/conf/httpd.conf
echo AddType application/x-httpd-php-source .phps >> /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd reload

%postun
if [ $1 = 0 ]; then
    perl -i.bak -p -e 's/^(LoadModule\s+php3_module\s+modules\/libphp3\.so).*$/#$1/;s/^(AddModule\s+mod_php3.c).*$/#$1/;s/^AddType application\/x-httpd-php \.php\n//;s/^AddType application\/x-httpd-php-source .phps\n//' /etc/httpd/conf/httpd.conf
    /etc/rc.d/init.d/httpd reload
fi

%files
%defattr(-,root,root)
%doc CODING_STANDARDS CREDITS EXTENSIONS FUNCTION_LIST.txt LICENSE NEWS README.BCMATH README.CVS-RULES README.EXT_SKEL README.QNX README.SELF-CONTAINED-EXTENSIONS README.Zeus TODO apidoc*.txt
/usr/lib/apache/*
%{sysconfdir}/*
%{_bindir}/*
%{_includedir}/*
%{_libdir}/php

%files manual
%defattr(-,root,root)
%{contentdir}/%{php_mandir}

%changelog
* Fri Dec 15 2000 Yasuhide OOMORI <dasen@xxxxxxxxxx>
- [php3-3.0.18-0vl2]
- updated to php-3.0.18-i18n-ja-2
- bundle English manual too

* Mon Dec 11 2000 Yasuhide OOMORI <dasen@xxxxxxxxxx>
- [php3-3.0.18-0vl1]
- use pre-patched source

* Fri Dec  1 2000 Yasuhide OOMORI <dasen@xxxxxxxxxx>
- [php3-3.0.18-0]
- first attempt.


źÉÕ¥Õ¥¡¥¤¥ë

[Á°][¼¡][ÈÖ¹æ½ç°ìÍ÷][¥¹¥ì¥Ã¥É°ìÍ÷]

      3677 2001-05-24 19:27 [MAO <mao@xxxxxxxxxx>] PHP ¥¢¥¯¥»¥¹¤Ç¥¨¥é¡¼                    
      3680 2001-05-25 02:05 ¨²[¤È¤ß¤¿¤Þ¤µ¤Ò¤í <tomm]                                       
      3682 2001-05-25 09:25 ¨­¨±[Shinichi Moritani <m]                                     
      3683 2001-05-25 09:53 ¨±[Hiroyuki Hasegawa <a]                                       
      3688 2001-05-25 14:44 ¡¡¨²[MAO <mao@xxxxxxxxxx>]                                     
      3689 2001-05-25 14:58 ¡¡¨­¨²[Hiroyuki Hasegawa <a]                                   
      3691 2001-05-25 19:53 ¡¡¨­¨­¨±[MAO <mao@xxxxxxxxxx>]                                 
      3694 2001-05-25 22:17 ¡¡¨­¨­¡¡¨±[MAO <mao@xxxxxxxxxx>] sysdate ¡¦ getdate ¤Î¤è¤¦¤Ê´Ø¿ô
      3695 2001-05-25 22:35 ¡¡¨­¨­¡¡¡¡¨±[MAO <mao@xxxxxxxxxx>]                             
      3690 2001-05-25 15:54 ¡¡¨­¨±[Tomohiro 'Tomo-p' KA] PHP4 with MySQL                   
      3693 2001-05-25 21:49 ¡¡¨±[Yasuhide OMORI / Âç¿]                                     
      3697 2001-05-26 14:19 ¡¡¡¡¨±[Hiroyuki Hasegawa <a]                                   
-> @  3699 2001-05-28 16:21 ¡¡¡¡¡¡¨²[Yasuhide OMORI / Âç¿]                                 
      3700 2001-05-28 16:48 ¡¡¡¡¡¡¨²[Yasuhide OMORI / Âç¿]                                 
      3701 2001-05-29 00:24 ¡¡¡¡¡¡¨±[BineÊ¿°æ  <hirai@xxx] ujis ¥Õ¥¡¥¤¥ë¤Î¼èÆÀÊýË¡