Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. # Contributor: Nikolay Amiantov <nikoamia@gmail.com>
  2. # Original package contributors:
  3. # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
  4. # Contributor: Sébastien Luttringer
  5. # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
  6. # Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
  7.  
  8. _pkgname=nginx
  9. _pamname=ngx_http_auth_pam_module
  10. _pamver=1.3
  11. pkgname=$_pkgname-pam
  12. pkgver=1.4.5
  13. pkgrel=1
  14. pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, built with auth_pam support'
  15. arch=('i686' 'x86_64')
  16. url='http://nginx.org'
  17. license=('custom')
  18. depends=('pcre' 'zlib' 'openssl')
  19. backup=('etc/nginx/fastcgi.conf'
  20. 'etc/nginx/fastcgi_params'
  21. 'etc/nginx/koi-win'
  22. 'etc/nginx/koi-utf'
  23. 'etc/nginx/mime.types'
  24. 'etc/nginx/nginx.conf'
  25. 'etc/nginx/scgi_params'
  26. 'etc/nginx/uwsgi_params'
  27. 'etc/nginx/win-utf'
  28. 'etc/logrotate.d/nginx')
  29. conflicts=($_pkgname)
  30. provides=($_pkgname)
  31. install=nginx.install
  32. source=($url/download/nginx-$pkgver.tar.gz
  33. http://web.iti.upv.es/~sto/nginx/$_pamname-$_pamver.tar.gz
  34. service
  35. logrotate)
  36.  
  37. build() {
  38. cd $_pkgname-$pkgver
  39. ./configure \
  40. --prefix=/etc/nginx \
  41. --conf-path=/etc/nginx/nginx.conf \
  42. --sbin-path=/usr/bin/nginx \
  43. --pid-path=/run/nginx.pid \
  44. --lock-path=/run/lock/nginx.lock \
  45. --user=http \
  46. --group=http \
  47. --http-log-path=/var/log/nginx/access.log \
  48. --error-log-path=stderr \
  49. --http-client-body-temp-path=/var/lib/nginx/client-body \
  50. --http-proxy-temp-path=/var/lib/nginx/proxy \
  51. --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
  52. --http-scgi-temp-path=/var/lib/nginx/scgi \
  53. --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
  54. --with-imap \
  55. --with-imap_ssl_module \
  56. --with-ipv6 \
  57. --with-pcre-jit \
  58. --with-file-aio \
  59. --with-http_dav_module \
  60. --with-http_gunzip_module \
  61. --with-http_gzip_static_module \
  62. --with-http_realip_module \
  63. --with-http_spdy_module \
  64. --with-http_ssl_module \
  65. --with-http_stub_status_module \
  66. --with-http_addition_module \
  67. --with-http_degradation_module \
  68. --with-http_flv_module \
  69. --with-http_mp4_module \
  70. --with-http_secure_link_module \
  71. --with-http_sub_module \
  72. --add-module="$srcdir/$_pamname-$_pamver"
  73.  
  74. make
  75. }
  76.  
  77. package() {
  78. cd $_pkgname-$pkgver
  79. make DESTDIR="$pkgdir" install
  80.  
  81. sed -e 's|\<user\s\+\w\+;|user html;|g' \
  82. -e '44s|html|/usr/share/nginx/html|' \
  83. -e '54s|html|/usr/share/nginx/html|' \
  84. -i "$pkgdir"/etc/nginx/nginx.conf
  85.  
  86. rm "$pkgdir"/etc/nginx/*.default
  87.  
  88. install -d "$pkgdir"/var/lib/nginx
  89. install -dm700 "$pkgdir"/var/lib/nginx/proxy
  90.  
  91. chmod 750 "$pkgdir"/var/log/nginx
  92. chown http:log "$pkgdir"/var/log/nginx
  93.  
  94. install -d "$pkgdir"/usr/share/nginx
  95. mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
  96.  
  97. install -Dm644 ../logrotate "$pkgdir"/etc/logrotate.d/nginx
  98. install -Dm644 ../service "$pkgdir"/usr/lib/systemd/system/nginx.service
  99. install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
  100.  
  101. rmdir "$pkgdir/run"
  102. }
  103.  
  104. # vim:set ts=2 sw=2 et:
  105.  
  106. sha256sums=('ade9024356a8f2b0679ea50e477b2585d46f43aa695cbe8ace9d65f457e0077e'
  107. '199dff5d11fbb3b6ddf9c8a60cc141970125a3f8e7a06f245e3175e93ca947e3'
  108. '05fdc0c0483410944b988d7f4beabb00bec4a44a41bd13ebc9b78585da7d3f9b'
  109. '272907d3213d69dac3bd6024d6d150caa23cb67d4f121e4171f34ba5581f9e98')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement