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

modsecurity archlinux pkgbuild

By: a guest on Oct 25th, 2012  |  syntax: None  |  size: 2.46 KB  |  views: 42  |  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. # Maintainer: richiefrich <richiefrich AT penguinslair DOT org>
  2. # Contributor: CRT <crt.011 AT gmail.com>
  3. # Contributor: chiche <laguaza AT gmail.com>
  4.  
  5. pkgname=modsecurity-apache
  6. pkgver=2.7.0
  7. _pkgname=modsecurity-crs
  8. _pkgver=2.2.5
  9. pkgrel=1
  10. pkgdesc="An open source web application firewall that runs as an Apache module.\
  11.         Core Rule Set which provides critical protections against attacks across most every web architecture."
  12. url="http://www.modsecurity.org \
  13.         http://www.modsecurity.org/projects/rules/"
  14. arch=('i686' 'x86_64')
  15. license=('GPLv2')
  16. depends=('apache>=2.0' 'apr' 'apr-util' 'pcre' 'libxml2')
  17. optdepends=('lua>=5.1' 'curl>=7.15.1')
  18. makedepends=('curl>=7.15.1' 'rsync')
  19. #backup=('/etc/httpd/conf/mod_security.conf' '/etc/httpd/conf/httpd.conf')
  20. source=(http://downloads.sourceforge.net/sourceforge/mod-security/${pkgname}/${pkgname}_${pkgver}.tar.gz
  21.         http://voxel.dl.sourceforge.net/project/mod-security/${_pkgname}/0-CURRENT/${_pkgname}_${_pkgver}.tar.gz
  22.         mod_security.conf modsecurity-crs.install makefile.patch)
  23. install='modsecurity-crs.install'
  24.  
  25. md5sums=('8e608bdc01a619219f35c6125f1d9860'
  26.          'aaeaa1124e8efc39eeb064fb47cfc0aa'
  27.          '84c4447c1e233974df74c9b64d27391f'
  28.          '0d8fda0b1869b74125e3b667570bd6a3'
  29.          'cc0ebb8d75cf0595b69c89dcb462ac0c')
  30.  
  31. build() {
  32.    cd ${srcdir}/${pkgname}_${pkgver}
  33.  
  34.    patch -p1 < ${srcdir}/makefile.patch
  35.  
  36.    ./configure --prefix=/usr --sysconfdir=/etc --with-apxs=/usr/sbin/apxs
  37.    make || return 1
  38.    make mlogc || return 1
  39.    make DESTDIR=$startdir/pkg install || return 1
  40. }
  41.  
  42.  
  43. package() {
  44.   cd ${srcdir}/${pkgname}_${pkgver}
  45.   install -D -dm755 ${pkgdir}/etc/httpd/conf/crs/{base_rules,optional_rules,activated_rules,experimental_rules}
  46.   install -m644 ${srcdir}/mod_security.conf ${pkgdir}/etc/httpd/conf
  47.  
  48.   #install -D -dm755 ${pkgdir}/usr/lib/httpd/modules
  49.   #mv -v ${pkgdir}/usr/lib/mod_security2.so ${pkgdir}/usr/lib/httpd/modules/mod_security2.so
  50.  
  51.   install -D -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
  52.   install -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  53.  
  54.   cd ${srcdir}/${_pkgname}_${_pkgver}
  55.   install -D -m644 modsecurity_crs_10_setup.conf.example ${pkgdir}/etc/httpd/conf/crs/modsecurity_crs_10_setup.conf
  56.   rsync -aP base_rules/ ${pkgdir}/etc/httpd/conf/crs/base_rules
  57.   rsync -aP experimental_rules/ ${pkgdir}/etc/httpd/conf/crs/experimental_rules
  58.   rsync -aP optional_rules/ ${pkgdir}/etc/httpd/conf/crs/optional_rules
  59.  
  60. }
clone this paste RAW Paste Data