Advertisement
ASMProgrammer

Nginx Makefile Script

Jun 15th, 2023
799
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Filemaker 0.99 KB | Software | 0 0
  1. NGINX_VERSION=1.6.0
  2. NSSM_VERSION=2.22
  3.  
  4. NGINX_LINK=http://nginx.org/download/nginx-$(NGINX_VERSION).zip
  5. NGINX_PKG=nginx-$(NGINX_VERSION)
  6.  
  7. NSSM_LINK=http://nssm.cc/download/nssm-$(NSSM_VERSION).zip
  8. NSSM_PKG=nssm-$(NSSM_VERSION)
  9.  
  10. BIN= build/nginx-service.exe
  11.  
  12. .PHONY: clean all $(BIN)
  13.  
  14. $(BIN): deps/$(NGINX_PKG)/* deps/$(NSSM_PKG)/*
  15.     cp -r deps/$(NGINX_PKG)/* tmp/
  16.     cp deps/$(NSSM_PKG)/win32/nssm.exe tmp/nssm.exe
  17.     cp -r src/*  tmp/
  18.     mv tmp/conf/nginx.conf tmp/conf/nginx.conf.orig
  19.     cp -r add-on/* tmp/
  20.     cd tmp && makensis nginx.nsi
  21.     mv tmp/nginx-service.exe build/nginx-service.exe
  22.  
  23. deps/$(NGINX_PKG)/*: deps/$(NGINX_PKG).zip
  24.     rm -rf deps/$(NGINX_PKG)/
  25.     unzip deps/$(NGINX_PKG).zip -d deps/
  26.  
  27. deps/$(NSSM_PKG)/*: deps/$(NSSM_PKG).zip
  28.     rm -rf deps/$(NSSM_PKG)/
  29.     unzip deps/$(NSSM_PKG).zip -d deps/
  30.  
  31. deps/$(NGINX_PKG).zip:
  32.     cd deps && wget $(NGINX_LINK)
  33.  
  34. deps/$(NSSM_PKG).zip:
  35.     cd deps && wget $(NSSM_LINK)
  36.  
  37. clean:
  38.     rm -rf deps/*
  39.     rm -rf build/*
  40.     rm -rf tmp/*
  41.  
  42. all: clean $(BIN)
Advertisement
Comments
  • ASMProgrammer
    1 year
    # text 0.21 KB | 0 0
    1. for create nginx makefile script
    2. 1) Copy script Ctrl+A and Ctrl+C
    3. 2) Create text document, press Ctrl+A
    4. 3) Rename file New Text Document.txt to Makefile
    5. 4) Export nginx makefile script to Makefile in buttons Ctrl+V
  • ASMProgrammer
    1 year
    # text 0.12 KB | 0 0
    1. Also, if you find errors or shortcomings in my scripts, tell me in the comments and you can ask me questions in the comments
Add Comment
Please, Sign In to add comment
Advertisement