On Wed, Jun 25, 2003 at 06:53:52PM -0400, Bill Marrs wrote:
> I'm looking for a Redhat 9 compatible mod_perl-1.99_09 rpm.
> 
> If anyone has one or knows where I can get one, let me know.
> 

For my RedHat 8.0 I've made a custom .spec file to build an RPM
directly from the CVS sources.

Get the 'modperl-2.0.spec' file attached to this mail, and launch the
following command (as root, or any other user if you have configured an
RPM build environnement for it):

  # rpmbuild -bb modperl-2.0.spec

It should fetch the latest CVS source, and start the build process, then
package the files into:

  /usr/src/redhat/RPMS/i386/mod_perl-2.0_cvs-1.99.10.i386.rpm

Now you can try to upgrade your mod_perl with:

  # rpm -Uvh mod_perl-2.0_cvs-1.99.10.i386.rpm

At this point, it should tell you there is a problem with the following
missing dependencies:

  perl(Apache::FunctionTable) is needed by mod_perl-2.0_cvs-1.99.10
  perl(Apache::StructureTable) is needed by mod_perl-2.0_cvs-1.99.10
  perl(Apache::TestConfigParse) is needed by mod_perl-2.0_cvs-1.99.10
  perl(Apache::TestConfigPerl) is needed by mod_perl-2.0_cvs-1.99.10

You can ignore them and force the upgrade with the "--nodeps" option:

  # rpm -Uvh --nodeps mod_perl-2.0_cvs-1.99.10.i386.rpm

(In fact, the RedHat SRPMS use a 'filter-requires.sh' shell script that
remove these dependencies from the "require list")

Note that I skip the 'make test' phase.

Regards,
Jérôme

--

Name: mod_perl
Version: 2.0_cvs
Release: 1.99.10
Group: System Environment/Daemons
License: GPL
Summary: An embedded Perl interpreter for the Apache Web server.
Source: http://perl.apache.org/dist/mod_perl-%{version}.tar.gz
URL: http://perl.apache.org/
BuildRoot: %{_tmppath}/%{name}-root
Requires: httpd >= 2.0.40, perl >= 5.8.0
BuildPrereq: httpd-devel >= 2.0.40, perl
Prereq: perl

%description
Mod_perl incorporates a Perl interpreter into the Apache web server,
so that the Apache web server can directly execute Perl code.
Mod_perl links the Perl runtime library into the Apache web server and
provides an object-oriented Perl interface for Apache's C language
API.  The end result is a quicker CGI script turnaround process, since
no external Perl interpreter has to be started.

Install mod_perl if you're installing the Apache web server and you'd
like for it to directly incorporate a Perl interpreter.

%prep
rm -Rf $RPM_BUILD_DIR/mod_perl-2.0_cvs
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-2.0
mv modperl-2.0 mod_perl-2.0_cvs

%build
cd mod_perl-%{version}
# Compile the module.
perl Makefile.PL \
        PREFIX=$RPM_BUILD_ROOT/usr \
        INSTALLDIRS=vendor \
        MP_APXS=%{_sbindir}/apxs \
        MODPERL_AP_INCLUDEDIR=$RPM_BUILD_ROOT/usr/include/httpd \
        MODPERL_AP_LIBEXECDIR=$RPM_BUILD_ROOT%{_libdir}/httpd/modules
make

# Run the test suite.
#  Need to make t/htdocs/perlio because it isn't expecting to be run as
#  root and will fail tests that try and write files because the server
#  will have changed it's uid.
#mkdir t/htdocs/perlio
#chmod 777 t/htdocs/perlio
#make test

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
cd mod_perl-%{version}
make install MODPERL_AP_LIBEXECDIR=$RPM_BUILD_ROOT%{_libdir}/httpd/modules 
MODPERL_AP_INCLUDEDIR=$RPM_BUILD_ROOT/usr/include/httpd

# Remove the temporary files.
find $RPM_BUILD_ROOT%{_libdir}/perl?/vendor_perl/*/*/auto -name "*.bs" | xargs rm

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc Changes INSTALL LICENSE README docs
/usr/bin/*
/usr/include/httpd/*
%{_libdir}/httpd/modules/mod_perl.so
%{_libdir}/perl?/vendor_perl/*/*/auto/*
%{_libdir}/perl?/vendor_perl/*/*/Apache
%{_libdir}/perl?/vendor_perl/*/*/Bundle/*
%{_libdir}/perl?/vendor_perl/*/*/APR
%{_libdir}/perl?/vendor_perl/*/*/ModPerl
%{_libdir}/perl?/vendor_perl/*/*/*.pm
/usr/man/man3/*.3*

%changelog
* Wed Jun 25 2003 Jérôme Augé <[EMAIL PROTECTED]> 1.99-CVS
- build mod_perl-2.0 RPM from the CVS sources
  (based on RedHat SPEC file)

Reply via email to