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