python-web2py.mk 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ################################################################################
  2. #
  3. # python-web2py
  4. #
  5. ################################################################################
  6. PYTHON_WEB2PY_VERSION = R-2.14.6
  7. PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,$(PYTHON_WEB2PY_VERSION))
  8. PYTHON_WEB2PY_LICENSE = LGPL-3.0
  9. PYTHON_WEB2PY_LICENSE_FILES = LICENSE
  10. PYTHON_WEB2PY_DEPENDENCIES = python python-pydal host-python-pydal
  11. PYTHON_WEB2PY_EXCLUSIONS = \
  12. welcome.w2p \
  13. applications/examples \
  14. applications/welcome \
  15. deposit \
  16. docs \
  17. examples \
  18. extras \
  19. handlers \
  20. scripts \
  21. ABOUT \
  22. anyserver.py \
  23. CHANGELOG \
  24. Makefile \
  25. MANIFEST.in \
  26. README.markdown \
  27. setup.py \
  28. tox.ini
  29. define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
  30. $(HOST_DIR)/bin/python2 -c 'import os; \
  31. os.chdir("$(@D)"); \
  32. from gluon.main import save_password; \
  33. save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),8000)'
  34. mkdir -p $(TARGET_DIR)/var/www/web2py
  35. rsync -a $(@D)/ $(TARGET_DIR)/var/www/web2py/ \
  36. $(addprefix --exclude=,$(PYTHON_WEB2PY_EXCLUSIONS))
  37. endef
  38. define PYTHON_WEB2PY_INSTALL_INIT_SYSV
  39. $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
  40. $(TARGET_DIR)/etc/init.d/S51web2py
  41. endef
  42. define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
  43. $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
  44. $(TARGET_DIR)/usr/lib/systemd/system/web2py.service
  45. mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
  46. ln -fs ../../../../usr/lib//systemd/system/web2py.service \
  47. $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
  48. endef
  49. # www-data user and group are used for web2py. Because these user and group
  50. # are already set by buildroot, it is not necessary to redefine them.
  51. # See system/skeleton/etc/passwd
  52. # username: www-data uid: 33
  53. # groupname: www-data gid: 33
  54. #
  55. # So, we just need to create the directories used by web2py with the right
  56. # ownership.
  57. define PYTHON_WEB2PY_PERMISSIONS
  58. /var/www/web2py r 750 33 33 - - - - -
  59. endef
  60. $(eval $(generic-package))