Adds the precision that the site password has to be shorter than 10 characters
[platal.git] / Makefile
... / ...
CommitLineData
1
2# $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
3################################################################################
4# definitions
5
6VERSNUM := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//")
7VERSTAG := $(shell grep VERSION ChangeLog | head -1 | grep 'XX' > /dev/null 2> /dev/null && echo 'beta')
8BANANA := $(shell ( [ -d ../banana ] && echo `pwd`"/../banana" ) || echo "/home/web/dev/banana")
9
10VERSION = $(VERSNUM)$(VERSTAG)
11
12PKG_NAME = platal
13PKG_DIST = $(PKG_NAME)-$(VERSION)
14PKG_FILES = AUTHORS ChangeLog COPYING README Makefile
15PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade
16
17VCS_FILTER = ! -name .arch-ids ! -name CVS
18
19################################################################################
20# global targets
21
22all: build
23
24build: core banana wiki jquery
25
26q:
27 @echo -e "Code statistics\n"
28 @sloccount $(filter-out wiki/ spool/, $(wildcard */)) 2> /dev/null | egrep '^[a-z]*:'
29
30%: %.in Makefile ChangeLog
31 sed -e 's,@VERSION@,$(VERSION),g' $< > $@
32
33################################################################################
34# targets
35
36##
37## core
38##
39
40core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess spool/conf spool/tmp
41
42spool/templates_c spool/mails_c spool/uploads spool/conf spool/tmp:
43 mkdir -p $@
44 chmod o+w $@
45
46htdocs/.htaccess: htdocs/.htaccess.in Makefile
47 @REWRITE_BASE="/~$$(id -un)"; \
48 test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE="/"; \
49 sed -e "s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@
50
51##
52## wiki
53##
54
55WIKI_NEEDS = \
56 wiki/local/farmconfig.php \
57 wiki/pub/skins/empty \
58 wiki/cookbook/e-protect.php \
59 spool/wiki.d \
60 htdocs/uploads \
61 htdocs/wiki \
62
63wiki: get-wiki build-wiki
64
65build-wiki: $(WIKI_NEEDS) | get-wiki
66
67htdocs/uploads:
68 cd htdocs && ln -sf ../spool/uploads
69
70htdocs/wiki:
71 cd htdocs && ln -sf ../wiki/pub wiki
72
73
74spool/wiki.d:
75 mkdir -p $@
76 chmod o+w $@
77 cd $@ && ln -sf ../../include/wiki/wiki.d/* .
78
79
80wiki/cookbook/e-protect.php:
81 cd wiki/cookbook && ln -sf ../../include/wiki/e-protect.php
82
83wiki/local/farmconfig.php:
84 cd wiki/local/ && ln -sf ../../include/wiki/farmconfig.php
85
86wiki/pub/skins/empty:
87 cd wiki/pub/skins/ && ln -sf ../../../include/wiki/empty
88
89
90get-wiki:
91 @if ! test -d wiki; then \
92 wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \
93 tar -xzvf pmwiki-latest.tgz; \
94 rm pmwiki-latest.tgz; \
95 mv pmwiki-* wiki; \
96 fi
97
98##
99## banana
100##
101
102banana: htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php
103htdocs/images/banana:
104 cd $(@D) && ln -snf $(BANANA)/img $(@F)
105
106htdocs/css/banana.css:
107 cd $(@D) && ln -snf $(BANANA)/css/style.css $(@F)
108
109include/banana/banana.inc.php:
110 cd $(@D) && find $(BANANA)/banana/ -name '*.php' -exec ln -snf {} . ";"
111
112
113
114##
115## jquery
116##
117
118jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js htdocs/javascript/jquery.color.js
119htdocs/javascript/jquery.js:
120 wget http://jquery.com/src/jquery-latest.pack.js -O $@ -q || ($(RM) $@; exit 1)
121
122htdocs/javascript/jquery.color.js:
123 wget http://plugins.jquery.com/files/jquery.color.js.txt -O $@ -q || ($(RM) $@; exit 1)
124
125################################################################################
126
127.PHONY: build dist clean wiki build-wiki banana htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php
128