summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: 831c13255e7733e64339566797596c17e7847716 (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. VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
  13. extra_build:
  14. ./ikiwiki.pl doc html --templatedir=templates --underlaydir=basewiki \
  15. --wikiname="ikiwiki" --verbose --no-rcs \
  16. --exclude=/discussion --no-discussion \
  17. --plugin=brokenlinks --plugin=pagecount \
  18. --plugin=orphans --plugin=haiku --plugin=meta \
  19. --plugin=tag --plugin=polygen --plugin=pagestats \
  20. --plugin=fortune --plugin=aggregate --plugin=map \
  21. --plugin=template --plugin=toc --plugin=shortcut
  22. ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
  23. ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
  24. ./pm_filter $(PREFIX) $(VER) < ikiwiki.pl > ikiwiki.out
  25. extra_clean:
  26. rm -rf html doc/.ikiwiki
  27. rm -f ikiwiki.man ikiwiki-mass-rebuild.man ikiwiki.out
  28. extra_install:
  29. install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/templates
  30. $(CP) -a templates/* $(DESTDIR)$(PREFIX)/share/ikiwiki/templates
  31. install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/basewiki
  32. $(CP) -a basewiki/* $(DESTDIR)$(PREFIX)/share/ikiwiki/basewiki
  33. install -d $(DESTDIR)$(PREFIX)/share/man/man1
  34. install ikiwiki.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki.1
  35. install -d $(DESTDIR)$(PREFIX)/share/man/man8
  36. install ikiwiki-mass-rebuild.man $(DESTDIR)$(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
  37. install -d $(DESTDIR)$(PREFIX)/sbin
  38. install ikiwiki-mass-rebuild $(DESTDIR)$(PREFIX)/sbin
  39. install -d $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
  40. install ikiwiki-w3m.cgi $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
  41. install -d $(DESTDIR)$(PREFIX)/bin
  42. install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki
  43. }
  44. }
  45. WriteMakefile(
  46. NAME => 'IkiWiki',
  47. PREFIX => "/usr/local",
  48. PM_FILTER => './pm_filter $(PREFIX) $(VER)',
  49. MAN1PODS => {},
  50. );