OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../tengine/tengine.conf
  5. # Copyright (C) 2011 - 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. if [ $prefix_auto = 1 ]; then
  15. # use a dedicated sysconfdir
  16. sysconfdir="$sysconfdir/$pkg"
  17. fi
  18. cleanconfopt=0
  19. confopt="--prefix=/$prefix"
  20. [[ "$sysconfdir" = */$pkg ]] || sysconfdir=$sysconfdir/$pkg
  21. var_append confopt ' ' "--conf-path=$sysconfdir/tengine.conf"
  22. # set binary name to tengine instead of nginx
  23. var_append confopt ' ' "--sbin-path=$sbindir/tengine"
  24. # set path to nginx.pid file
  25. var_append confopt ' ' "--pid-path=$localstatedir/run/tengine.pid"
  26. # set path to nginx.lock file
  27. var_append confopt ' ' "--lock-path=$localstatedir/lock/tengine.lock"
  28. # set temporary paths and files
  29. for x in proxy fastcgi uwsgi client-body; do
  30. var_append confopt ' ' "--http-$x-temp-path=$localstatedir/temp/${x//-/_}_temp"
  31. done
  32. # log directories
  33. logdir="$localstatedir/log/$pkg"
  34. var_append confopt ' ' "--http-log-path=$logdir/access.log"
  35. var_append confopt ' ' "--error-log-path=$logdir/error.log"
  36. # --with- with dependency
  37. for x in openssl:ssl zlib:gzip_static; do
  38. if pkginstalled "${x%:*}"; then
  39. var_append confopt ' ' "--with-http_${x#*:}_module"
  40. fi
  41. done
  42. # --without- because of dependency
  43. for x in pcre:http_rewrite_module openssl:http-cache uwsgi:http_uwsgi_module; do
  44. if ! pkginstalled "${x%:*}"; then
  45. var_append confopt ' ' "--without-${x#*:}"
  46. fi
  47. done
  48. # --with- without dependency
  49. for x in stub_status flv realip sysguard; do
  50. var_append confopt ' ' "--with-http_${x}_module"
  51. done
  52. # image_filter
  53. has_all=yes
  54. for x in libgd libjpeg libpng; do
  55. if ! pkginstalled "$x"; then
  56. has_all=no
  57. break
  58. fi
  59. done
  60. if [ "$has_all" = "yes" ]; then
  61. var_append confopt ' ' "--with-http_image_filter_module"
  62. fi
  63. unset has_all
  64. if atstage cross; then
  65. var_append configprefix ' ' 'cross_compiling=yes'
  66. for x in int long long_long char_p:void_p int:sig_atomic_t int:size_t int:off_t int:time_t; do
  67. y=$(eval echo "\$arch_sizeof_${x%:*}")
  68. var_append configprefix ' ' "ngx_cache_sizeof_${x#*:}=$y"
  69. done
  70. fi
  71. var_append CC_WRAPPER_REMOVE " " "-Werror"
  72. var_append INSTALL_WRAPPER_FILTER "|" "sed 's,nginx.conf.default,tengine.conf.default,'"
  73. #
  74. # 3rd party addon modules
  75. #
  76. # generic function to add a 3rd party addon module
  77. # function parameters:
  78. # $1: pattern of the modules source file name
  79. #
  80. pkg_tengine_add_module() {
  81. mkdir -p $builddir/addon-module/$1
  82. tar -v $taropt $( match_source_file -p $1 nginx ) --strip-components=1 -C $builddir/addon-module/$1
  83. var_append confopt ' ' "--add-module=../addon-module/$1"
  84. }
  85. # rrd graph module
  86. if [ "$SDECFG_PKG_TENGINE_ADDON_MOD_RRDGRAPH" == 1 ] ; then
  87. pkgprefix -t rrdtool
  88. hook_add preconf 5 "pkg_tengine_add_module mod_rrd_graph"
  89. fi
  90. if [ "$SDECFG_PKG_TENGINE_ADDON_MOD_UPLOAD" == 1 ] ; then
  91. hook_add preconf 5 "pkg_tengine_add_module nginx_upload_module"
  92. fi
  93. if [ "$SDECFG_PKG_TENGINE_ADDON_MOD_HTTPECHO" == 1 ] ; then
  94. hook_add preconf 5 "pkg_tengine_add_module echo-nginx-module"
  95. fi