Import buildroot 2016.02.01

This commit is contained in:
2016-02-24 22:35:39 +01:00
parent a6ee09dea4
commit 828befcf3c
7393 changed files with 390887 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
config BR2_PACKAGE_PYTHON_WEB2PY
bool "python-web2py"
depends on BR2_PACKAGE_PYTHON
select BR2_PACKAGE_PYTHON_PYDAL
select BR2_PACKAGE_PYTHON_ZLIB
select BR2_PACKAGE_PYTHON_PYEXPAT
select BR2_PACKAGE_PYTHON_SQLITE
help
web2py is a free open source full-stack framework for rapid
development of fast, scalable, secure and portable
database-driven web-based applications.
http://web2py.com
if BR2_PACKAGE_PYTHON_WEB2PY
config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD
string "admin panel password"
default web2py
help
Set the admin panel password.
endif

View File

@@ -0,0 +1,25 @@
#!/bin/sh
case "$1" in
start)
printf "Starting web2py: "
start-stop-daemon -S -q -m -p /run/web2py.pid \
-c www-data \
-b -x /var/www/web2py/web2py.py \
-- --nogui -a '"<recycle>"' -i 0.0.0.0 -p 8000
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping web2py: "
start-stop-daemon -K -q -p /run/web2py.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
"$0" stop
sleep 1
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac

View File

@@ -0,0 +1,2 @@
# sha256 locally computed
sha256 7e22a5624d8d2909e165110f0bec6b43ee36ff6834d689f4027e06dece662031 python-web2py-R-2.12.3.tar.gz

View File

@@ -0,0 +1,47 @@
################################################################################
#
# python-web2py
#
################################################################################
PYTHON_WEB2PY_VERSION = R-2.12.3
PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,$(PYTHON_WEB2PY_VERSION))
PYTHON_WEB2PY_LICENSE = LGPLv3
PYTHON_WEB2PY_LICENSE_FILES = LICENSE
PYTHON_WEB2PY_DEPENDENCIES = python python-pydal host-python-pydal
define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
$(HOST_DIR)/usr/bin/python2 -c 'import os; \
os.chdir("$(@D)"); \
from gluon.main import save_password; \
save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),8000)'
mkdir -p $(TARGET_DIR)/var/www/web2py
cp -dpfr $(@D)/* $(TARGET_DIR)/var/www/web2py
endef
define PYTHON_WEB2PY_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
$(TARGET_DIR)/etc/init.d/S51web2py
endef
define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
$(TARGET_DIR)/usr/lib/systemd/system/web2py.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib//systemd/system/web2py.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service
endef
# www-data user and group are used for web2py. Because these user and group
# are already set by buildroot, it is not necessary to redefine them.
# See system/skeleton/etc/passwd
# username: www-data uid: 33
# groupname: www-data gid: 33
#
# So, we just need to create the directories used by web2py with the right
# ownership.
define PYTHON_WEB2PY_PERMISSIONS
/var/www/web2py r 750 33 33 - - - - -
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Web2py daemon
After=network.target
[Service]
Type=simple
ExecStart=/var/www/web2py/web2py.py --nogui -a '<recycle>' -i 0.0.0.0 -p 8000
User=www-data
[Install]
WantedBy=multi-user.target