the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: mod-perl2-pm%type_pkg[perl]
Version: 2.0.3
Revision: 1000
Architecture: (%type_pkg[perl] = 581) powerpc, (%type_pkg[perl] = 584) powerpc
Distribution: (%type_pkg[perl] = 581) 10.3, (%type_pkg[perl] = 581) 10.4, (%type_pkg[perl] = 584) 10.3, (%type_pkg[perl] = 584) 10.4
DocFiles: BRANCHING Changes INSTALL MANIFEST META.yml README README-SVN RELEASE STATUS SVN-MOVE
Description: Embed perl in Apache 2
License: OSI-Approved
Maintainer: Dave Vasilevsky
Homepage: http://perl.apache.org
UpdatePOD: true
Type: perl (5.8.1 5.8.4 5.8.6 5.8.8)
BuildDepends: fink (>= 0.20.3), apache2-dev (>= 2.0.58-14), apr (>= 0.9.12-11), apr-dev (>= 0.9.12-11), aprutil-dev (>= 0.9.12-11), openldap23-dev, libiconv-dev, cyrus-sasl2-dev (>= 2.1.21-1), gdbm3, expat (>= 1.95.3-1), db44-aes | db44
# The main splitoff isn't much good without the module, but we let it install
# separately anyhow so that different pm5* don't conflict. It would suck if
# -dev depended on conflicting pm5* packages.
Depends: perl%type_pkg[perl]-core, apache2 (>= 2.0.58-14)
Provides: apache-test-pm%type_pkg[perl]
Conflicts: apache-test-pm%type_pkg[perl]
Replaces: apache-test-pm%type_pkg[perl]
Source: mirror:apache:perl/mod_perl-%v.tar.gz
Source-MD5: b40e2adf67c6be15a0041af1c67b6997
PatchScript: <<
#!/bin/sh -ev
# Need full path to perl
PERL=`which perl%type_raw[perl]`
# Perl's PERLPATH isn't quite right, need to replace it with the right one
perl -i -pe "s|sub perl_config\b|sub perl_config_perlpath{'$PERL'}\$&|" lib/Apache2/Build.pm
<<
CompileScript: <<
#!/bin/sh -ev
# Need full path to perl
PERL=`which perl%type_raw[perl]`
# Put arch in $archname
eval `perl%type_raw[perl] -V:archname`
# Need to pass apxs2 location
perl%type_raw[perl] Makefile.PL PERL="$PERL" PREFIX=%p \
INSTALLPRIVLIB=%p/lib/perl5/%type_raw[perl] \
INSTALLARCHLIB=%p/lib/perl5/%type_raw[perl]/$archname \
INSTALLSITELIB=%p/lib/perl5/%type_raw[perl] \
INSTALLSITEARCH=%p/lib/perl5/%type_raw[perl]/$archname \
INSTALLMAN1DIR=%p/lib/perl5/%type_raw[perl]/man/man1 \
INSTALLMAN3DIR=%p/lib/perl5/%type_raw[perl]/man/man3 \
INSTALLSITEMAN1DIR=%p/lib/perl5/%type_raw[perl]/man/man1 \
INSTALLSITEMAN3DIR=%p/lib/perl5/%type_raw[perl]/man/man3 \
INSTALLBIN=%p/bin INSTALLSITEBIN=%p/bin INSTALLSCRIPT=%p/bin \
MP_APR_CONFIG=%p/bin/apr-config \
MP_APXS=%p/bin/apxs2
make
<<
# Don't test, the tests apparently try to use the system's httpd.conf
NoPerlTests: true
InstallScript: <<
#!/bin/sh -ev
eval `perl%type_raw[perl] -V:archname`
# Specify install dirs for includes, module
# Also put man pages in versioned dir
make install \
INSTALLPRIVLIB=%i/lib/perl5/%type_raw[perl] \
INSTALLARCHLIB=%i/lib/perl5/%type_raw[perl]/$archname \
INSTALLSITELIB=%i/lib/perl5/%type_raw[perl] \
INSTALLSITEARCH=%i/lib/perl5/%type_raw[perl]/$archname \
INSTALLMAN1DIR=%i/lib/perl5/%type_raw[perl]/man/man1 \
INSTALLMAN3DIR=%i/lib/perl5/%type_raw[perl]/man/man3 \
INSTALLSITEMAN1DIR=%i/lib/perl5/%type_raw[perl]/man/man1 \
INSTALLSITEMAN3DIR=%i/lib/perl5/%type_raw[perl]/man/man3 \
INSTALLBIN=%i/bin INSTALLSITEBIN=%i/bin INSTALLSCRIPT=%i/bin \
MODPERL_AP_INCLUDEDIR=%i/include/apache2 \
MODPERL_AP_LIBEXECDIR=%i/lib/apache2/modules
(
cat <
EOF
) >mod_perl.load
install -d -m 755 '%i/etc/apache2/mods-available'
/usr/bin/install -m 644 mod_perl.load %i/etc/apache2/mods-available
<<
DescDetail: <<
mod_perl 2.0 allows Apache 2.x to interact with Perl. Some of the features:
* Accelerate CGI scripts
* Hook into Apache requests
* Configure Apache with perl
<<
SplitOff: <<
Package: libapache2-mod-perl2-perl%type_pkg[perl]
Files: lib/apache2 bin etc
DocFiles: LICENSE
Depends: mod-perl2-pm%type_pkg[perl] (= %v-%r)
Replaces: %{ni}581, %{ni}584, %{ni}586
Conflicts: %{ni}581, %{ni}584, %{ni}586
ConfFiles: <<
%p/etc/apache2/mods-available/mod_perl.load
<<
PostInstScript: <<
echo "Enabling mod_perl module..."
%p/sbin/a2enmod mod_perl
if [ -f /Library/StartupItems/daemonic-apache2/daemonic-apache2 ]
then
echo "Restarting apache2..."
%p/sbin/apache2ctl restart
fi
exit 0
<<
PreRmScript: <<
if [ "$1" != "remove" -a "$1" != "purge" ]; then
exit 0
fi
echo "Disabling mod_perl module..."
%p/sbin/a2dismod mod_perl
<<
<<
SplitOff2: <<
Package: %N-dev
Files: include
DocFiles: LICENSE
Depends: %N (= %v-%r)
Replaces: %{Ni}581-dev, %{Ni}584-dev, %{Ni}586-dev
Conflicts: %{Ni}581-dev, %{Ni}584-dev, %{Ni}586-dev
BuildDependsOnly: true
<<
<<