Hi --
The attached patch contains modifications to the makerpm script for php-4.3.9
for portability, security, and bug fixes. Without the patches, the generated
spec file
would not build on a Fedora Core 2 system.
Here's a summary of the changes:
- Invoke rpmbuild instead of rpm for building package.
- Replace hard-coded rpm directories with rpm macros.
- Drop buildconf invocation.
- Replace hard-coded /usr with %{_prefix}.
- Add README* to %docs, remove missing Changelog entry
-Gyepi
--- makerpm.orig 2004-12-01 19:00:56.646722375 -0500
+++ makerpm 2004-12-01 21:56:28.688613389 -0500
@@ -2,6 +2,10 @@
# Based slightly on an original by John H Terpstra but not much left of his.
# S Liddicott 1999 [EMAIL PROTECTED]
+# Modified my Gyepi Sam <[EMAIL PROTECTED]> to:
+# - Invoke rpmbuild instead of rpm for building package.
+# - Replace hard-coded rpm directories with rpm macros.
+# - Fixes to generated spec file. See changelog entry.
PREFIX="php"
TARDIR="`basename \`pwd\``"
@@ -50,17 +54,17 @@
%prep
%setup -q -n TARDIR
#mkdir manual; cd manual && tar xzf $RPM_SOURCE_DIR/php3-manual.tar.gz
-./buildconf
+#./buildconf
%build
# first the standalone (why can't you build both at once?)
# need to run this under sh or it breaks
-sh ./configure --prefix=/usr \
- --with-config-file-path=/etc \
+sh ./configure --prefix=%{_prefix} \
+ --with-config-file-path=%{_etcdir} \
--enable-force-cgi-redirect \
--enable-safe-mode \
- --with-exec-dir=/usr/bin \
+ --with-exec-dir=%{_prefix}/bin \
--with-mysql \
--with-zlib \
--enable-xml \
@@ -71,13 +75,13 @@
# then the apache module
test -f config.cache && rm -f config.cache
-sh ./configure --prefix=/usr \
+sh ./configure --prefix=%{_prefix} \
--with-apxs=/usr/sbin/apxs \
--enable-versioning \
--enable-cli \
--with-config-file-path=/etc \
--enable-safe-mode \
- --with-exec-dir=/usr/bin \
+ --with-exec-dir=%{_prefix}/bin \
--with-mysql \
--with-zlib \
--enable-xml \
@@ -104,6 +108,11 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Dec 1 2004 Gyepi Sam <[EMAIL PROTECTED]>
+- Drop buildconf invocation.
+- Replace hard-coded /usr with %{_prefix}.
+- Add README* to %docs, remove missing Changelog entry
+
* Tue Jan 20 2004 Marcus Boerger <[EMAIL PROTECTED]>
- Fix script
- Drop pdf
@@ -153,9 +162,9 @@
%doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE NEWS
EOF
-RPMDIR=/usr/src/redhat/RPMS
-SPECDIR=/usr/src/redhat/SPECS
-SRCDIR=/usr/src/redhat/SOURCES
+RPMDIR=$(rpm --eval '%{_topdir}')
+SPECDIR=$(rpm --eval '%{_specdir}')
+SRCDIR=$(rpm --eval '%{_sourcedir}')
(
make clean
@@ -163,8 +172,9 @@
cd ..
tar czvf ${SRCDIR}/${TAR} $TARDIR )
-cp -a $SPEC $SPECDIR/${SPEC}
+SPECFILE=$SPECDIR/${SPEC}
+cp -a $SPEC $SPECFILE
#cp -a *.patch $SRCDIR
-cd $SRCDIR
-cd $SPECDIR
-rpm -ba -v ${SPEC}
+#cd $SRCDIR
+#cd $SPECDIR
+rpmbuild -ba -v ${SPECFILE}
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php