From 028ab7fcfb7778861d0851bca307572b5cb33599 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Tue, 5 Feb 2013 15:10:13 -0500 Subject: combine build and vendor dirs --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 72d9169..05a2269 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ #SHELL := /bin/bash MAKE=make -BUILD_DIR = build +BUILD_DIR = vendor #TODO: add install target @@ -21,10 +21,13 @@ predepend: touch predepend $(BUILD_DIR)/exmachina: build - git clone git://github.com/tomgalloway/exmachina $(BUILD_DIR)/exmachina + test -d $(BUILD_DIR)/exmachina || git clone git://github.com/tomgalloway/exmachina $(BUILD_DIR)/exmachina + cd $(BUILD_DIR)/exmachina; git pull $(BUILD_DIR)/bjsonrpc: build - git clone git://github.com/deavid/bjsonrpc.git $(BUILD_DIR)/bjsonrpc + test -d $(BUILD_DIR)/bjsonrpc || git clone git://github.com/deavid/bjsonrpc.git $(BUILD_DIR)/bjsonrpc + cd $(BUILD_DIR)/bjsonrpc; git pull + dbs: data/users.sqlite3 -- cgit v1.2.3 From a14727f2fccf3eee6551d65a0d3faed988f54bef Mon Sep 17 00:00:00 2001 From: James Vasile Date: Tue, 5 Feb 2013 16:06:16 -0500 Subject: pull withsqlite from github --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 05a2269..377f005 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,10 @@ $(BUILD_DIR)/bjsonrpc: build test -d $(BUILD_DIR)/bjsonrpc || git clone git://github.com/deavid/bjsonrpc.git $(BUILD_DIR)/bjsonrpc cd $(BUILD_DIR)/bjsonrpc; git pull +$(BUILD_DIR)/withsqlite: build + test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ + cd $@; git pull + dbs: data/users.sqlite3 -- cgit v1.2.3 From f6a9f4c0d54c353795fdc5baed8e533b85308c9c Mon Sep 17 00:00:00 2001 From: James Vasile Date: Tue, 5 Feb 2013 16:08:17 -0500 Subject: add cherrypy3 to Makefile, clean up some git --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 377f005..58ec6c7 100644 --- a/Makefile +++ b/Makefile @@ -17,16 +17,16 @@ build: mkdir -p $(BUILD_DIR) predepend: - sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah" + sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah python-cherrypy3" touch predepend $(BUILD_DIR)/exmachina: build - test -d $(BUILD_DIR)/exmachina || git clone git://github.com/tomgalloway/exmachina $(BUILD_DIR)/exmachina - cd $(BUILD_DIR)/exmachina; git pull + test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ + cd $@; git pull $(BUILD_DIR)/bjsonrpc: build - test -d $(BUILD_DIR)/bjsonrpc || git clone git://github.com/deavid/bjsonrpc.git $(BUILD_DIR)/bjsonrpc - cd $(BUILD_DIR)/bjsonrpc; git pull + test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ + cd $@; git pull $(BUILD_DIR)/withsqlite: build test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ -- cgit v1.2.3 From 2288b7804a12f4b877a23d7ee586f8bc01cd92e0 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 09:00:19 -0500 Subject: s/_DIR/DIR/ --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 58ec6c7..7cd388a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ #SHELL := /bin/bash MAKE=make -BUILD_DIR = vendor +BUILDDIR = vendor #TODO: add install target @@ -10,25 +10,25 @@ COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` ## Catch-all tagets -default: predepend cfg cherrypy.config dirs template css docs dbs $(BUILD_DIR)/exmachina #$(BUILD_DIR)/bjsonrpc +default: predepend cfg cherrypy.config dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc all: default build: - mkdir -p $(BUILD_DIR) + mkdir -p $(BUILDDIR) predepend: sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah python-cherrypy3" touch predepend -$(BUILD_DIR)/exmachina: build +$(BUILDDIR)/exmachina: build test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ cd $@; git pull -$(BUILD_DIR)/bjsonrpc: build +$(BUILDDIR)/bjsonrpc: build test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ cd $@; git pull -$(BUILD_DIR)/withsqlite: build +$(BUILDDIR)/withsqlite: build test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ cd $@; git pull @@ -90,5 +90,5 @@ clean: @find . -name "*.bak" -exec rm {} \; @$(MAKE) -s -C doc clean @$(MAKE) -s -C templates clean - rm -rf $(BUILD_DIR) + rm -rf $(BUILDDIR) rm -f predepend -- cgit v1.2.3 From fb3af15eddef5c61eeff318c77be0848369122c5 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 12:39:49 -0500 Subject: remove cherrypy.cfg from default --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7cd388a..62c85f0 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` ## Catch-all tagets -default: predepend cfg cherrypy.config dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc +default: predepend cfg dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc all: default build: -- cgit v1.2.3 From e048871f28f3a9bfff80063d6c277649a0ae3470 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 12:38:06 -0500 Subject: add install target --- Makefile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 62c85f0..4b6af81 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ #SHELL := /bin/bash MAKE=make BUILDDIR = vendor - -#TODO: add install target +DESTDIR = debian CSS=$(wildcard *.css) CSS=$(subst .tiny,,$(shell find themes -type f -name '*.css')) @@ -22,16 +21,32 @@ predepend: $(BUILDDIR)/exmachina: build test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ - cd $@; git pull + #cd $@; git pull $(BUILDDIR)/bjsonrpc: build test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ - cd $@; git pull + #cd $@; git pull $(BUILDDIR)/withsqlite: build test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ - cd $@; git pull - + #cd $@; git pull + +install: default + mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth + cp -r *.py modules templates vendor static $(DESTDIR)/usr/lib/python2.7/plinth + rm -f $(DESTDIR)/usr/lib/python2.7/plinth/cfg.py + mv $(DESTDIR)/usr/lib/python2.7/plinth/cfg.sample.py $(DESTDIR)/etc/plinth/cfg.py + ln -s ../../../../etc/plinth/cfg.py $(DESTDIR)/usr/lib/python2.7/plinth/cfg.py + cp -r themes $(DESTDIR)/usr/share/plinth + cp share/init.d/plinth $(DESTDIR)/etc/init.d + rm -f $(DESTDIR)/usr/bin/plinth + ln -s ../lib/python2.7/plinth/plinth.py $(DESTDIR)/usr/bin/plinth + rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git + cd $(DESTDIR)/usr/lib/python2.7/plinth; find -name '*.pyc' -exec rm {} \; + rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git + mkdir -p $(DESTDIR)/var/lib/plinth + cp -r data/* $(DESTDIR)/var/lib/plinth dbs: data/users.sqlite3 @@ -90,5 +105,5 @@ clean: @find . -name "*.bak" -exec rm {} \; @$(MAKE) -s -C doc clean @$(MAKE) -s -C templates clean - rm -rf $(BUILDDIR) + rm -rf $(BUILDDIR) $(DESTDIR) rm -f predepend -- cgit v1.2.3 From d33f6c2997f0cfee85176b54ef780c603a2c25af Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 20:50:10 -0500 Subject: add make uninstall target --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4b6af81..24f91c9 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,9 @@ install: default mkdir -p $(DESTDIR)/var/lib/plinth cp -r data/* $(DESTDIR)/var/lib/plinth +uninstall: + rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth + dbs: data/users.sqlite3 data/users.sqlite3: data/users.sqlite3.distrib -- cgit v1.2.3 From 2f4dd2642dc1b23f8eb99eb08b2e10eb3ad39d89 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 22:28:14 -0500 Subject: add docs to make un/install, handle a few unhandled things to install --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 24f91c9..ee0805a 100644 --- a/Makefile +++ b/Makefile @@ -32,12 +32,13 @@ $(BUILDDIR)/withsqlite: build #cd $@; git pull install: default - mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth + cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config + mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/doc/plinth + cp -L doc/* $(DESTDIR)/usr/share/doc/plinth/ cp -r *.py modules templates vendor static $(DESTDIR)/usr/lib/python2.7/plinth - rm -f $(DESTDIR)/usr/lib/python2.7/plinth/cfg.py - mv $(DESTDIR)/usr/lib/python2.7/plinth/cfg.sample.py $(DESTDIR)/etc/plinth/cfg.py - ln -s ../../../../etc/plinth/cfg.py $(DESTDIR)/usr/lib/python2.7/plinth/cfg.py + rm -f $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config + ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config cp -r themes $(DESTDIR)/usr/share/plinth cp share/init.d/plinth $(DESTDIR)/etc/init.d rm -f $(DESTDIR)/usr/bin/plinth @@ -45,11 +46,13 @@ install: default rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git cd $(DESTDIR)/usr/lib/python2.7/plinth; find -name '*.pyc' -exec rm {} \; rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git - mkdir -p $(DESTDIR)/var/lib/plinth + mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions cp -r data/* $(DESTDIR)/var/lib/plinth + rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib uninstall: - rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth + rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth $(DESTDIR)/usr/share/doc/plinth/ + rm -f $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth dbs: data/users.sqlite3 -- cgit v1.2.3 From dc7dba26cfc4e202df819134e74a265a2fdf9433 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 22:31:07 -0500 Subject: copy sample config --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ee0805a..2fa02cc 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` ## Catch-all tagets -default: predepend cfg dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc +default: predepend config dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc all: default build: @@ -62,8 +62,8 @@ data/users.sqlite3: data/users.sqlite3.distrib dirs: @mkdir -p data/cherrypy_sessions -cfg: Makefile - test -f cfg.py || cp cfg.sample.py cfg.py +config: Makefile + @test -f plinth.config || cp plinth.sample.config plinth.config cherrypy.config: Makefile @echo [global]\\n\ -- cgit v1.2.3 From 4371af4c12a86f5884d1a9199f0f99787ac9973a Mon Sep 17 00:00:00 2001 From: James Vasile Date: Wed, 6 Feb 2013 22:41:09 -0500 Subject: silencing some things in Makefile --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2fa02cc..e3a3cbf 100644 --- a/Makefile +++ b/Makefile @@ -13,23 +13,23 @@ default: predepend config dirs template css docs dbs $(BUILDDIR)/exmachina #$(BU all: default build: - mkdir -p $(BUILDDIR) + @mkdir -p $(BUILDDIR) predepend: sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah python-cherrypy3" touch predepend $(BUILDDIR)/exmachina: build - test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ - #cd $@; git pull + @test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ + #@cd $@; git pull $(BUILDDIR)/bjsonrpc: build - test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ - #cd $@; git pull + @test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ + #@cd $@; git pull $(BUILDDIR)/withsqlite: build - test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ - #cd $@; git pull + @test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ + #@cd $@; git pull install: default mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth -- cgit v1.2.3 From 84407751415464259f5a5d9a7aa5d0db9c4178c6 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 06:06:35 -0500 Subject: put man page in place during make install --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e3a3cbf..d836bd2 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,10 @@ $(BUILDDIR)/withsqlite: build install: default mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config - mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/doc/plinth + mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/doc/plinth $(DESTDIR)/usr/share/man/man1 cp -L doc/* $(DESTDIR)/usr/share/doc/plinth/ + gzip $(DESTDIR)/usr/share/doc/plinth/plinth.1 + mv $(DESTDIR)/usr/share/doc/plinth/plinth.1.gz $(DESTDIR)/usr/share/man/man1 cp -r *.py modules templates vendor static $(DESTDIR)/usr/lib/python2.7/plinth rm -f $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config @@ -52,7 +54,7 @@ install: default uninstall: rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth $(DESTDIR)/usr/share/doc/plinth/ - rm -f $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth + rm -f $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth $(DESTDIR)/usr/share/man/man1/plinth.1.gz dbs: data/users.sqlite3 -- cgit v1.2.3 From 63d2c3ee6827d15e79e3509fc26cff6ffc7d83ef Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 06:19:44 -0500 Subject: Makefile improvements * Remove commented out git pull lines. We shouldn't update so automatically. * Use rsync because it gives us --exclude * Put docs where the webserver can find them --- Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d836bd2..b9629bb 100644 --- a/Makefile +++ b/Makefile @@ -21,15 +21,12 @@ predepend: $(BUILDDIR)/exmachina: build @test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ - #@cd $@; git pull $(BUILDDIR)/bjsonrpc: build @test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ - #@cd $@; git pull $(BUILDDIR)/withsqlite: build @test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ - #@cd $@; git pull install: default mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth @@ -38,16 +35,15 @@ install: default cp -L doc/* $(DESTDIR)/usr/share/doc/plinth/ gzip $(DESTDIR)/usr/share/doc/plinth/plinth.1 mv $(DESTDIR)/usr/share/doc/plinth/plinth.1.gz $(DESTDIR)/usr/share/man/man1 - cp -r *.py modules templates vendor static $(DESTDIR)/usr/lib/python2.7/plinth + rsync -rl *.py modules templates vendor static --exclude static/doc --exclude .git/* $(DESTDIR)/usr/lib/python2.7/plinth + mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth/static/doc + cp doc/*.html $(DESTDIR)/usr/lib/python2.7/plinth/static/doc rm -f $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config cp -r themes $(DESTDIR)/usr/share/plinth cp share/init.d/plinth $(DESTDIR)/etc/init.d rm -f $(DESTDIR)/usr/bin/plinth ln -s ../lib/python2.7/plinth/plinth.py $(DESTDIR)/usr/bin/plinth - rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git - cd $(DESTDIR)/usr/lib/python2.7/plinth; find -name '*.pyc' -exec rm {} \; - rm -rf $(DESTDIR)/usr/lib/python2.7/plinth/vendor/*/.git mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions cp -r data/* $(DESTDIR)/var/lib/plinth rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib -- cgit v1.2.3 From 3a7f2bd8609af70122342813cc406de690eacad6 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 09:22:00 -0500 Subject: no need to write a cherryp.config --- Makefile | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b9629bb..92a66ec 100644 --- a/Makefile +++ b/Makefile @@ -31,16 +31,18 @@ $(BUILDDIR)/withsqlite: build install: default mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config - mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/doc/plinth $(DESTDIR)/usr/share/man/man1 - cp -L doc/* $(DESTDIR)/usr/share/doc/plinth/ + mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/bin \ + $(DESTDIR)/usr/share/doc/plinth $(DESTDIR)/usr/share/man/man1 + rsync -L doc/* $(DESTDIR)/usr/share/doc/plinth/ gzip $(DESTDIR)/usr/share/doc/plinth/plinth.1 mv $(DESTDIR)/usr/share/doc/plinth/plinth.1.gz $(DESTDIR)/usr/share/man/man1 - rsync -rl *.py modules templates vendor static --exclude static/doc --exclude .git/* $(DESTDIR)/usr/lib/python2.7/plinth + rsync -rl *.py modules templates vendor themes static \ + --exclude static/doc --exclude .git/* --exclude *.pyc \ + $(DESTDIR)/usr/lib/python2.7/plinth mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth/static/doc cp doc/*.html $(DESTDIR)/usr/lib/python2.7/plinth/static/doc rm -f $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config - cp -r themes $(DESTDIR)/usr/share/plinth cp share/init.d/plinth $(DESTDIR)/etc/init.d rm -f $(DESTDIR)/usr/bin/plinth ln -s ../lib/python2.7/plinth/plinth.py $(DESTDIR)/usr/bin/plinth @@ -63,27 +65,6 @@ dirs: config: Makefile @test -f plinth.config || cp plinth.sample.config plinth.config -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())))' > $@ css: $(COMPRESSED_CSS) -- cgit v1.2.3 From 65fe8434e334f7f695814078d1c9441462737b44 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 11:30:37 -0500 Subject: Fix paths in installed version * Read python.config from script dir * Make dirs for pid and run Maybe making DESTDIR/var/run during make install is not needed because we can expect the target system to have /var/run, but if it's missing the CherryPy engine will fail when it tries to write the pid. So I added it. --- Makefile | 2 +- cfg.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 92a66ec..847df38 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ install: default cp share/init.d/plinth $(DESTDIR)/etc/init.d rm -f $(DESTDIR)/usr/bin/plinth ln -s ../lib/python2.7/plinth/plinth.py $(DESTDIR)/usr/bin/plinth - mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions + mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions $(DESTDIR)/var/log/plinth $(DESTDIR)/var/run cp -r data/* $(DESTDIR)/var/lib/plinth rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib diff --git a/cfg.py b/cfg.py index add9005..74ad88d 100644 --- a/cfg.py +++ b/cfg.py @@ -18,7 +18,7 @@ parser = SafeConfigParser( 'pidfile':"", 'port':"", }) -parser.read('plinth.config') +parser.read(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'plinth.config')) product_name = parser.get('Name', 'product_name') box_name = parser.get('Name', 'box_name') -- cgit v1.2.3 From fdd1d041701a354e4e2980722a92339b815a6fe2 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 11:38:49 -0500 Subject: Don't set DESTDIR in the Makefile See http://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 847df38..fd1cbdc 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ #SHELL := /bin/bash MAKE=make BUILDDIR = vendor -DESTDIR = debian CSS=$(wildcard *.css) CSS=$(subst .tiny,,$(shell find themes -type f -name '*.css')) -- cgit v1.2.3 From 338a0684ba40a1503da19b8aa043db11cbb89a33 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 12:22:45 -0500 Subject: quote the wildcards in rsync excludes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fd1cbdc..4f0b86a 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ install: default gzip $(DESTDIR)/usr/share/doc/plinth/plinth.1 mv $(DESTDIR)/usr/share/doc/plinth/plinth.1.gz $(DESTDIR)/usr/share/man/man1 rsync -rl *.py modules templates vendor themes static \ - --exclude static/doc --exclude .git/* --exclude *.pyc \ + --exclude static/doc --exclude ".git/*" --exclude "*.pyc" \ $(DESTDIR)/usr/lib/python2.7/plinth mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth/static/doc cp doc/*.html $(DESTDIR)/usr/lib/python2.7/plinth/static/doc -- cgit v1.2.3 From f0fd63b5446e3c01e29cb99be6faa414a05fcfb0 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 12:55:43 -0500 Subject: add missing pieces to make uninstall --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4f0b86a..412aeef 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,11 @@ install: default rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib uninstall: - rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth $(DESTDIR)/usr/share/doc/plinth/ - rm -f $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth $(DESTDIR)/usr/share/man/man1/plinth.1.gz + rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ \ + $(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth $(DESTDIR)/usr/share/doc/plinth/ \ + $(DESTDIR)/var/log/plinth + rm -f $(DESTDIR)/usr/bin/plinth $(DESTDIR)/etc/init.d/plinth \ + $(DESTDIR)/usr/share/man/man1/plinth.1.gz $(DESTDIR)/var/run/plinth.pid dbs: data/users.sqlite3 -- cgit v1.2.3 From c976b1a00c6cb6c8fcbf7832f1487febf45a89ea Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 14:25:08 -0500 Subject: adjust makefile to use submodules --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 412aeef..e16050f 100644 --- a/Makefile +++ b/Makefile @@ -16,17 +16,10 @@ build: predepend: sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah python-cherrypy3" + git submodule init + git submodule update touch predepend -$(BUILDDIR)/exmachina: build - @test -d $@ || git clone git://github.com/tomgalloway/exmachina $@ - -$(BUILDDIR)/bjsonrpc: build - @test -d $@ || git clone git://github.com/deavid/bjsonrpc.git $@ - -$(BUILDDIR)/withsqlite: build - @test -d $@ || git clone git://github.com/jvasile/withsqlite.git $@ - install: default mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config -- cgit v1.2.3 From ce34a5eaa86c8f66d8bda1f212e949e660c00f52 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 7 Feb 2013 16:41:38 -0500 Subject: bit of Makefile reorganization --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e16050f..aa4df0f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -#SHELL := /bin/bash MAKE=make -BUILDDIR = vendor CSS=$(wildcard *.css) CSS=$(subst .tiny,,$(shell find themes -type f -name '*.css')) @@ -8,12 +6,9 @@ COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` ## Catch-all tagets -default: predepend config dirs template css docs dbs $(BUILDDIR)/exmachina #$(BUILDDIR)/bjsonrpc +default: predepend config dirs template css docs dbs all: default -build: - @mkdir -p $(BUILDDIR) - predepend: sudo sh -c "apt-get install augeas-tools python-bjsonrpc python-augeas python-simplejson pandoc python-cheetah python-cherrypy3" git submodule init @@ -56,6 +51,7 @@ data/users.sqlite3: data/users.sqlite3.distrib dirs: @mkdir -p data/cherrypy_sessions + @mkdir -p vendor config: Makefile @test -f plinth.config || cp plinth.sample.config plinth.config -- cgit v1.2.3 From 1ddf4bede47f793b3142b1ff3bad800fa8c1bda9 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Sat, 9 Feb 2013 12:35:08 -0500 Subject: Adjust how modules are imported * change to u. notation for util, since from foo import * is evil * make import vendor.foo possible * vendor dir is part of the repo now, no need to mkdir * use the vendor.foo notation --- Makefile | 1 - plinth.py | 11 +++++------ vendor/__init__.py | 0 3 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 vendor/__init__.py (limited to 'Makefile') diff --git a/Makefile b/Makefile index aa4df0f..cf29a63 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,6 @@ data/users.sqlite3: data/users.sqlite3.distrib dirs: @mkdir -p data/cherrypy_sessions - @mkdir -p vendor config: Makefile @test -f plinth.config || cp plinth.sample.config plinth.config diff --git a/plinth.py b/plinth.py index 4f88310..1cf3019 100755 --- a/plinth.py +++ b/plinth.py @@ -12,14 +12,13 @@ from cherrypy.process.plugins import Daemonizer Daemonizer(cherrypy.engine).subscribe() import plugin_mount -from util import * +import util as u + from logger import Logger #from modules.auth import AuthController, require, member_of, name_is -import withsqlite -from withsqlite.withsqlite import sqlite_db -import exmachina -from exmachina.exmachina import ExMachinaClient +from vendor.withsqlite.withsqlite import sqlite_db +from vendor.exmachina.exmachina import ExMachinaClient import socket __version__ = "0.2.14" @@ -31,7 +30,7 @@ __email__ = "james@jamesvasile.com" __status__ = "Development" def error_page(status, dynamic_msg, stock_msg): - return page_template(template="err", title=status, main="

%s

%s" % (dynamic_msg, stock_msg)) + return u.page_template(template="err", title=status, main="

%s

%s" % (dynamic_msg, stock_msg)) def error_page_404(status, message, traceback, version): return error_page(status, message, """

If you believe this diff --git a/vendor/__init__.py b/vendor/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3