# HG changeset patch # User Christophe Lincoln # Date 1387676188 -3600 # Node ID 6841b2e2379d9c8e4346f1214623de1dee78629b # Parent 4caef490258f4d50ea4421d2b8d0f5ad4aca2b26 Improve Makefile and small fix diff -r 4caef490258f -r 6841b2e2379d Makefile --- a/Makefile Sat Sep 01 11:45:02 2012 -0300 +++ b/Makefile Sun Dec 22 02:36:28 2013 +0100 @@ -4,8 +4,8 @@ PACKAGE="tinycm" PREFIX?=/usr DESTDIR?= -WEB?=/var/www -VAR?=/var/lib/slitaz +WEB?=/var/www/cgi-bin/tinycm +LOGIN?=/var/lib/slitaz LINGUAS?= all: @@ -32,16 +32,23 @@ # Install install: - install -m 0700 -d $(DESTDIR)/$(VAR)/people - install -m 0700 -d $(DESTDIR)/$(VAR)/auth + install -m 0700 -d $(DESTDIR)$(LOGIN)/people + install -m 0700 -d $(DESTDIR)$(LOGIN)/auth install -m 0755 -d $(DESTDIR)$(WEB)/content install -m 0755 -d $(DESTDIR)$(WEB)/cache #install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications #install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale - touch $(DESTDIR)/$(VAR)/auth/people - chmod 0600 $(DESTDIR)$(VAR)/auth/people + + cp -a config.cgi favicon.ico index.cgi README style.css \ + images lib plugins $(DESTDIR)$(WEB) + #install -m 0644 data/tinycm.desktop \ # $(DESTDIR)$(PREFIX)/share/applications #cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale - chown -R www.www $(DESTDIR)/$(VAR) - chown -R www.www $(DESTDIR)/$(WEB)/content + + touch $(DESTDIR)$(LOGIN)/auth/people + chmod 0600 $(DESTDIR)$(LOGIN)/auth/people + chown -R www.www $(DESTDIR)$(LOGIN)/auth + chown -R www.www $(DESTDIR)$(LOGIN)/people + chown www.www $(DESTDIR)$(WEB)/content + chown www.www $(DESTDIR)$(WEB)/cache diff -r 4caef490258f -r 6841b2e2379d index.cgi --- a/index.cgi Sat Sep 01 11:45:02 2012 -0300 +++ b/index.cgi Sun Dec 22 02:36:28 2013 +0100 @@ -103,11 +103,11 @@ # Default index if missing default_index() { - mkdir -p $(dirname $index) + mkdir -p "$wiki" cat > $wiki/$index.txt << EOT ==== Welcome ==== -This is the default index page of your CM, you can start to edit adding +This is the default index page of your CM, you can start to edit and adding some content to your TinyCM. EOT @@ -585,7 +585,9 @@ html_header user_box get_lang - [ ! -f "$wiki/$index.txt" ] && default_index + if [ ! -f "$wiki/$index.txt" ]; then + default_index + fi if [ ! -f "$wiki/$d.txt" ]; then echo "

$d

" gettext "The document does not exist. You can create it or read the" diff -r 4caef490258f -r 6841b2e2379d style.css --- a/style.css Sat Sep 01 11:45:02 2012 -0300 +++ b/style.css Sun Dec 22 02:36:28 2013 +0100 @@ -211,7 +211,7 @@ #tools { padding-top: 10px; - margin-top: 20px; + margin-top: 40px; /*border-top: 1px dotted #ccc; position: fixed; bottom: 10px;*/