wiki => smarty
[platal.git] / Makefile
index 0a8a763..1d5123b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,8 @@ spool/wiki.d:
        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 spool/templates_c/valid.html
@@ -63,15 +65,16 @@ wiki/pub/skins/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;                                                       \
+           tar -xzvf pmwiki-latest.tgz;                                  \
+           rm pmwiki-latest.tgz;                                         \
+           mv pmwiki-* wiki;                                             \
        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: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki wiki/cookbook/e-protect.php
 
 ################################################################################