SPECS (DEVEL): test-php.spec - blah

glen glen at pld-linux.org
Fri Sep 16 03:20:41 CEST 2005


Author: glen                         Date: Fri Sep 16 01:20:41 2005 GMT
Module: SPECS                         Tag: DEVEL
---- Log message:
- blah

---- Files affected:
SPECS:
   test-php.spec (1.1.2.3 -> 1.1.2.4) 

---- Diffs:

================================================================
Index: SPECS/test-php.spec
diff -u SPECS/test-php.spec:1.1.2.3 SPECS/test-php.spec:1.1.2.4
--- SPECS/test-php.spec:1.1.2.3	Fri Sep 16 02:19:13 2005
+++ SPECS/test-php.spec	Fri Sep 16 03:20:36 2005
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+%include	/usr/lib/rpm/macros.php
+
+
 Summary:	The PHP HTML-embedded scripting language for use with Apache
 Name:		test-php
 Version:	5.0.5
@@ -9,57 +12,60 @@
 Source0:	http://www.php.net/distributions/php-%{version}.tar.bz2
 # Source0-md5:	b5d4ca75bbb11ee5b830fa67213d9f7f
 #BuildRequires:	rpmbuild(macros) >= 1.238
+
+# redefine to use versions from current source
+%define		__php_includedir %{_builddir}/php-%{version}
+%{expand:%%define __old_php_provides %__php_provides}
+%define		__php_provides	%{_builddir}/php-%{version}/rpm-find-provides
+
+%define	_use_internal_dependency_generator 0
+
+# Note: Used iff _use_internal_dependency_generator is zero.
+#%__find_provides   /usr/lib/rpm/rpmdeps --provides
+#%__find_requires   /usr/lib/rpm/rpmdeps --requires
+%define		__find_provides    %{_builddir}/php-%{version}/rpm-find-provides
+%define		__find_requires %{nil}
+
+# these need to be updated manually when they change
+#define PHP_API_VERSION		20031224
+#define ZEND_MODULE_API		20041030
+#define ZEND_EXTENSION_API	220040412
+
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/php
 %define		_phpsharedir	%{_datadir}/php
 %define		extensionsdir	%{_libdir}/php
 
-# redefine to use versions from current source
-%define		__php_includedir %{_builddir}/php-%{version}
-
-# temporarily
-%define	php_api_version		%(awk '/#define PHP_API_VERSION/{print $3}' %{__php_includedir}/main/php.h || echo ERROR)
-%define	zend_module_api		%(awk '/#define ZEND_MODULE_API_NO/{print $3}' %{__php_includedir}/Zend/zend_modules.h || echo ERROR)
-%define	zend_extension_api		%(awk '/#define ZEND_EXTENSION_API_NO/{print $3}' %{__php_includedir}/Zend/zend_extensions.h || echo ERROR)
-
 %description
 PHP is an HTML-embedded scripting language. PHP attempts to make it
 
 %prep
 # IMPORTANT: if you change '%setup', you should change %__php_includedir macro earlier in this file
-%setup -q -n php-%{version}
-
-%build
-cat >&2 <<EOF
-
-	MODULES_API = %{php_api_version}
-	ZEND_MODULE_API = %{zend_module_api}
-	ZEND_EXTENSION_API = %{zend_extension_api}
+%setup -q -n php-%{version} -T -c
 
+cat <<'EOF' > ./rpm-find-provides
+#!/bin/sh
+echo "$0: $#: mina" >&2
+FILES="$(cat)"
+echo files: "$FILES" >&2
+echo "$FILES" | %__old_php_provides >&2
 EOF
-ls -l %{__php_includedir}
 
-%install
-# sanity check
-cat >&2 <<EOF
+chmod +x ./rpm-find-provides
 
-	MODULES_API = %{php_api_version}
-	ZEND_MODULE_API = %{zend_module_api}
-	ZEND_EXTENSION_API = %{zend_extension_api}
+%build
 
-EOF
-ls -l %{__php_includedir}
-%if "%{php_api_version}" == "ERROR" || "%{zend_module_api}" == "ERROR" || "%{zend_extension_api}" == "ERROR"
-	echo "INTERNAL ERROR: API versions broken!"
-	exit 1
-%endif
+%install
+install -d $RPM_BUILD_ROOT/foo
+touch $RPM_BUILD_ROOT/{l.php,m.sh}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+/
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -67,6 +73,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.1.2.4  2005/09/16 01:20:36  glen
+- blah
+
 Revision 1.1.2.3  2005/09/16 00:19:13  glen
 - works for me
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/test-php.spec?r1=1.1.2.3&r2=1.1.2.4&f=u




More information about the pld-cvs-commit mailing list