all: build
+devel: build htdocs/valid.html
+
headers:
headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \
`find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' `
-build: pkg-build
-
-dist: clean pkg-dist
-
-bzdist: clean pkg-bzdist
+build: spool/templates_c wiki
clean:
rm -rf include/platal/globals.inc.php
- rm -f htdocs/banana/banana.css htdocs/valid.html include/banana htdocs/banana/img htdocs/banana/xface.php
%: %.in Makefile
sed -e 's,@VERSION@,$(VERSION),g' $< > $@
################################################################################
-# devel targets
-templates_c:
- mkdir templates_c
- chmod o+w templates_c
+# targets
+
+spool/templates_c spool/uploads:
+ mkdir -p $@
+ chmod o+w $@
+
+spool/wiki.d:
+ mkdir -p $@
+ chmod o+w $@
+ cd $@ && ln -sf ../../install.d/wiki/wiki.d/* .
+
+wiki/cookbook/e-protect.php:
+ cd wiki/cookbook && ln -sf ../../install.d/wiki/e-protect.php
htdocs/valid.html:
- touch templates_c/valid.html
- ln -sf ../templates_c/valid.html htdocs/valid.html
+ touch spool/templates_c/valid.html
+ chmod o+w spool/templates_c/valid.html
+ cd htdocs && ln -sf ../spool/templates_c/valid.html
-devel: build templates_c htdocs/valid.html
+htdocs/uploads:
+ cd htdocs && ln -sf ../spool/uploads
+htdocs/wiki:
+ cd htdocs && ln -sf ../wiki/pub wiki
+
+wiki/local/farmconfig.php:
+ cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php farmconfig.php
+
+wiki/pub/skins/empty:
+ cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty
+
+get-wiki:
+ @if ! test -d wiki; then \
+ wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \
+ echo "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯"; \
+ echo "now please untar pmwiki into wiki/ and run make again"; \
+ echo "_____________________________________________________"; \
+ exit 1; \
+ fi
+
+build-wiki: wiki/local/farmconfig.php wiki/pub/skins/empty spool/wiki.d
+ @sed -e 's/^exit;/\/\/exit;/g' wiki/pmwiki.php > wiki/pmwiki.php.new
+ @mv wiki/pmwiki.php.new wiki/pmwiki.php
+
+wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki wiki/cookbook/e-protect.php
################################################################################
-# diogenes package targets
-
-pkg-build: include/platal/globals.inc.php
-
-$(PKG_DIST): pkg-build
- mkdir $(PKG_DIST)
- cp -a $(PKG_FILES) $(PKG_DIST)
- for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \
- do \
- mkdir -p $(PKG_DIST)/$$dir; \
- find $$dir -type f -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \
- done
-
-pkg-dist: $(PKG_DIST)
- rm -f $(PKG_DIST).tar.gz
- tar czf $(PKG_DIST).tar.gz $(PKG_DIST)
- rm -rf $(PKG_DIST)
-
-pkg-bzdist: $(PKG_DIST)
- rm -f $(PKG_DIST).tar.bz2
- tar cjf $(PKG_DIST).tar.bz2 $(PKG_DIST)
- rm -rf $(PKG_DIST)
-
-.PHONY: build dist clean pkg-build pkg-dist
+
+.PHONY: build dist clean wiki build-wiki