]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/python-web2py/python-web2py.mk
Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
[coffee/buildroot.git] / package / python-web2py / python-web2py.mk
1 ################################################################################
2 #
3 # python-web2py
4 #
5 ################################################################################
6
7 PYTHON_WEB2PY_VERSION = R-2.14.6
8 PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,$(PYTHON_WEB2PY_VERSION))
9 PYTHON_WEB2PY_LICENSE = LGPL-3.0
10 PYTHON_WEB2PY_LICENSE_FILES = LICENSE
11 PYTHON_WEB2PY_DEPENDENCIES = python python-pydal host-python-pydal
12
13 define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
14         $(HOST_DIR)/bin/python2 -c 'import os; \
15                 os.chdir("$(@D)"); \
16                 from gluon.main import save_password; \
17                 save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),8000)'
18         mkdir -p $(TARGET_DIR)/var/www/web2py
19         cp -dpfr $(@D)/* $(TARGET_DIR)/var/www/web2py
20 endef
21
22 define PYTHON_WEB2PY_INSTALL_INIT_SYSV
23         $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
24                 $(TARGET_DIR)/etc/init.d/S51web2py
25 endef
26
27 define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
28         $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
29                 $(TARGET_DIR)/usr/lib/systemd/system/web2py.service
30         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
31         ln -fs ../../../../usr/lib//systemd/system/web2py.service \
32                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
33 endef
34
35 # www-data user and group are used for web2py. Because these user and group
36 # are already set by buildroot, it is not necessary to redefine them.
37 # See system/skeleton/etc/passwd
38 #   username: www-data    uid: 33
39 #   groupname: www-data   gid: 33
40 #
41 # So, we just need to create the directories used by web2py with the right
42 # ownership.
43 define PYTHON_WEB2PY_PERMISSIONS
44         /var/www/web2py  r  750  33  33  -  -  -  -  -
45 endef
46
47 $(eval $(generic-package))