summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: 74ad20c177da1d24788b296b364f830db38d7821 (plain)
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use ExtUtils::MakeMaker;
  5. # Add a few more targets.
  6. sub MY::postamble {
  7. q{
  8. all:: extra_build
  9. clean:: extra_clean
  10. install:: extra_install
  11. pure_install:: extra_install
  12. extra_build:
  13. ./ikiwiki doc html --templatedir=templates --underlaydir=basewiki \
  14. --wikiname="ikiwiki" --verbose --no-rcs \
  15. --exclude=/discussion --plugin=brokenlinks \
  16. --plugin=pagecount --plugin=orphans \
  17. --plugin=haiku
  18. ./mdwn2man doc/usage.mdwn > ikiwiki.man
  19. extra_clean:
  20. rm -rf html doc/.ikiwiki
  21. rm -f ikiwiki.man
  22. extra_install:
  23. install -d $(PREFIX)/share/ikiwiki/templates
  24. cp templates/* $(PREFIX)/share/ikiwiki/templates
  25. install -d $(PREFIX)/share/ikiwiki/basewiki
  26. cp -a basewiki/* $(PREFIX)/share/ikiwiki/basewiki
  27. install -d $(PREFIX)/share/man/man1
  28. install ikiwiki.man $(PREFIX)/share/man/man1/ikiwiki.1
  29. }
  30. }
  31. WriteMakefile(
  32. 'NAME' => 'IkiWiki',
  33. 'PM_FILTER' => 'grep -v "removed by Makefile"',
  34. 'EXE_FILES' => ['ikiwiki'],
  35. );