INFO: mod_php3.spec

Pawel Gajda pagaj w brave.shadow.eu.org
Wto, 10 Lis 1998, 11:45:06 CET


Witam

Przesyłam spec do PHP 3.05 (src.rpm wylądował na cenzorze).
Prosiłbym o dokładne przyjrzenie się specowi i przetestowanie pakietu ;)
Acha, rzecz działa TYLKO I WYŁĄCZNIE z apache'em w wersji od 1.3.1 wzwyż.
Z tego wynika, że do -devel na razie nie trafi ;(
Pakiet ma zastąpić mod_php z Redhata.

-- 
Paweł Gajda

-------------- następna część ---------
Summary:     A server-side, HTML-embedded scripting language
Summary(pl): Język skryptowy do dynamicznego tworzenia stron WWW
Name:        mod_php3
Version:     3.0.5
Release:     2
URL:         http://www.php.net/
Source:      ftp://www.php.net/pub/distributions/php-%{version}.tar.gz
Source1:     FAQ.php3
Source2:     changes.php3
Source3:     manual.tar.gz
Icon:        php3.gif
Copyright:   GPL
Group:       Networking/Daemons
Requires:    apache >= 1.3.1
Obsoletes:   php, mod_php
BuildRoot:   /tmp/%{name}-%{version}-root

%description
PHP: Hypertext Preprocessor Version 3.0 is an HTML-embedded scripting
language. Much of its syntax is borrowed from C, Java and Perl with a
couple of unique PHP-specific features thrown in. The goal of the
language is to allow web developers to write dynamically generated
pages quickly.

%description -l pl
PHP jest językiem skryptowym, którego polecenia umieszcza się w plikach
HTML.  Pakiet ten zawiera moduł przeznaczony dla serwera HTTP (jak np.
Apache), który interpretuje te polecenia.  Umożliwia to tworzenie
dynamicznie stron WWW.  Spora część składni PHP zapożyczona została
z języków: C, Java i Perl.

%package doc
Group:       Networking/Daemons
Summary:     Online manual for PHP3
Summary(pl): Dokumentacja dla PHP3

%description doc
Comprehensive documentation for PHP3, viewable through your web server, too!

%description doc -l pl
Dokumentacja dla pakietu PHP3.  Można ją również oglądać poprzez serwer WWW.

%prep
%setup -q -n php-%{version}

%build
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
./configure \
	--with-apxs=/usr/sbin/apxs \
	--prefix=/usr \
	--without-gd \
	--with-freetype \
	--with-zlib \
	--with-dbase \
	--with-filepro \
	--with-config-file-path=/etc/httpd/conf \
	--disable-debug \
	--enable-magic-quotes \
	--enable-debugger \
	--enable-bcmath \
	--enable-track-vars

make -C regex
make
make -C convertor

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/httpd/conf
install -d $RPM_BUILD_ROOT/home/httpd/icons
install -d $RPM_BUILD_ROOT/home/httpd/html/php3-doc
install -d $RPM_BUILD_ROOT/usr/libexec/apache
install -d $RPM_BUILD_ROOT/usr/bin
install libphp3.so $RPM_BUILD_ROOT/usr/libexec/apache/mod_php3.so
install convertor/convertor $RPM_BUILD_ROOT/usr/bin
install php3.ini-dist $RPM_BUILD_ROOT/etc/httpd/conf/php3.ini
install extra/icons/*.gif $RPM_BUILD_ROOT/home/httpd/icons
mv -f convertor/README convertor/README.convertor

cp -f %{SOURCE1} .
cp -f %{SOURCE2} .
cd $RPM_BUILD_ROOT/home/httpd/html/php3-doc
tar zxvf %{SOURCE3}
ln -s manual.html index.html

strip $RPM_BUILD_ROOT/usr/{bin/*,libexec/apache/*.so} ||

%post
if [ -f /etc/httpd/conf/httpd.conf ] && ! grep -q "^LoadModule.*mod_php3.so" /etc/httpd/conf/httpd.conf; then
    echo "LoadModule php3_module        libexec/apache/mod_php3.so" >> /etc/httpd/conf/httpd.conf
    echo "AddModule mod_php3.c" >> /etc/httpd/conf/httpd.conf
fi

sed 's/#AddIcon\ \/icons\/php3\.gif\ \.php3/AddIcon\ \/icons\/php3\.gif\ \.php3/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
sed 's/#AddIcon\ \/icons\/php2\.gif\ \.phtml/AddIcon\ \/icons\/php2\.gif\ \.phtml/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
sed 's/#AddIcon\ \/icons\/phps\.gif\ \.php3s\ \.phps/AddIcon\ \/icons\/phps\.gif\ \.php3s\ \.phps/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf

sed 's/#AddType\ application\/x-httpd-php3\ \.phtml/AddType\ application\/x-httpd-php3\ \.phtml/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
sed 's/#AddType\ application\/x-httpd-php3-source\ \.phps/AddType\ application\/x-httpd-php3-source\ \.phps/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
sed 's/#AddType\ application\/x-httpd-php3\ \.php3/AddType\ application\/x-httpd-php3\ \.php3/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf

if [ -f /var/lock/subsys/httpd ]; then
   /etc/rc.d/init.d/httpd restart
fi

%postun
if [ $1 = 0 ]; then
   grep -v php3_module /etc/httpd/conf/httpd.conf | grep -v /bin/sh > /etc/httpd/conf/httpd.conf.new
   mv -f /etc/httpd/conf/httpd.conf.new /etc/httpd/conf/httpd.conf
   grep -v mod_php3.c /etc/httpd/conf/httpd.conf | grep -v /bin/sh > /etc/httpd/conf/httpd.conf.new
   mv -f /etc/httpd/conf/httpd.conf.new /etc/httpd/conf/httpd.conf
   sed 's/AddIcon\ \/icons\/php3\.gif\ \.php3/#AddIcon\ \/icons\/php3\.gif\ \.php3/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
   sed 's/AddIcon\ \/icons\/php2\.gif\ \.phtml/#AddIcon\ \/icons\/php2\.gif\ \.phtml/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
   sed 's/AddIcon\ \/icons\/phps\.gif\ \.php3s\ \.phps/#AddIcon\ \/icons\/phps.gif\ \.php3s\ \.phps/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
   sed 's/AddType\ application\/x-httpd-php3\ \.phtml/#AddType\ application\/x-httpd-php3\ \.phtml/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
   sed 's/AddType\ application\/x-httpd-php3-source\ \.phps/#AddType\ application\/x-httpd-php3-source\ \.phps/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
   sed 's/AddType\ application\/x-httpd-php3\ \.php3/#AddType\ application\/x-httpd-php3\ \.php3/' < /etc/httpd/conf/srm.conf > /tmp/srm.tmp
   mv -f /tmp/srm.tmp /etc/httpd/conf/srm.conf
fi

if [ -f /var/lock/subsys/httpd ]; then
   /etc/rc.d/init.d/httpd restart
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc BUGS CHANGES COPYING CREDITS ChangeLog EXTENSION_STATUS FUNCTION_LIST.txt INSTALL LICENSE TODO WISHLIST*
%doc convertor/README.convertor examples FAQ.php3 changes.php3
%config /etc/httpd/conf/php3.ini
/home/httpd/icons/*
%defattr(711,root,root,644)
/usr/bin/convertor
/usr/libexec/apache/*.so

%files doc
%defattr(644,root,root,755)
/home/httpd/html/php3-doc

%changelog
* Mon Nov 9 1998 Paweł Gajda <pagaj w shadow.eu.org>
  [3.0.5-2]
- changed spec file for use with PLD
- disabled gd support
- added Polish spec translation

* Fri Oct 9 1998 Stig Bakken <ssb w guardian.no>
  [3.0.5-1]
- updated manual and FAQ
- not compiling with mysql and pgsql support by default

* Thu Sep 24 1998 Arne Coucheron <arneco w online.no>
  [3.0.4-1]
- updated manual, FAQ and changes files
- recompiled against Apache 1.3.2
- name of package changed to mod_php3
- removed patch for Postgresql, fixed in sources

* Mon Aug 17 1998 Arne Coucheron <arneco w online.no>
  [3.0.3-1]
- module moved to /usr/libexec/apache to comply with latest apache rpm

* Fri Aug 07 1998 Andrea Borgia <borgia w cs.unibo.it>
  [3.0.2a]
- removed unnecessary "requires freetype" and "requires gd"
	(they're autodetected by rpm and do not force the builder
	to have them installed at compile-time)
- fixed sed substitutions (extra or missing escapes)
- added to %doc: COPYING, EXTENSION_STATUS, INSTALL, LICENSE, TODO, WISHLIST*
- added online manual as a subpackage and made it viewable through web server
	(think of a cluster of machines to see the reason why)

* Mon Jul 06 1998 Arne Coucheron <arneco w online.no>
  [3.0.1-1]

* Sun Jun 21 1998 Arne Coucheron <arneco w online.no>
  [3.0-1]
- added --with-zlib and --enable-debugger to configure
- changed name of package to mod_php

* Fri Jun 05 1998 Arne Coucheron <arneco w online.no>
  [3.0RC5-2]
- recompiled against Apache 1.3.0
- corrected source and url tags

* Tue Jun 02 1998 Arne Coucheron <arneco w online.no>
  [3.0RC5]
- this is now a standalone package thanks to the DSO capabilities of
  Apache 1.3 which make it possible to build modules outside the Apache
  source tree


Więcej informacji o liście dyskusyjnej pld-devel-pl