PKGBUILDs/community/apache13/PKGBUILD
2009-10-09 21:15:33 -05:00

116 lines
3.7 KiB
Bash

# $Id: PKGBUILD 3122 2009-09-28 08:40:20Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=apache13
pkgver=1.3.41
_modsslver=2.8.31-1.3.41
pkgrel=4
pkgdesc="apache web server with mod_ssl $_modsslver"
arch=(i686 x86_64)
url="http://httpd.apache.org/"
license=("GPL")
depends=(expat openssl db)
#
# ###############################################
_wwwroot=srv/www/$pkgname
_modules=(access actions alias asis auth auth_anon auth_db auth_dbm auth_digest autoindex cern_meta cgi define digest dir \
env expires headers imap include info log_agent log_config log_forensic log_referer mime mime_magic \
mmap_static negotiation proxy rewrite setenvif so speling ssl status unique_id userdir usertrack vhost_alias)
_modules_so=(actions asis auth_anon auth_db auth_dbm auth_digest autoindex cern_meta cgi digest \
expires imap info log_agent log_forensic log_referer mime mime_magic \
mmap_static negotiation proxy rewrite speling ssl status unique_id userdir usertrack vhost_alias)
_httpdgroup=httpd
_httpduser=httpd
# ###############################################
#
backup=(etc/apache13/httpd.conf \
$_wwwroot/html/index.html \
etc/conf.d/httpd \
etc/apache13/access.conf \
etc/apache13/srm.conf)
install=apache13.install
source=(http://apache.rinet.ru/dist/httpd/apache_$pkgver.tar.gz \
http://www.modssl.org/source/mod_ssl-$_modsslver.tar.gz \
httpd.conf.d \
httpd
httpd-1.3-getline.patch)
md5sums=('f7f00b635243f03a787ca9f4d4c85651'
'4d55fc5c7cbf38820b44edf767f571c4'
'62dba8077401cb5515ecb79fe29c2a52'
'd1ef3cfb1ef44cf280f05609b08e856c'
'cb760e24244a631f8595efc788b83058')
build() {
cd $startdir/src/mod_ssl-$_modsslver
./configure --prefix=/usr --with-apache=$startdir/src/apache_$pkgver
cd $startdir/src/apache_$pkgver
_config=""
for _mod in ${_modules[@]}; do
_config="$_config --enable-module=$_mod"
done
for _mod in ${_modules_so[@]}; do
_config="$_config --enable-shared=$_mod"
done
./configure --prefix=/usr \
--sysconfdir=/etc/$pkgname/ \
--cgidir=/$_wwwroot/cgi-bin \
--htdocsdir=/$_wwwroot/htdocs \
--iconsdir=/$_wwwroot/icons \
--logfiledir=/var/log/$pkgname \
--mandir=/usr/share/man \
--proxycachedir=/var/cache/$pkgname \
--libexecdir=/usr/lib/$pkgname \
--runtimedir=/var/run/$pkgname \
--server-gid=$_httpduser --server-uid=$_httpdgroup \
--bindir=/usr/bin --sbindir=/usr/sbin \
$_config
patch -p1 <$srcdir/httpd-1.3-getline.patch
make || return 1
make root=$startdir/pkg install
install -D -m644 ../httpd.conf.d $startdir/pkg/etc/conf.d/apache13
install -D -m755 ../httpd $startdir/pkg/etc/rc.d/apache13
sed -i 's|HTTPD=/usr/sbin/httpd|HTTPD=/usr/sbin/httpd13|' $startdir/pkg/usr/sbin/apachectl
sed -i 's|AddModule mod_auth_dbm.c|#AddModule mod_auth_dbm.c|' $startdir/pkg/etc/apache13/httpd.conf
sed -i 's|LoadModule dbm_auth_module lib/apache13/mod_auth_dbm.so|#LoadModule dbm_auth_module lib/apache13/mod_auth_dbm.so|' $startdir/pkg/etc/apache13/httpd.conf
rm -f $startdir/pkg/usr/include/fnmatch.h
cd $startdir/pkg/etc/apache13
rm -f ./ssl.crt/*.0
rm -f ./ssl.crt/*.crt
rm -f ./ssl.csr/*.csr
rm -f ./ssl.key/*.key
rm -f ./ssl.prm/*.prm
cd $startdir/pkg/usr/share/man/man1/
mv dbmmanage.1 dbmmanage13.1
mv htdigest.1 htdigest13.1
mv htpasswd.1 htpasswd13.1
cd $startdir/pkg/usr/share/man/man8/
mv ab.8 ab13.8
mv apachectl.8 apachectl13.8
mv apxs.8 apxs13.8
mv httpd.8 httpd13.8
mv logresolve.8 logresolve13.8
mv rotatelogs.8 rotatelogs13.8
cd $startdir/pkg/usr/sbin/
mv ab ab13
mv apachectl apachectl13
mv apxs apxs13
mv httpd httpd13
mv logresolve logresolve13
mv rotatelogs rotatelogs13
}