This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!

apache-2.2.22-4-PKGBUILD

By: alinef on Jul 16th, 2012  |  syntax: None  |  size: 6.04 KB  |  views: 39  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # $Id: PKGBUILD 161295 2012-06-08 23:50:11Z heftig $
  2. # Maintainer: Jan de Groot <jgc@archlinux.org>
  3. # Contributor: Andrea Scarpino <andrea@archlinux.org>
  4. # Contributor: Pierre Schmitz <pierre@archlinux.de>
  5.  
  6. pkgname=apache
  7. pkgver=2.2.22
  8. pkgrel=4
  9. pkgdesc='A high performance Unix-based HTTP server'
  10. arch=('i686' 'x86_64')
  11. options=('!libtool')
  12. url='http://www.apache.org/dist/httpd'
  13. license=('APACHE')
  14. backup=(etc/conf.d/apache etc/httpd/conf/httpd.conf
  15.         etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
  16.         etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
  17.         etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
  18.         etc/logrotate.d/httpd)
  19. depends=('openssl' 'zlib' 'apr-util' 'pcre')
  20. optdepends=('lynx: apachectl status')
  21. install=apache.install
  22. _itkurl=http://distfiles.alpinelinux.org/distfiles/
  23. source=(http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2
  24.         http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2.asc
  25.         ${_itkurl}/02-rename-prefork-to-itk.patch
  26.         ${_itkurl}/03-add-mpm-to-build-system.patch
  27.         ${_itkurl}/04-correct-output-makefile-location.patch
  28.         ${_itkurl}/05-add-copyright.patch
  29.         ${_itkurl}/06-hook-just-after-merging-perdir-config.patch
  30.         ${_itkurl}/07-base-functionality.patch
  31.         ${_itkurl}/08-max-clients-per-vhost.patch
  32.         ${_itkurl}/09-capabilities.patch
  33.         ${_itkurl}/10-nice.patch
  34.         ${_itkurl}/11-fix-htaccess-reads-for-persistent-connections.patch
  35.         apachectl-confd.patch
  36.         apache.conf.d
  37.         apache.tmpfiles.conf
  38.         httpd.logrotate
  39.         httpd
  40.         arch.layout
  41.         pcre_info.patch)
  42. md5sums=('9fe3093194c8a57f085ff7c3fc43715f'
  43.          '41b3a6e4948679cab70b9caf490877c4'
  44.          'f1d9d41360908ceb2374da55ae99197a'
  45.          '131408ad4dc7b18547b4e062e7e495ab'
  46.          '0930d2d0612eb0a53a0d00aea7e8687f'
  47.          '3a0c29bb91442c33ea73ebbe072af922'
  48.          '0ef4729a6f1ffc848ad0e9b440a66f66'
  49.          '940944caa948340b11ddae56adaef89b'
  50.          'ce09a987523884de8838f73dc8ec0d19'
  51.          'e75b7dd8d8afcd299ba4ab2ab81c11e4'
  52.          'ce1ccc21f3ad8625169c8f62913450ac'
  53.          '1e5b222edcfbf99a3edc56fcb2074fbe'
  54.          '4ac64df6e019edbe137017cba1ff2f51'
  55.          '08b3c875f6260644f2f52b4056d656b0'
  56.          '82068753dab92fe86312b1010a2904d7'
  57.          '6382331e9700ed9e8cc78ea51887b537'
  58.          'c7e300a287ef7e2e066ac7639536f87e'
  59.          '3d659d41276ba3bfcb20c231eb254e0c'
  60.          'fde5121e32b5aeef5a7eedb5a97009ff')
  61.  
  62. build() {
  63.         cd "${srcdir}/httpd-${pkgver}"
  64.  
  65.         patch -p1 -i "${srcdir}/pcre_info.patch"
  66.         patch -Np0 -i "${srcdir}/apachectl-confd.patch"
  67.  
  68.         # set default user
  69.         sed -e 's#User daemon#User http#' \
  70.             -e 's#Group daemon#Group http#' \
  71.             -i docs/conf/httpd.conf.in
  72.  
  73.         cat "${srcdir}/arch.layout" >> config.layout
  74.  
  75.         for mpm in prefork worker itk; do
  76.                 if [ "${mpm}" = "itk" ]; then
  77.                         # Fix patch to apply with latest Apache version
  78.                         sed -i -e 's/mpmt_os2}/mpmt_os2|winnt}/g' "${srcdir}/03-add-mpm-to-build-system.patch"
  79.  
  80.                         mkdir -p server/mpm/experimental/itk
  81.                         cp -r server/mpm/prefork/* server/mpm/experimental/itk/
  82.                         mv server/mpm/experimental/itk/prefork.c server/mpm/experimental/itk/itk.c
  83.  
  84.                         patch -Np1 -i "${srcdir}/02-rename-prefork-to-itk.patch"
  85.                         patch -Np1 -i "${srcdir}/03-add-mpm-to-build-system.patch"
  86.                         patch -Np1 -i "${srcdir}/04-correct-output-makefile-location.patch"
  87.                         patch -Np1 -i "${srcdir}/05-add-copyright.patch"
  88.                         patch -Np1 -i "${srcdir}/06-hook-just-after-merging-perdir-config.patch"
  89.                         patch -Np1 -i "${srcdir}/07-base-functionality.patch"
  90.                         patch -Np1 -i "${srcdir}/08-max-clients-per-vhost.patch"
  91.                         patch -Np1 -i "${srcdir}/09-capabilities.patch"
  92.                         patch -Np1 -i "${srcdir}/10-nice.patch"
  93.                         patch -Np1 -i "${srcdir}/11-fix-htaccess-reads-for-persistent-connections.patch"
  94.  
  95.                         autoconf
  96.                 fi
  97.                 mkdir build-${mpm}
  98.                 pushd build-${mpm}
  99.                 ../configure --enable-layout=Arch \
  100.                         --enable-modules=all \
  101.                         --enable-mods-shared=all \
  102.                         --enable-so \
  103.                         --enable-suexec \
  104.                         --with-suexec-caller=http \
  105.                         --with-suexec-docroot=/srv/http \
  106.                         --with-suexec-logfile=/var/log/httpd/suexec.log \
  107.                         --with-suexec-bin=/usr/sbin/suexec \
  108.                         --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
  109.                         --enable-ldap --enable-authnz-ldap \
  110.                         --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
  111.                         --enable-ssl --with-ssl \
  112.                         --enable-deflate --enable-cgid \
  113.                         --enable-proxy --enable-proxy-connect \
  114.                         --enable-proxy-http --enable-proxy-ftp \
  115.                         --enable-dbd \
  116.                         --with-apr=/usr/bin/apr-1-config \
  117.                         --with-apr-util=/usr/bin/apu-1-config \
  118.                         --with-pcre=/usr \
  119.                         --with-mpm=${mpm}
  120.                 make
  121.                 if [ "${mpm}" = "prefork" ]; then
  122.                         make DESTDIR="${pkgdir}" install
  123.                 else
  124.                         install -m755 httpd "${pkgdir}/usr/sbin/httpd.${mpm}"
  125.                 fi
  126.                 popd
  127.         done
  128.  
  129.         install -D -m755 "${srcdir}/httpd" "${pkgdir}/etc/rc.d/httpd"
  130.         install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
  131.         install -D -m644 "${srcdir}/apache.conf.d" "${pkgdir}/etc/conf.d/apache"
  132.         install -D -m644 "${srcdir}/apache.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/apache.conf"
  133.  
  134.         # symlinks for /etc/httpd
  135.         ln -fs /var/log/httpd "${pkgdir}/etc/httpd/logs"
  136.         ln -fs /var/run/httpd "${pkgdir}/etc/httpd/run"
  137.         ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
  138.         ln -fs /usr/lib/httpd/build "${pkgdir}/etc/httpd/build"
  139.  
  140.         # set sane defaults
  141.         sed -e 's#/usr/lib/httpd/modules/#modules/#' \
  142.             -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
  143.             -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
  144.             -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
  145.             -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
  146.             -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
  147.             -i "${pkgdir}/etc/httpd/conf/httpd.conf"
  148.  
  149.         # cleanup
  150.         rm -rf "${pkgdir}/usr/share/httpd/manual"
  151.         rm -rf "${pkgdir}/etc/httpd/conf/original"
  152.         rm -rf "${pkgdir}/srv/"
  153.         rm -rf "${pkgdir}/usr/bin"
  154.         rm -rf "${pkgdir}/var/run"
  155. }
clone this paste RAW Paste Data