summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: b20070869fe8f26f7b0e277196dd6795dc139259 (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 --no-discussion \
  16. --plugin=brokenlinks --plugin=pagecount \
  17. --plugin=orphans --plugin=haiku
  18. ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
  19. ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
  20. extra_clean:
  21. rm -rf html doc/.ikiwiki
  22. rm -f ikiwiki.man ikiwiki-mass-rebuild.man
  23. extra_install:
  24. install -d $(PREFIX)/share/ikiwiki/templates
  25. cp templates/* $(PREFIX)/share/ikiwiki/templates
  26. install -d $(PREFIX)/share/ikiwiki/basewiki
  27. cp -a basewiki/* $(PREFIX)/share/ikiwiki/basewiki
  28. install -d $(PREFIX)/share/man/man1
  29. install ikiwiki.man $(PREFIX)/share/man/man1/ikiwiki.1
  30. install -d $(PREFIX)/share/man/man8
  31. install ikiwiki-mass-rebuild.man $(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
  32. install -d $(PREFIX)/sbin
  33. install ikiwiki-mass-rebuild $(PREFIX)/sbin
  34. }
  35. }
  36. WriteMakefile(
  37. 'NAME' => 'IkiWiki',
  38. 'PM_FILTER' => 'grep -v "removed by Makefile"',
  39. 'EXE_FILES' => ['ikiwiki'],
  40. );