Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 1997 05:40:20 +0200
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        asami@FreeBSD.ORG
Cc:        ports@FreeBSD.ORG
Subject:   looking for ideas to add apache modules to apache port, first results
Message-ID:  <19970801054020.52998@gtn.com>

next in thread | raw e-mail | index | archive | help
Hi !

In the company I needed apache + php. Possibly I´ll add python as
apache module as well.

The question is, if we are doing many apache+xxx ports based on
the apache-stable port or if we could try to ,hack´ the existing
apache-stable and apache-current ports, to combine it into one
by trying to set make environment variables.

My final goal would be to get a functionality like in stronghold,
which comes with python, fast-cgi and php support.

I´d like to show you now, how I did get it managed, to add
the php module for example ... 

Somebody so tough, to add the other ones, or an Idea, how to 
make things more comfortable ???

	Andreas ///

--------- SNIP -----------------------
DISTNAME=       apache_1.2.1
PKGNAME=        apache-1.2.1
CATEGORIES=     www
MASTER_SITES=   ftp://www.apache.org/apache/dist/ \
                ftp://ftp.nerosworld.com/pub/php/dist/ \
                http://www.python.org/ftp/python/contrib/Web/
DISTFILES=      apache_1.2.1.tar.gz \
                php-2.0b12.tar.gz \
                PyApache.tar.gz

MAINTAINER=     ports@freebsd.org

BUILD_DEPENDS=  ${PREFIX}/lib/libgd.a:${PORTSDIR}/graphics/gd

pre-configure:
        echo "Don\'t forget to add ${PREFIX}/include/gd to additional path !!!"
        ( cd ${WRKDIR}/php-2.0b12; ./install )
        ( cd ${WRKDIR}/php-2.0b12/src; make )
        ( cd ${WRKDIR}/php-2.0b12/src \
        && cp mod_php.c mod_php.h libphp.a ../../apache_1.2.1/src )
        ( cd ${WRKDIR}/apache_1.2.1/src \
        && echo "Module php_module mod_php.o" \
                >> Configuration \
        && echo "EXTRA_LIBS=-lmd libphp.a -L/usr/local/lib -lmsql -lgd -lm" \
                >> Configuration )

post-patch:
        ${CP} /usr/include/md5.h ${WRKSRC}/src/md5.h

post-install:
        @if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
                echo "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
                echo "#!/bin/sh" > ${PREFIX}/etc/rc.d/apache.sh; \
                echo "[ -x /usr/local/sbin/httpd ] && /usr/local/sbin/httpd && e
cho -n ' httpd'" >> ${PREFIX}/etc/rc.d/apache.sh; \
                chmod 751 ${PREFIX}/etc/rc.d/apache.sh; \
        fi
        echo "AddType application/x-httpd-php .phtml" \
                > ${PREFIX}/etc/apache/srm.conf.php

.include <bsd.port.mk>

-- 
Andreas Klemm | klemm.gtn.com - powered by
                    Symmetric MultiProcessor FreeBSD
                       http://www.freebsd.org/~fsmp/SMP/SMP.html
                          http://www.freebsd.org/~fsmp/SMP/benches.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970801054020.52998>