tinycm rev 45

Improve Makefile
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 19 02:20:00 2014 +0100 (2014-01-19)
parents 30e39dd19525
children df44b3c6e4c7
files Makefile README
line diff
     1.1 --- a/Makefile	Sat Jan 18 17:52:45 2014 +0100
     1.2 +++ b/Makefile	Sun Jan 19 02:20:00 2014 +0100
     1.3 @@ -5,10 +5,10 @@
     1.4  PREFIX?=/usr
     1.5  DESTDIR?=
     1.6  WEB?=/var/www/cgi-bin/tinycm
     1.7 -LOGIN?=/var/lib/slitaz
     1.8 +AUTH?=/var/lib/slitaz
     1.9  LINGUAS?=pt_BR
    1.10  
    1.11 -all:
    1.12 +all: msgfmt
    1.13  
    1.14  # i18n
    1.15  
    1.16 @@ -31,24 +31,31 @@
    1.17  
    1.18  # Install
    1.19  
    1.20 -install:
    1.21 -	install -m 0700 -d $(DESTDIR)$(LOGIN)/people
    1.22 -	install -m 0700 -d $(DESTDIR)$(LOGIN)/auth
    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 -	
    1.27 -	cp -a config.cgi favicon.ico index.cgi style.css images lib \
    1.28 -		plugins content/ $(DESTDIR)$(WEB)
    1.29 -	#cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.30 -	install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
    1.31 -	
    1.32 +install: install-web
    1.33 +	install -m 0700 -d $(DESTDIR)$(AUTH)/people
    1.34 +	install -m 0700 -d $(DESTDIR)$(AUTH)/auth
    1.35 +	install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
    1.36 +	cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.37  	# Set permissions
    1.38 -	chown -R www.www $(DESTDIR)$(LOGIN)/auth
    1.39 -	chown -R www.www $(DESTDIR)$(LOGIN)/people
    1.40 +	chown -R www.www $(DESTDIR)$(AUTH)/auth
    1.41 +	chown -R www.www $(DESTDIR)$(AUTH)/people
    1.42  	chown -R www.www $(DESTDIR)$(WEB)/content
    1.43  	chown -R www.www $(DESTDIR)$(WEB)/cache
    1.44  
    1.45 +install-web:
    1.46 +	install -m 0755 -d $(DESTDIR)$(WEB)/cache
    1.47 +	cp -a config.cgi favicon.ico index.cgi style.css images lib \
    1.48 +		plugins content $(DESTDIR)$(WEB)
    1.49 +
    1.50 +install-slitaz: install
    1.51 +	install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
    1.52 +	install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
    1.53 +
    1.54  uninstall:
    1.55  	rm -rf $(DESTDIR)$(WEB)
    1.56  	rm $(DESTDIR)$(PREFIX)/share/applications/tinycm.desktop
    1.57 +
    1.58 +# Clean source
    1.59 +
    1.60 +clean:
    1.61 +	rm -rf po/mo
     2.1 --- a/README	Sat Jan 18 17:52:45 2014 +0100
     2.2 +++ b/README	Sun Jan 19 02:20:00 2014 +0100
     2.3 @@ -40,6 +40,15 @@
     2.4  	$ editor config.cgi
     2.5  	$ make install
     2.6  
     2.7 +If you want to install the web interface and auth DB in an other directory
     2.8 +than /var/www and /var/lib/slitaz you can use the following command:
     2.9 +
    2.10 +	$ make install WEB=/path/to/domain/vhost AUTH=/path/to/domain
    2.11 +
    2.12 +If you already have a users DB and want to share auth sytem you can install
    2.13 +TinyCM with:
    2.14 +
    2.15 +	$ make install-web WEB=/path/to/domain/vhost
    2.16  
    2.17  Plugins
    2.18  -------