Advertisement
Guest User

Untitled

a guest
Feb 18th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.77 KB | None | 0 0
  1. # Contributor: Doug Newgard <scimmia22 at outlook dot com>
  2. # Contributor: Fernando Jiménez Solano <fjim@sdfeu.org>
  3. # Contributor: Evangelos Foutras <evangelos@foutrelis.com>
  4. # Contributor: Link Dupont <link@subpop.net>
  5. # Contributor: Pierre Bourdin <pierre@pi3rrot.net>
  6. # Contributor: Alexander von Gluck IV <kallisti5@unixzen.com>
  7. # Contributor: dieghen89 <dieghen89 at gmail dot com>
  8.  
  9. pkgname=cherokee-git
  10. pkgver=v1.2.103.r905.gfbda667
  11. pkgrel=1
  12. pkgdesc="A very fast, flexible and easy to configure Web Server"
  13. arch=('i686' 'x86_64')
  14. url="http://www.cherokee-project.com/"
  15. license=('GPL2')
  16. depends=('openssl' 'pcre' 'python2')
  17. makedepends=('python2' 'gettext' 'libldap' 'pam' 'libmysqlclient'
  18.              'ffmpeg' 'geoip')
  19. optdepends=('libldap: ldap validator'
  20.             'pam: pam validator'
  21.             'libmysqlclient: mysql validator'
  22.             'ffmpeg: Audio/Video streaming handler'
  23.             'geoip: GeoIP rule module'
  24.             'rrdtool: RRDtool based information collector')
  25. backup=('etc/cherokee/cherokee.conf'
  26.         'etc/logrotate.d/cherokee'
  27.         'etc/pam.d/cherokee')
  28. options=('!libtool')
  29. provides=('cherokee')
  30. conflicts=('cherokee')
  31. source=("$pkgname::git+https://github.com/cherokee/webserver.git"
  32.         "cherokee.rc"
  33.         "cherokee.logrotate"
  34.         "cherokee.service")
  35. sha256sums=('SKIP'
  36.             '4c06cebfab8b68edd4967c020bfb41b077cfff10d76596d1ed192d0b6cedbd86'
  37.             '20e26d633f8c1cd90eb21f41dd163b73a83846e405b1ce995e072c4efefc522e'
  38.             '415a2e4cd7d04afe21e502dd0ad76301f85a7087cadbfdab5566bec469679a68')
  39.  
  40. pkgver() {
  41.   cd "$srcdir/$pkgname"
  42.   git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
  43. }
  44.  
  45. build() {
  46.   cd "$srcdir/$pkgname"
  47.  
  48.   sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre
  49.  
  50.   ./autogen.sh \
  51.     --prefix=/usr \
  52.     --sysconfdir=/etc \
  53.     --localstatedir=/var \
  54.     --disable-static \
  55.     --with-wwwroot=/srv/http \
  56.     --with-wwwuser=http \
  57.     --with-wwwgroup=http \
  58.     --with-python=python2 \
  59.     --enable-os-string="Arch Linux"
  60.  
  61.   make
  62. }
  63.  
  64. package() {
  65.   cd "$srcdir/$pkgname"
  66.  
  67.   make DESTDIR="$pkgdir/" install
  68.  
  69.   # PAM configuration file for cherokee
  70.   install -D -m644 pam.d_cherokee "$pkgdir/etc/pam.d/cherokee"
  71.  
  72.   # Fix ownership of /var/lib/cherokee/graphs
  73.   chown -R http:http "$pkgdir/var/lib/cherokee/graphs"
  74.  
  75.   # Compile Python scripts
  76.   python2 -m compileall "$pkgdir"
  77.   python2 -O -m compileall "$pkgdir"
  78.  
  79.   install -d -o http -g http "$pkgdir/var/log/ckerokee"
  80.   install -D "$srcdir/cherokee.rc" "$pkgdir/etc/rc.d/cherokee"
  81.   install -Dm644 "$srcdir/cherokee.logrotate" "$pkgdir/etc/logrotate.d/cherokee"
  82.   install -Dm644 "$srcdir/cherokee.service" "$pkgdir/usr/lib/systemd/system/cherokee.service"
  83.  
  84.   # Cleanup
  85.   rm -rf "$pkgdir/srv"
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement