talimat 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Description: Guvenli ve gelişmiş bir webserver
  2. # URL: https://www.hiawatha-webserver.org/
  3. # Packager: milisarge
  4. # Depends on : cmake libxslt mbedtls
  5. name=hiawatha
  6. version=10.3
  7. release=1
  8. source=(https://www.hiawatha-webserver.org/files/$name-$version.tar.gz
  9. hiawatha.conf.sample)
  10. build() {
  11. cd "$name-$version"
  12. sed -i 's/www-data/http/g' extra/logrotate.in
  13. mkdir -p build
  14. cd build
  15. cmake ../ -DCMAKE_INSTALL_PREFIX="/" \
  16. -DCMAKE_INSTALL_BINDIR="/usr/bin" \
  17. -DCMAKE_INSTALL_SBINDIR="/usr/bin" \
  18. -DCMAKE_INSTALL_SYSCONFDIR="/etc/hiawatha" \
  19. -DCMAKE_INSTALL_LIBDIR="/usr/lib" \
  20. -DCMAKE_INSTALL_MANDIR="/usr/share/man" \
  21. -DCONFIG_DIR="/etc/hiawatha" \
  22. -DLOG_DIR="/var/log/hiawatha" \
  23. -DPID_DIR="/run" \
  24. -DENABLE_TLS=ON \
  25. -DUSE_SYSTEM_MBEDTLS=ON \
  26. -DENABLE_MONITOR=ON \
  27. -DWEBROOT_DIR="/srv/http/hiawatha" \
  28. -DWORK_DIR="/var/lib/hiawatha"
  29. make
  30. # Features enabled by default
  31. # -DENABLE_CACHE
  32. # -DENABLE_IPV6
  33. # -DENABLE_RPROXY
  34. # -DENABLE_TOOLKIT
  35. # -DENABLE_XSLT
  36. # Features disabled by default
  37. # -DENABLE_DEBUG
  38. # -DENABLE_TOMAHAWK
  39. make DESTDIR="$PKG/" install
  40. rmdir "$PKG/run"
  41. rm "$PKG/srv/http/hiawatha/index.html"
  42. rmdir -p --ignore-fail-on-non-empty "$PKG/srv/http/hiawatha"
  43. # Update stock hiawatha.conf
  44. sed -e 's|#ServerId = www-data|ServerId = http|' \
  45. -e 's|/var/www/|/srv/http/|g' \
  46. -e 's|//|/|g' \
  47. -e 's|#CGIextension = cgi|&\n#TriggerOnCGIstatus = no|g' \
  48. -e 's|ConnectTo = 127.0.0.1:2005|ConnectTo = 127.0.0.1:9000|g' \
  49. -e 's|# Extension = php|&\n# SessionTimeout = 30|g' \
  50. -e 's|#ErrorHandler = 404:/error.cgi|&\n#UseGZfile = yes|g' \
  51. -i "$PKG/etc/hiawatha/hiawatha.conf"
  52. install -Dm644 logrotate.d/hiawatha "$PKG/etc/logrotate.d/hiawatha"
  53. install -Dm644 $SRC/"hiawatha.conf.sample" "$PKG/etc/hiawatha/"
  54. }