group 0777 dirs in spool/
[platal.git] / Makefile
CommitLineData
0337d704 1# $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
2################################################################################
3# definitions
4
5VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//")
6
7PKG_NAME = platal
8PKG_DIST = $(PKG_NAME)-$(VERSION)
9PKG_FILES = AUTHORS ChangeLog COPYING README Makefile
10PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade
11
12VCS_FILTER = ! -name .arch-ids ! -name CVS
13
14################################################################################
15# global targets
16
17all: build
18
b66268df 19devel: build htdocs/valid.html
20
0337d704 21headers:
22 headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \
23 `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' `
24
7faf6e6a 25build: spool/templates_c wiki
0337d704 26
27clean:
28 rm -rf include/platal/globals.inc.php
0337d704 29
30%: %.in Makefile
31 sed -e 's,@VERSION@,$(VERSION),g' $< > $@
32
33################################################################################
b66268df 34# targets
7faf6e6a 35spool/templates_c spool/uploads spool/wiki.d::
b66268df 36 mkdir -p $@
37 chmod o+w $@
0337d704 38
39htdocs/valid.html:
40 touch templates_c/valid.html
b66268df 41 cd htdocs && ln -sf ../templates_c/valid.html
42
43htdocs/uploads:
7faf6e6a 44 cd htdocs && ln -sf ../spool/uploads
0337d704 45
b66268df 46htdocs/wikipub:
47 cd htdocs && ln -sf ../wiki/pub wikipub
0337d704 48
b66268df 49wiki/local/pmwiki.config.php:
50 cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php
51
52wiki/pub/skins/empty:
53 cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty
54
7faf6e6a 55wiki: build-wiki spool/uploads htdocs/uploads htdocs/wikipub
b66268df 56 @test -d wiki || wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz
0337d704 57
7faf6e6a 58spool/wiki.d::
59 cd $@ && ln -s ../../install.d/wiki/wiki.d/* .
71ea2622 60
7faf6e6a 61build-wiki: wiki/local/pmwiki.config.php wiki/pub/skins/empty spool/wiki.d
71ea2622 62
0337d704 63################################################################################
b66268df 64
71ea2622 65.PHONY: build dist clean wiki build-wiki
0337d704 66