diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-09 12:09:00 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-22 12:46:29 +0000 |
commit | 39bf81cb8e62617835390573bb960be8962a0a74 (patch) | |
tree | aa574f8b8f2b2c6e620dfe412a89f980a59f952e | |
parent | 2196309da5dabee3de1e735846b211f1dd63270e (diff) | |
download | definitions-39bf81cb8e62617835390573bb960be8962a0a74.tar.gz |
Add apache httpd server stratum
-rw-r--r-- | strata/apache-httpd-server.morph | 28 | ||||
-rw-r--r-- | strata/apache-httpd-server/apr-util.morph | 9 | ||||
-rw-r--r-- | strata/apache-httpd-server/apr.morph | 20 | ||||
-rw-r--r-- | strata/apache-httpd-server/httpd-server.morph | 34 |
4 files changed, 91 insertions, 0 deletions
diff --git a/strata/apache-httpd-server.morph b/strata/apache-httpd-server.morph new file mode 100644 index 00000000..4231b285 --- /dev/null +++ b/strata/apache-httpd-server.morph @@ -0,0 +1,28 @@ +name: apache-httpd-server +kind: stratum +description: apache http web server +build-depends: +- morph: strata/tools.morph +- morph: strata/pcre-utils.morph +chunks: +- name: apr + morph: strata/apache-httpd-server/apr.morph + repo: https://github.com/apache/apr.git + ref: 4ea9d6236ef2b9eb79feb05167d50c1a732420f0 + unpetrify-ref: master + build-depends: [] +- name: apr-util + morph: strata/apache-httpd-server/apr-util.morph + repo: https://github.com/apache/apr-util.git + ref: 9890706bda63c5d5d5197d482c1b682240431465 + unpetrify-ref: 1.5.4 + build-depends: + - apr +- name: httpd + morph: strata/apache-httpd-server/httpd-server.morph + repo: git://git.apache.org/httpd.git + ref: 6d8e0b2fd95268fcba96326ba9dce7bb8f712c19 + unpetrify-ref: 2.4.10 + build-depends: + - apr + - apr-util diff --git a/strata/apache-httpd-server/apr-util.morph b/strata/apache-httpd-server/apr-util.morph new file mode 100644 index 00000000..819858b3 --- /dev/null +++ b/strata/apache-httpd-server/apr-util.morph @@ -0,0 +1,9 @@ +name: apr-util +kind: chunk +configure-commands: +- ./buildconf --with-apr=/usr/share/apr-1 +- ./configure --prefix="$PREFIX" --with-apr=/usr/bin/apr-2-config +build-commands: +- make +install-commands: +- PREFIX="$PREFIX" DESTDIR="$DESTDIR" make install diff --git a/strata/apache-httpd-server/apr.morph b/strata/apache-httpd-server/apr.morph new file mode 100644 index 00000000..4c09b98c --- /dev/null +++ b/strata/apache-httpd-server/apr.morph @@ -0,0 +1,20 @@ +name: apr +kind: chunk +configure-commands: +- ./buildconf +- | + ./configure --prefix="$PREFIX" \ + --disable-static \ + --with-installbuilddir="$PREFIX"/share/apr-1/build +build-commands: +- make +install-commands: +- PREFIX="$PREFIX" DESTDIR="$DESTDIR" make install +# Install files required for apr-util and httpd +- | + for file in find_apr.m4 apr_common.m4 install.sh gen-build.py get-version.sh \ + config.guess config.sub; do \ + cp build/$file "$DESTDIR$PREFIX"/share/apr-1/build/$file ; \ + done +# Create a symlink in the build directory to the include directory +- ln -sf /usr/include/apr-2 "$DESTDIR$PREFIX"/share/apr-1/build/ diff --git a/strata/apache-httpd-server/httpd-server.morph b/strata/apache-httpd-server/httpd-server.morph new file mode 100644 index 00000000..901ea31a --- /dev/null +++ b/strata/apache-httpd-server/httpd-server.morph @@ -0,0 +1,34 @@ +name: httpd-server +kind: chunk +configure-commands: +- ./buildconf --with-apr=/usr/share/apr-1 +- | + ./configure --prefix="$PREFIX" \ + --enable-authnz-fcgi \ + --enable-mods-shared=all \ + --enable-mpms-shared=all \ + --enable-suexec=shared \ + --with-apr=/usr/bin/apr-2-config \ + --with-apr-util=/usr/bin/apu-1-config \ + --with-suexec-bin=/usr/lib/httpd/suexec \ + --with-suexec-caller=apache \ + --with-suexec-docroot=/srv/www \ + --with-suexec-logfile=/var/log/httpd/suexec.log \ + --with-suexec-uidmin=100 \ + --with-suexec-userdir=public_html +build-commands: +- make +install-commands: +- PREFIX="$PREFIX" DESTDIR="$DESTDIR" make install +system-integration: + httpd-server-misc: + 01-adduser: + - groupadd -g 25 apache + - | + useradd -c "Apache Server" -d /srv/www -g apache \ + -s /bin/false -u 25 apache + 02-configure-httpd-server: + - mv -v /usr/sbin/suexec /usr/lib/httpd/suexec + - chgrp apache /usr/lib/httpd/suexec + - chmod 4754 /usr/lib/httpd/suexec + - chown -v -R apache:apache /srv/www |