summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: 59c5d86ba4a4c23de6e943af84863d0c397a8fe2 (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 --plugin=meta
  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. install -d $(PREFIX)/lib/w3m/cgi-bin
  35. install ikiwiki-w3m.cgi $(PREFIX)/lib/w3m/cgi-bin
  36. }
  37. }
  38. WriteMakefile(
  39. 'NAME' => 'IkiWiki',
  40. 'PM_FILTER' => 'grep -v "removed by Makefile"',
  41. 'EXE_FILES' => ['ikiwiki'],
  42. );