use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase
%renderedfiles %pagesources %depends %hooks %forcerebuild};
+my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
+
sub defaultconfig () { #{{{
wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
srcdir => undef,
destdir => undef,
pingurl => [],
- templatedir => "/usr/share/ikiwiki/templates",
- underlaydir => "/usr/share/ikiwiki/basewiki",
+ templatedir => "$installdir/share/ikiwiki/templates",
+ underlaydir => "$installdir/share/ikiwiki/basewiki",
setup => undef,
adminuser => undef,
adminemail => undef,
VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
ikiwiki: ikiwiki.pl
- perl -pe '$$_="" if /use lib/; $$_="our \$$version=\"$(VER)\";\n" if /VERSION_AUTOREPLACE/' ikiwiki.pl > ikiwiki
+ ./pm_filter $(PREFIX) $(VER) < ikiwiki.pl > ikiwiki
extra_build:
./ikiwiki.pl doc html --templatedir=templates --underlaydir=basewiki \
rm -f ikiwiki.man ikiwiki-mass-rebuild.man
extra_install:
- install -d $(PREFIX)/share/ikiwiki/templates
- cp templates/* $(PREFIX)/share/ikiwiki/templates
+ install -d $(DESTDIR)/usr/share/ikiwiki/templates
+ cp templates/* $(DESTDIR)/usr/share/ikiwiki/templates
- install -d $(PREFIX)/share/ikiwiki/basewiki
- cp -a basewiki/* $(PREFIX)/share/ikiwiki/basewiki
+ install -d $(DESTDIR)/usr/share/ikiwiki/basewiki
+ cp -a basewiki/* $(DESTDIR)/usr/share/ikiwiki/basewiki
- install -d $(PREFIX)/share/man/man1
- install ikiwiki.man $(PREFIX)/share/man/man1/ikiwiki.1
+ install -d $(DESTDIR)/usr/share/man/man1
+ install ikiwiki.man $(DESTDIR)/usr/share/man/man1/ikiwiki.1
- install -d $(PREFIX)/share/man/man8
- install ikiwiki-mass-rebuild.man $(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
+ install -d $(DESTDIR)/usr/share/man/man8
+ install ikiwiki-mass-rebuild.man $(DESTDIR)/usr/share/man/man8/ikiwiki-mass-rebuild.8
- install -d $(PREFIX)/sbin
- install ikiwiki-mass-rebuild $(PREFIX)/sbin
+ install -d $(DESTDIR)/usr/sbin
+ install ikiwiki-mass-rebuild $(DESTDIR)/usr/sbin
- install -d $(PREFIX)/lib/w3m/cgi-bin
- install ikiwiki-w3m.cgi $(PREFIX)/lib/w3m/cgi-bin
+ install -d $(DESTDIR)/usr/lib/w3m/cgi-bin
+ install ikiwiki-w3m.cgi $(DESTDIR)/usr/lib/w3m/cgi-bin
}
}
WriteMakefile(
'NAME' => 'IkiWiki',
- 'PM_FILTER' => 'grep -v "removed by Makefile"',
+ 'PM_FILTER' => './pm_filter $(PREFIX) $(VER)',
'EXE_FILES' => ['ikiwiki'],
+ 'MAN1PODS' => {},
'clean' => {FILES => 'ikiwiki'},
);
* Make all pages pull in a local.css style sheet, if present. This won't
be included in ikiwiki, but can be created to make local styling changes
w/o needing to merge in every new change to the distributed style.css.
+ * Use DESTDIR and not PREFIX to specify installation prefix for packaging.
+ * Support running "perl Makefile.PL PREFIX=foo" to build ikiwiki to run
+ from a different directory.
- -- Joey Hess <joeyh@debian.org> Thu, 24 Aug 2006 16:29:24 -0400
+ -- Joey Hess <joeyh@debian.org> Thu, 24 Aug 2006 21:28:45 -0400
ikiwiki (1.21) unstable; urgency=low
Copyright (C) 1999, 2000 Martin Pool <mbp@humbug.org.au>
Moin Moin is licensed under the terms of GPL version 2 or later.
-The basewiki and templates are licensed using a varient of the BSD license:
+The basewiki and templates are licensed using a variant of the BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
dh_testroot
dh_clean -k
$(MAKE) pure_install INSTALLDIRS=vendor \
- PREFIX=$(shell pwd)/debian/ikiwiki/$(shell perl -MConfig -e 'print $$Config{prefix}')
+ DESTDIR=$(shell pwd)/debian/ikiwiki
dh_install wikilist etc/ikiwiki
dh_installdocs html
dh_link usr/share/common-licenses/GPL usr/share/doc/ikiwiki/html/GPL
configured at build time depending on the installation directory). It does mention
that DESTDIR is the thing used by packaging tools.
- It would probably be nice if ikiwiki offered a separate build-time
- setting to control where it looked for its data files, though it already
- offers a way to do it at runtime (--underlaydir and --templatedir).
-
- --[[Joey]]
+ Thanks for clarifying that. [[bugs/done]] --[[Joey]]
* --templatedir
Specify the directory that the page [[templates]] are stored in.
- Default is `/usr/share/ikiwiki/templates`.
+ Default is `/usr/share/ikiwiki/templates`, or another location as
+ configured at build time.
* --underlaydir
Specify the directory that is used to underlay the source directory.
Source files will be taken from here unless overridden by a file in the
- source directory. Default is `/usr/share/ikiwiki/basewiki`.
+ source directory. Default is `/usr/share/ikiwiki/basewiki` or another
+ location as configured at build time.
* --wrappermode mode
--- /dev/null
+#!/usr/bin/perl -i -p
+
+BEGIN {
+ $prefix=shift;
+ $ver=shift;
+}
+
+if (/INSTALLDIR_AUTOREPLACE/) {
+ $_=qq{my \$installdir="$prefix";};
+}
+elsif (/VERSION_AUTOREPLACE/) {
+ $_=qq{our \$version="$ver";};
+}
+elsif (/^use lib/) {
+ $_="";
+}