mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Makefile generates cherrpy.config
This commit is contained in:
parent
443b2649bf
commit
18b9df74f9
26
Makefile
26
Makefile
@ -5,13 +5,35 @@ MAKE=make
|
||||
CSS=$(wildcard *.css)
|
||||
CSS=$(subst .tiny,,$(shell find themes -type f -name '*.css'))
|
||||
COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS))
|
||||
PWD=`pwd`
|
||||
|
||||
## Catch-all tagets
|
||||
default: template docs css dirs
|
||||
default: cherrypy.config dirs template css docs
|
||||
all: default
|
||||
|
||||
dirs:
|
||||
mkdir -p data/cherrypy_sessions
|
||||
@mkdir -p data/cherrypy_sessions
|
||||
|
||||
cherrypy.config: Makefile
|
||||
@echo [global]\\n\
|
||||
server.socket_host = \'0.0.0.0\'\\n\
|
||||
server.socket_port = 8000\\n\
|
||||
server.thread_pool = 10\\n\
|
||||
tools.staticdir.root = \"$(PWD)\"\\n\
|
||||
tools.sessions.on = True\\n\
|
||||
tools.auth.on = True\\n\
|
||||
tools.sessions.storage_type = \"file\"\\n\
|
||||
tools.sessions.timeout = 90\\n\
|
||||
tools.sessions.storage_path = \"$(PWD)/data/cherrypy_sessions\"\\n\
|
||||
\\n\
|
||||
[/static]\\n\
|
||||
tools.staticdir.on = True\\n\
|
||||
tools.staticdir.dir = \"static\"\\n\
|
||||
\\n\
|
||||
[/favicon.ico]\\n\
|
||||
tools.staticfile.on = True\\n\
|
||||
tools.staticfile.filename = \"$(PWD)/static/theme/favicon.ico\"\\n\
|
||||
> cherrypy.config
|
||||
|
||||
%.tiny.css: %.css
|
||||
@cat $< | python -c 'import re,sys;print re.sub("\s*([{};,:])\s*", "\\1", re.sub("/\*.*?\*/", "", re.sub("\s+", " ", sys.stdin.read())))' > $@
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
[global]
|
||||
server.socket_host = '0.0.0.0'
|
||||
server.socket_port = 8000
|
||||
server.thread_pool = 10
|
||||
tools.staticdir.root = "."
|
||||
tools.sessions.on = True
|
||||
tools.auth.on = True
|
||||
tools.sessions.storage_type = "file"
|
||||
tools.sessions.storage_path = "./data/cherrypy_sessions"
|
||||
tools.sessions.timeout = 90
|
||||
|
||||
[/static]
|
||||
tools.staticdir.on = True
|
||||
tools.staticdir.dir = "static"
|
||||
|
||||
[/favicon.ico]
|
||||
tools.staticfile.on = True
|
||||
tools.staticfile.filename = "./static/theme/favicon.ico"
|
||||
|
||||
@ -4,6 +4,7 @@ from gettext import gettext as _
|
||||
from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
class Help(PagePlugin):
|
||||
order = 20 # order of running init in PagePlugins
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("help")
|
||||
|
||||
@ -4,6 +4,7 @@ from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
|
||||
class Services(PagePlugin):
|
||||
order = 9 # order of running init in PagePlugins
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("services")
|
||||
|
||||
@ -5,6 +5,8 @@ from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
|
||||
class Sharing(PagePlugin):
|
||||
order = 9 # order of running init in PagePlugins
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sharing")
|
||||
|
||||
@ -16,7 +16,6 @@ sys_dir = "modules/installed/sys"
|
||||
class Sys(PagePlugin):
|
||||
order = 10
|
||||
def __init__(self, *args, **kwargs):
|
||||
cfg.log("!!!!!!!!!!!!!!!!!!!!")
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sys")
|
||||
self.menu = cfg.main_menu.add_item(_("%s System" % cfg.product_name), "/sys", 100)
|
||||
|
||||
@ -7,6 +7,7 @@ from forms import Form
|
||||
from util import *
|
||||
|
||||
class users(PagePlugin):
|
||||
order = 20 # order of running init in PagePlugins
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sys.users")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user