summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: 9d31dcb8b56dd1a7c49f7a7b24fd7ccfa72f6f2c (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 --nosvn --exclude=/discussion
  15. ./mdwn2man doc/usage.mdwn > ikiwiki.man
  16. extra_clean:
  17. rm -rf html doc/.ikiwiki
  18. rm -f ikiwiki.man
  19. extra_install:
  20. install -d $(PREFIX)/share/ikiwiki/templates
  21. cp templates/* $(PREFIX)/share/ikiwiki/templates
  22. install -d $(PREFIX)/share/ikiwiki/basewiki
  23. cp -a basewiki/* $(PREFIX)/share/ikiwiki/basewiki
  24. install -d $(PREFIX)/share/man/man1
  25. install ikiwiki.man $(PREFIX)/share/man/man1/ikiwiki.1
  26. }
  27. }
  28. WriteMakefile(
  29. 'NAME' => 'IkiWiki',
  30. 'PM_FILTER' => 'grep -v "removed by Makefile"',
  31. 'EXE_FILES' => ['ikiwiki'],
  32. );