tinycm rev 11

Improve Makefile and small fix
author Christophe Lincoln <pankso@slitaz.org>
date Sun Dec 22 02:36:28 2013 +0100 (2013-12-22)
parents 4caef490258f
children b37aa11da7df
files Makefile index.cgi style.css
line diff
     1.1 --- a/Makefile	Sat Sep 01 11:45:02 2012 -0300
     1.2 +++ b/Makefile	Sun Dec 22 02:36:28 2013 +0100
     1.3 @@ -4,8 +4,8 @@
     1.4  PACKAGE="tinycm"
     1.5  PREFIX?=/usr
     1.6  DESTDIR?=
     1.7 -WEB?=/var/www
     1.8 -VAR?=/var/lib/slitaz
     1.9 +WEB?=/var/www/cgi-bin/tinycm
    1.10 +LOGIN?=/var/lib/slitaz
    1.11  LINGUAS?=
    1.12  
    1.13  all:
    1.14 @@ -32,16 +32,23 @@
    1.15  # Install
    1.16  
    1.17  install:
    1.18 -	install -m 0700 -d $(DESTDIR)/$(VAR)/people
    1.19 -	install -m 0700 -d $(DESTDIR)/$(VAR)/auth
    1.20 +	install -m 0700 -d $(DESTDIR)$(LOGIN)/people
    1.21 +	install -m 0700 -d $(DESTDIR)$(LOGIN)/auth
    1.22  	install -m 0755 -d $(DESTDIR)$(WEB)/content
    1.23  	install -m 0755 -d $(DESTDIR)$(WEB)/cache
    1.24  	#install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
    1.25  	#install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
    1.26 -	touch $(DESTDIR)/$(VAR)/auth/people
    1.27 -	chmod 0600 $(DESTDIR)$(VAR)/auth/people
    1.28 +	
    1.29 +	cp -a config.cgi favicon.ico index.cgi README style.css \
    1.30 +		images lib plugins $(DESTDIR)$(WEB)
    1.31 +	
    1.32  	#install -m 0644 data/tinycm.desktop \
    1.33  	#	$(DESTDIR)$(PREFIX)/share/applications
    1.34  	#cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.35 -	chown -R www.www $(DESTDIR)/$(VAR)
    1.36 -	chown -R www.www $(DESTDIR)/$(WEB)/content
    1.37 +	
    1.38 +	touch $(DESTDIR)$(LOGIN)/auth/people
    1.39 +	chmod 0600 $(DESTDIR)$(LOGIN)/auth/people
    1.40 +	chown -R www.www $(DESTDIR)$(LOGIN)/auth
    1.41 +	chown -R www.www $(DESTDIR)$(LOGIN)/people
    1.42 +	chown www.www $(DESTDIR)$(WEB)/content
    1.43 +	chown www.www $(DESTDIR)$(WEB)/cache
     2.1 --- a/index.cgi	Sat Sep 01 11:45:02 2012 -0300
     2.2 +++ b/index.cgi	Sun Dec 22 02:36:28 2013 +0100
     2.3 @@ -103,11 +103,11 @@
     2.4  
     2.5  # Default index if missing
     2.6  default_index() {
     2.7 -	mkdir -p $(dirname $index)
     2.8 +	mkdir -p "$wiki"
     2.9  	cat > $wiki/$index.txt << EOT
    2.10  ==== Welcome ====
    2.11  
    2.12 -This is the default index page of your CM, you can start to edit adding
    2.13 +This is the default index page of your CM, you can start to edit and adding
    2.14  some content to your TinyCM.
    2.15  
    2.16  EOT
    2.17 @@ -585,7 +585,9 @@
    2.18  		html_header
    2.19  		user_box
    2.20  		get_lang
    2.21 -		[ ! -f "$wiki/$index.txt" ] && default_index
    2.22 +		if [ ! -f "$wiki/$index.txt" ]; then
    2.23 +			default_index
    2.24 +		fi
    2.25  		if [ ! -f "$wiki/$d.txt" ]; then
    2.26  			echo "<h2>$d</h2>"
    2.27  			gettext "The document does not exist. You can create it or read the"
     3.1 --- a/style.css	Sat Sep 01 11:45:02 2012 -0300
     3.2 +++ b/style.css	Sun Dec 22 02:36:28 2013 +0100
     3.3 @@ -211,7 +211,7 @@
     3.4  
     3.5  #tools { 
     3.6  	padding-top: 10px; 
     3.7 -	margin-top: 20px; 
     3.8 +	margin-top: 40px; 
     3.9  	/*border-top: 1px dotted #ccc;
    3.10  	position: fixed;
    3.11  	bottom: 10px;*/