httpd.cygclass

Cygport Reference Manual

### TABLE OF CONTENTS

- httpd.cygclass

- CATEGORY (httpd)
- SUMMARY (httpd)
- HTTPD_APXS
- HTTPD
- HTTPD_VERSION
- HTTPD_INCLUDEDIR
- HTTPD_LIBEXECDIR
- HTTPD_SYSCONFDIR
- HTTPD_SYSCONFMODULESDIR
- HTTPD_CFLAGS
- HTTPD_LIBS
- APR_VERSION
- APR_CONFIG
- APU_CONFIG
- APR_CFLAGS
- APR_LIBS
- APR_LIBTOOL
- APREQ2_CONFIG
- APREQ2_CFLAGS
- APREQ2_LIBS
- httpd_mod_compile
- httpd_apxs_compile
- dohttpdconf
- dohttpdmod
- httpd_loadmodules

## httpd.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

      inherit httpd

DESCRIPTION

The Apache Web Server is an HTTP server which can be extended through plugins, known as DSOs, to support all sorts of tasks, scripting languages, and more. DSOs use the ".so" extension, even on platforms which use DLLs.

The purpose of httpd.cygclass is to provide functions and definitions for building DSOs for the Cygwin Apache HTTP Server packages. Cygwin packages doing so should use the "httpd-" prefix before the canonical package name. Because there is no consistent DSO source buildsystem, src_compile and src_install must be defined yourself.

EXAMPLES

Apache module source packages do not have a single system. Some packages are autoconf-based:

        inherit httpd

        NAME="httpd-mod_clamav"
        VERSION=0.23
        RELEASE=1
        CATEGORY="Web"
        SUMMARY="ClamAV filter module for Apache HTTP Server"
        DESCRIPTION="mod_clamav is an Apache HTTP Server filter which scans the content
        delivered by the proxy module (mod_proxy) for viruses using the Clamav
        virus scanning engine."
        HOMEPAGE="http://software.othello.ch/mod_clamav/"
        LICENSE="GPL-2.0-only"
        SRC_URI="http://software.othello.ch/mod_clamav/mod_clamav-${VERSION}.tar.gz"
        SRC_DIR="mod_clamav-${VERSION}"
        PATCH_URI="0.22-cygwin-layout.patch"

        src_compile() {
          cd ${S}
          cygautoreconf
          cd ${B}
          httpd_mod_compile
        }

        src_install() {
          cd ${B}
          dohttpdmod mod_clamav
          dohttpdconf ${S}/sample.conf ${S}/safepatterns.conf
        }

Other simple module just ship the sources without a build system:

        inherit httpd

        NAME="httpd-mod_geoip"
        VERSION=1.2.8
        RELEASE=1
        CATEGORY="Web"
        SUMMARY="Apache HTTP Server GeoIP module"
        DESCRIPTION="mod_geoip2 is an Apache HTTP Server module for finding the country and
        city that a web request originated from.  It uses the GeoIP library and
        database to perform the lookup."
        HOMEPAGE="https://dev.maxmind.com/geoip/legacy/mod_geoip2/"
        LICENSE="Apache-1.1"
        SRC_URI="https://github.com/maxmind/geoip-api-mod_geoip2/archive/v${VERSION}.tar.gz"
        SRC_DIR="geoip-api-mod_geoip2-${VERSION}"

        src_compile() {
          lndirs
          cd ${B}
          httpd_apxs_compile *.c -lGeoIP
        }

        src_install() {
          cd ${B}
          dohttpdmod mod_geoip.la
          httpd_loadmodules
          dodoc README.php
        }

REQUIRES

httpd-devel, libapr1-devel, libaprutil1-devel

SEE ALSO

mirror_apache

## CATEGORY (httpd)

[ Top ] [ httpd.cygclass ] [ Overloads ]

DEFINITION

    CATEGORY="Web"

## SUMMARY (httpd)

[ Top ] [ httpd.cygclass ] [ Overloads ]

DEFINITION

    SUMMARY="Apache HTTP Server ${PN#httpd-mod_} module"

## HTTPD_APXS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to apxs(1), the APache eXtenSion tool.

## HTTPD

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to the Apache HTTP Server.

## HTTPD_VERSION

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Full version of the Apache HTTP Server.

## HTTPD_INCLUDEDIR

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Location of Apache HTTP Server headers.

## HTTPD_LIBEXECDIR

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for Apache HTTP Server DSOs.

## HTTPD_SYSCONFDIR

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for Apache HTTP Server configuration files.

## HTTPD_SYSCONFMODULESDIR

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for Apache HTTP Server LoadModule directives

## HTTPD_CFLAGS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Compile flags for building Apache HTTP Server DSOs.

## HTTPD_LIBS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for building Apache HTTP Server DSOs.

NOTE

This is Cygwin specific due to the linking requirements of PE/COFF DLLs.

## APR_VERSION

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Major version of APR libraries used by the Apache HTTP Server.

## APR_CONFIG

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to matching APR_VERSION-specific apr-config script

## APU_CONFIG

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to matching APR_VERSION-specific apu-config script

## APR_CFLAGS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Compile flags for building against APR libraries

## APR_LIBS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for building against APR libraries

## APR_LIBTOOL

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to libtool script used by APR-dependent packages

## APREQ2_CONFIG

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Path to apreq2-config script

## APREQ2_CFLAGS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Compile flags for building against libapreq2

REQUIRES

libapreq2-devel

## APREQ2_LIBS

[ Top ] [ httpd.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for building against libapreq2

REQUIRES

libapreq2-devel

## httpd_mod_compile

[ Top ] [ httpd.cygclass ] [ Compile Functions ]

SYNOPSIS

      httpd_mod_compile [CONFIGURE_FLAGS]

DESCRIPTION

Build a DSO which uses an autoconf/libtool buildsystem by calling cygconf and cygmake with some Apache-specific flags. Arguments, if any, are passed as configure flags.

NOTE

This is very generic and may not work in all cases.

## httpd_apxs_compile

[ Top ] [ httpd.cygclass ] [ Compile Functions ]

SYNOPSIS

      httpd_apxs_compile [CFLAGS] SOURCES [LIBS]

DESCRIPTION

Uses HTTPD_APXS to build a DSO from one or more .c source files which ship without their own build system.

ARGUMENTS

- CFLAGS -- Additional CFLAGS required for compiling this DSO.
- SOURCES -- One or more .c sources.
- LIBS -- Additional libraries required for linking this DSO. Must be last.

## dohttpdconf

[ Top ] [ httpd.cygclass ] [ Install Functions ]

SYNOPSIS

      dohttpdconf CONF_FILE [CONF_FILE] ...

DESCRIPTION

Installs additional Apache configuration files.

NOTE

All files passed to dohttpdconf will be concenated into one file named HTTPD_MOD_NAME.conf. Therefore, this must only be called once.

## dohttpdmod

[ Top ] [ httpd.cygclass ] [ Install Functions ]

SYNOPSIS

      dohttpdmod DSO [DSO] ...

DESCRIPTION

Installs one or more DSOs into $D/HTTPD_LIBEXECDIR. DSOs are usually a .la libtool library (whether build with httpd_mod_compile or httpd_apxs_compile), but may also be a .so DLL if built without libtool.

## httpd_loadmodules

[ Top ] [ httpd.cygclass ] [ Install Functions ]

SYNOPSIS

      httpd_loadmodules

DESCRIPTION

Creates a LoadModule configuration snippet in HTTPD_SYSCONFMODULESDIR. This means that users need not do anything more than install the package in order to enable the DSO. For modules which require further configuration, create a complete file and use dohttpdconf to install it.