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