From fed73d8d922ec4d52457a99f652c1d0d26ba67c3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 21:05:07 -0400 Subject: change PROFILE to use Devel::NYTProf --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 602d8fb5c..020813177 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -27,7 +27,7 @@ PROBABLE_INST_LIB=$(shell \\ W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) -extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:Profile"; fi) +extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) ikiwiki.out: ikiwiki.in ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out -- cgit v1.2.3 From 7adb471ff4ba0eddd18a858165d65c5dcb94090f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 19:56:40 -0400 Subject: install ikiwiki-calendar --- Makefile.PL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 020813177..a58b64c0d 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -42,6 +42,7 @@ extra_build: ikiwiki.out ikiwiki.setup docwiki ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man ./mdwn2man ikiwiki-transition 1 doc/ikiwiki-transition.mdwn > ikiwiki-transition.man ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man + ./mdwn2man ikiwiki-calendar 1 doc/ikiwiki-calendar.mdwn > ikiwiki-calendar.man $(MAKE) -C po docwiki: ikiwiki.out @@ -100,6 +101,7 @@ extra_install: underlay_install install -m 644 ikiwiki-makerepo.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-makerepo.1 install -m 644 ikiwiki-transition.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-transition.1 install -m 644 ikiwiki-update-wikilist.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-update-wikilist.1 + install -m 644 ikiwiki-calendar.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-calendar.1 install -d $(DESTDIR)$(PREFIX)/share/man/man8 install -m 644 ikiwiki-mass-rebuild.man $(DESTDIR)$(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8 @@ -112,7 +114,7 @@ extra_install: underlay_install install -d $(DESTDIR)$(PREFIX)/bin install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki - install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist $(DESTDIR)$(PREFIX)/bin/ + install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist ikiwiki-calendar $(DESTDIR)$(PREFIX)/bin/ $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) -- cgit v1.2.3 From f4c4b3b45f70764f56a7c29c4d29928f4280a5df Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Oct 2009 11:38:08 -0400 Subject: add spec file Modify makefile to update spec file version number. --- Makefile.PL | 1 + debian/changelog | 1 + ikiwiki.spec | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 ikiwiki.spec (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index a58b64c0d..474098814 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -44,6 +44,7 @@ extra_build: ikiwiki.out ikiwiki.setup docwiki ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man ./mdwn2man ikiwiki-calendar 1 doc/ikiwiki-calendar.mdwn > ikiwiki-calendar.man $(MAKE) -C po + sed -i "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/' Mon, 26 Oct 2009 11:53:32 -0400 diff --git a/ikiwiki.spec b/ikiwiki.spec new file mode 100644 index 000000000..9294586df --- /dev/null +++ b/ikiwiki.spec @@ -0,0 +1,270 @@ +Name: ikiwiki +Version: 3.20091024 +Release: 1%{?dist} +Summary: A wiki compiler + +Group: Applications/Internet +License: GPLv2+ +URL: http://ikiwiki.info/ +Source0: http://ftp.debian.org/debian/pool/main/i/%{name}/%{name}_%{version}.tar.gz +Patch0: ikiwiki-3.00-libexecdir.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: perl(Text::Markdown) +BuildRequires: perl(Mail::Sendmail) +BuildRequires: perl(HTML::Scrubber) +BuildRequires: perl(XML::Simple) +BuildRequires: perl(Date::Parse) +BuildRequires: perl(Date::Format) +BuildRequires: perl(HTML::Template) +BuildRequires: perl(CGI::FormBuilder) +BuildRequires: perl(CGI::Session) +BuildRequires: perl(File::MimeInfo) +BuildRequires: gettext +BuildRequires: po4a + +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +Requires: perl(Text::Markdown) +Requires: perl(Mail::Sendmail) +Requires: perl(HTML::Scrubber) +Requires: perl(XML::Simple) +Requires: perl(CGI::FormBuilder) +Requires: perl(CGI::Session) +Requires: perl(Digest::SHA1) + +Requires: python-docutils + +%define cgi_bin %{_libexecdir}/w3m/cgi-bin + + +%description +Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages +suitable for publishing on a website. Ikiwiki stores pages and history +in a revision control system such as Subversion or Git. There are many +other features, including support for blogging, as well as a large +array of plugins. + + +%prep +%setup0 -q -n %{name} +%patch0 -p1 -b .libexecdir + +# Filter unwanted Provides: +%{__cat} << \EOF > %{name}-prov +#!/bin/sh +%{__perl_provides} $* |\ + %{__sed} -e '/perl(IkiWiki.*)/d' +EOF + +%define __perl_provides %{_builddir}/%{name}/%{name}-prov +%{__chmod} +x %{__perl_provides} + +# Filter Requires, all used by plugins +# - Monotone: see bz 450267 +%{__cat} << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + %{__sed} -e '/perl(IkiWiki.*)/d' \ + -e '/perl(Monotone)/d' +EOF + +%define __perl_requires %{_builddir}/%{name}/%{name}-req +%{__chmod} +x %{__perl_requires} + +# goes into the -w3m subpackage +%{__cat} << \EOF > README.fedora +See http://ikiwiki.info/w3mmode/ for more information. +EOF + + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor PREFIX=%{_prefix} +# parallel builds currently don't work +%{__make} + + +%install +%{__rm} -rf %{buildroot} +%{__make} pure_install DESTDIR=%{buildroot} W3M_CGI_BIN=%{cgi_bin} +%find_lang %{name} + +# move external plugins +%{__mkdir_p} %{buildroot}%{_libexecdir}/ikiwiki/plugins +%{__mv} %{buildroot}%{_prefix}/lib/ikiwiki/plugins/* \ + %{buildroot}%{_libexecdir}/ikiwiki/plugins + +# remove shebang +%{__sed} -e '1{/^#!/d}' -i \ + %{buildroot}%{_sysconfdir}/ikiwiki/auto.setup \ + %{buildroot}%{_sysconfdir}/ikiwiki/auto-blog.setup \ + %{buildroot}%{_libexecdir}/ikiwiki/plugins/proxy.py + + +%clean +%{__rm} -rf %{buildroot} + + +%files -f %{name}.lang +%defattr(-,root,root,-) +%{_bindir}/ikiwiki* +%{_sbindir}/ikiwiki* +%{_mandir}/man1/ikiwiki* +%{_mandir}/man8/ikiwiki* +%{_datadir}/ikiwiki +%dir %{_sysconfdir}/ikiwiki +%config(noreplace) %{_sysconfdir}/ikiwiki/* +# contains a packlist only +%exclude %{perl_vendorarch} +%{perl_vendorlib}/IkiWiki* +%exclude %{perl_vendorlib}/IkiWiki*/Plugin/skeleton.pm.example +%{_libexecdir}/ikiwiki +%doc README debian/changelog debian/NEWS html +%doc IkiWiki/Plugin/skeleton.pm.example + + +%package w3m +Summary: Ikiwiki w3m cgi meta-wrapper +Group: Applications/Internet +Requires: w3m +Requires: %{name} = %{version}-%{release} + +%description w3m +Enable usage of all of ikiwiki's web features (page editing, etc) in +the w3m web browser without a web server. w3m supports local CGI +scripts, and ikiwiki can be set up to run that way using the +meta-wrapper in this package. + + +%files w3m +%defattr(-,root,root,-) +%doc README.fedora +%{cgi_bin}/ikiwiki-w3m.cgi + + +%changelog +* Thu Oct 8 2009 Thomas Moschny - 3.14159265-1 +- Update to 3.14159265. + +* Tue Sep 1 2009 Thomas Moschny - 3.1415926-1 +- Update to 3.1415926 (fixes CVE-2009-2944, see bz 520543). + +* Wed Aug 12 2009 Thomas Moschny - 3.141592-1 +- Update to 3.141592. +- po4a is needed now. + +* Fri Jul 24 2009 Fedora Release Engineering - 3.1415-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jul 17 2009 Thomas Moschny - 3.1415-1 +- Update to 3.1415. + +* Thu Jun 11 2009 Thomas Moschny - 3.14-1 +- Update to 3.14. + +* Fri May 15 2009 Thomas Moschny - 3.12-1 +- Update to 3.12. + +* Tue May 5 2009 Thomas Moschny - 3.11-1 +- Update to 3.11. + +* Sat Apr 25 2009 Thomas Moschny - 3.10-1 +- Update to 3.10. + +* Tue Apr 7 2009 Thomas Moschny - 3.09-1 +- Update to 3.09. + +* Fri Mar 27 2009 Thomas Moschny - 3.08-1 +- Update to 3.08. + +* Mon Mar 9 2009 Thomas Moschny - 3.07-1 +- Update to 3.07. + +* Thu Mar 5 2009 Thomas Moschny - 3.06-1 +- Update to 3.06. + +* Tue Feb 24 2009 Fedora Release Engineering - 3.04-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 18 2009 Thomas Moschny - 3.04-1 +- Update to 3.04. + +* Mon Feb 9 2009 Thomas Moschny - 3.03-1 +- Update to 3.03. + +* Sat Jan 10 2009 Thomas Moschny - 3.01-1 +- Update to 3.01. + +* Fri Jan 2 2009 Thomas Moschny - 3.00-1 +- Update to 3.00. + +* Fri Jan 2 2009 Thomas Moschny - 2.72-1 +- Update to 2.72. +- Patch for mtn plugin has been applied upstream. +- Encoding of ikiwiki.vim has been changed to utf-8 upstream. +- Use new W3M_CGI_BIN option in %%install. + +* Tue Dec 16 2008 Thomas Moschny - 2.70-3 +- Patch for monotone plugin: Prevent broken pipe message. +- Cosmetic changes to satisfy rpmlint. + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 2.70-2 +- Rebuild for Python 2.6 + +* Thu Nov 20 2008 Thomas Moschny - 2.70-1 +- Update to 2.70. +- Install and enable the external rst plugin. +- Stop filtering perl(RPC::XML*) requires. + +* Fri Oct 10 2008 Thomas Moschny - 2.66-1 +- Update to 2.66. + +* Fri Sep 19 2008 Thomas Moschny - 2.64-1 +- Update to 2.64. + +* Thu Sep 11 2008 Thomas Moschny - 2.63-1 +- Update to 2.63. + +* Sat Aug 30 2008 Thomas Moschny - 2.62.1-1 +- Update to 2.62.1. Add /etc/ikiwiki. + +* Thu Aug 7 2008 Thomas Moschny - 2.56-1 +- Update to 2.56. +- Stop filtering perl(Net::Amazon::S3), has been approved (bz436481). + +* Thu Jul 31 2008 Thomas Moschny - 2.55-1 +- Update to 2.55. + +* Thu Jul 24 2008 Thomas Moschny - 2.54-1 +- Update to 2.54. +- Move example plugin file to doc. + +* Sat Jul 12 2008 Thomas Moschny - 2.53-1 +- Update to 2.53. + +* Thu Jul 10 2008 Thomas Moschny - 2.52-1 +- Update to 2.52. + +* Sun Jul 6 2008 Thomas Moschny - 2.51-1 +- Update to 2.51. +- Save iconv output to a temporary file. + +* Sun Jun 15 2008 Thomas Moschny - 2.50-1 +- Update to 2.50. +- Move ikiwiki-w3m.cgi into a subpackage. +- Add ikiwiki's own documentation. +- Remove duplicate requirement perl(File::MimeInfo). +- Minor cleanups. + +* Mon Jun 2 2008 Thomas Moschny - 2.48-1 +- Update to 2.48. + +* Wed May 28 2008 Thomas Moschny - 2.47-1 +- Update to 2.47. + +* Tue May 13 2008 Thomas Moschny - 2.46-1 +- Update to 2.46. + +* Sat May 10 2008 Thomas Moschny - 2.45-1 +- New package. -- cgit v1.2.3 From 76d72e9bdd983ca05d84bef158644ff009931e31 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Nov 2009 13:47:37 -0500 Subject: more portable use of sed -i Apparently OS X requires the extension be specified. But this turns on backup in GNU sed, so have to remove that. --- Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 474098814..462f7364d 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -44,7 +44,8 @@ extra_build: ikiwiki.out ikiwiki.setup docwiki ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man ./mdwn2man ikiwiki-calendar 1 doc/ikiwiki-calendar.mdwn > ikiwiki-calendar.man $(MAKE) -C po - sed -i "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/';print m/\((.*?)\)/' Date: Sun, 28 Feb 2010 00:12:47 -0500 Subject: Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory. --- IkiWiki.pm | 7 +++++++ IkiWiki/Render.pm | 11 +++++++++++ Makefile.PL | 2 +- debian/changelog | 4 +++- doc/usage.mdwn | 8 ++++++++ ikiwiki.in | 12 +++++++++++- ikiwiki.spec | 2 +- 7 files changed, 42 insertions(+), 4 deletions(-) (limited to 'Makefile.PL') diff --git a/IkiWiki.pm b/IkiWiki.pm index 9df6c90d6..00eadfd98 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -409,6 +409,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + clean => { + type => "internal", + default => 0, + description => "running in clean mode", + safe => 0, + rebuild => 0, + }, refresh => { type => "internal", default => 0, diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 3ebb1a324..af24df155 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -683,6 +683,17 @@ sub refresh () { } } +sub clean_rendered { + lockwiki(); + loadindex(); + remove_unrendered(); + foreach my $page (keys %oldrenderedfiles) { + foreach my $file (@{$oldrenderedfiles{$page}}) { + prune($config{destdir}."/".$file); + } + } +} + sub commandline_render () { lockwiki(); loadindex(); diff --git a/Makefile.PL b/Makefile.PL index 462f7364d..52421a711 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -51,7 +51,7 @@ docwiki: ikiwiki.out $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh extra_clean: - rm -rf html doc/.ikiwiki + $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean diff --git a/debian/changelog b/debian/changelog index 832bbaa85..3b92c598d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100213) UNRELEASED; urgency=low +ikiwiki (3.20100228) UNRELEASED; urgency=low * comments: Display number of comments in comment action link. * Rebuild wikis on upgrade to this version to get the comment counts @@ -8,6 +8,8 @@ ikiwiki (3.20100213) UNRELEASED; urgency=low files/directories. * Fix admin openid detection in setup automator, and avoid prompting for a password. + * Add new --clean option; this makes ikiwiki remove all built + files in the destdir, as well as wrappers and the .ikiwiki directory. -- Joey Hess Sun, 14 Feb 2010 17:02:10 -0500 diff --git a/doc/usage.mdwn b/doc/usage.mdwn index e4808d4c2..a105d7e59 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -50,6 +50,14 @@ These options control the mode that ikiwiki operates in. If used with --setup --refresh, this makes it also update any configured wrappers. +* --clean + + This makes ikiwiki clean up by removing any files it denerated in the + `destination` directory, as well as any configured wrappers, and the + `.ikiwiki` state directory. This is mostly useful if you're running + ikiwiki in a Makefile to build documentation and want a corresponding + `clean` target. + * --cgi Enable [[CGI]] mode. In cgi mode ikiwiki runs as a cgi script, and diff --git a/ikiwiki.in b/ikiwiki.in index b8581d880..ae1251ff6 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -37,6 +37,7 @@ sub getconfig () { "syslog!" => \$config{syslog}, "rebuild!" => \$config{rebuild}, "refresh!" => \$config{refresh}, + "clean!" => \$config{clean}, "post-commit" => \$config{post_commit}, "render=s" => \$config{render}, "wrappers!" => \$config{genwrappers}, @@ -135,6 +136,7 @@ sub main () { if (@{$config{wrappers}} && ! $config{render} && ! $config{dumpsetup} && + ! $config{clean} && ((! $config{refresh} && ! $config{post_commit}) || $config{genwrappers})) { debug(gettext("generating wrappers..")); @@ -159,7 +161,7 @@ sub main () { # setup implies a wiki rebuild by default if (! $config{refresh} && ! $config{render} && - ! $config{post_commit}) { + ! $config{post_commit} && ! $config{clean}) { $config{rebuild}=1; } } @@ -190,6 +192,14 @@ sub main () { elsif ($config{post_commit} && ! commit_hook_enabled()) { # do nothing } + elsif ($config{clean}) { + require IkiWiki::Render; + foreach my $wrapper (@{$config{wrappers}}) { + prune($wrapper->{wrapper}); + } + clean_rendered(); + system("rm", "-rf", $config{wikistatedir}); + } else { if ($config{rebuild}) { debug(gettext("rebuilding wiki..")); diff --git a/ikiwiki.spec b/ikiwiki.spec index 865c9a325..1dba9f463 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100212 +Version: 3.20100228 Release: 1%{?dist} Summary: A wiki compiler -- cgit v1.2.3 From 1273f1de52998cf54afb3445fd8c616bce53e698 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 26 Mar 2010 13:11:02 -0400 Subject: Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. --- .gitignore | 3 +- Makefile.PL | 16 +- debian/changelog | 2 + ...on_does_not_set_perl_moduels_path_properly.mdwn | 2 + ikiwiki-calendar | 57 ---- ikiwiki-calendar.in | 58 ++++ ikiwiki-transition | 348 -------------------- ikiwiki-transition.in | 349 +++++++++++++++++++++ ikiwiki.spec | 2 +- 9 files changed, 423 insertions(+), 414 deletions(-) delete mode 100755 ikiwiki-calendar create mode 100755 ikiwiki-calendar.in delete mode 100755 ikiwiki-transition create mode 100755 ikiwiki-transition.in (limited to 'Makefile.PL') diff --git a/.gitignore b/.gitignore index 8de36e2c8..e9ab152b6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,10 @@ blib/* doc/.ikiwiki/* html/* ikiwiki.out +ikiwiki-transition.out +ikiwiki-calendar.out pm_to_blib *.man -build-stamp po/po2wiki_stamp po/underlays/*/*.mdwn po/underlays/basewiki/*/*.mdwn diff --git a/Makefile.PL b/Makefile.PL index 52421a711..5a9028b51 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,15 +28,16 @@ W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) +outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out -ikiwiki.out: ikiwiki.in - ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out - chmod +x ikiwiki.out +%.out: %.in + ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < $< > $@ + chmod +x $@ ikiwiki.setup: ikiwiki.out HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup -extra_build: ikiwiki.out ikiwiki.setup docwiki +extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man @@ -52,7 +53,7 @@ docwiki: ikiwiki.out extra_clean: $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean - rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc + rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean underlay_install: @@ -115,8 +116,9 @@ extra_install: underlay_install install ikiwiki-w3m.cgi $(DESTDIR)$(W3M_CGI_BIN) install -d $(DESTDIR)$(PREFIX)/bin - install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki - install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist ikiwiki-calendar $(DESTDIR)$(PREFIX)/bin/ + for prog in $(outprogs); do \ + install $$prog $(DESTDIR)$(PREFIX)/bin/$$(shell echo $$prog | sed 's/\.out//'); \ + done $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) diff --git a/debian/changelog b/debian/changelog index b9a105552..57406c6d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low not called by attachment plugin. * Fix incorrect influence info returned by a failing link() pagespec, that could lead to bad dependency handling in certian situations. + * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar + if necessary for unusual install. -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn index 5dd4bc780..b3e87b529 100644 --- a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn +++ b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn @@ -13,3 +13,5 @@ This is not true for ikiwiki-transition: The missing line should be added. Thanks! + +[[done]] --[[Joey]] diff --git a/ikiwiki-calendar b/ikiwiki-calendar deleted file mode 100755 index a9548d6ec..000000000 --- a/ikiwiki-calendar +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use IkiWiki; -use IkiWiki::Setup; -use Getopt::Long; - -sub usage () { - die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; -} - -my $force=0; -GetOptions( - "force" => \$force, -) || usage(); -my $setup=shift || usage(); -my $pagespec=shift || "*"; -my $startyear=shift || 1900+(localtime(time))[5]; -my $endyear=shift || $startyear; - -%config=IkiWiki::defaultconfig(); -IkiWiki::Setup::load($setup); -IkiWiki::loadplugins(); -IkiWiki::checkconfig(); - -my $archivebase = 'archives'; -$archivebase = $config{archivebase} if defined $config{archivebase}; - -sub writearchive ($$;$) { - my $template=template(shift); - my $year=shift; - my $month=shift; - - my $page=defined $month ? "$year/$month" : $year; - - my $pagefile=newpagefile("$archivebase/$page", $config{default_pageext}); - $template->param(pagespec => $pagespec); - $template->param(year => $year); - $template->param(month => $month) if defined $month; - - if ($force || ! -e "$config{srcdir}/$pagefile") { - writefile($pagefile, $config{srcdir}, $template->output); - IkiWiki::rcs_add($pagefile) if $config{rcs}; - } -} - -foreach my $y ($startyear..$endyear) { - writearchive("calendaryear.tmpl", $y); - foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { - writearchive("calendarmonth.tmpl", $y, $m); - } -} - -IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) - if $config{rcs}; - -system("ikiwiki", "-setup", $setup, "-refresh"); diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in new file mode 100755 index 000000000..9738ea5f7 --- /dev/null +++ b/ikiwiki-calendar.in @@ -0,0 +1,58 @@ +#!/usr/bin/perl +use warnings; +use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. +use IkiWiki; +use IkiWiki::Setup; +use Getopt::Long; + +sub usage () { + die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; +} + +my $force=0; +GetOptions( + "force" => \$force, +) || usage(); +my $setup=shift || usage(); +my $pagespec=shift || "*"; +my $startyear=shift || 1900+(localtime(time))[5]; +my $endyear=shift || $startyear; + +%config=IkiWiki::defaultconfig(); +IkiWiki::Setup::load($setup); +IkiWiki::loadplugins(); +IkiWiki::checkconfig(); + +my $archivebase = 'archives'; +$archivebase = $config{archivebase} if defined $config{archivebase}; + +sub writearchive ($$;$) { + my $template=template(shift); + my $year=shift; + my $month=shift; + + my $page=defined $month ? "$year/$month" : $year; + + my $pagefile=newpagefile("$archivebase/$page", $config{default_pageext}); + $template->param(pagespec => $pagespec); + $template->param(year => $year); + $template->param(month => $month) if defined $month; + + if ($force || ! -e "$config{srcdir}/$pagefile") { + writefile($pagefile, $config{srcdir}, $template->output); + IkiWiki::rcs_add($pagefile) if $config{rcs}; + } +} + +foreach my $y ($startyear..$endyear) { + writearchive("calendaryear.tmpl", $y); + foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { + writearchive("calendarmonth.tmpl", $y, $m); + } +} + +IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) + if $config{rcs}; + +system("ikiwiki", "-setup", $setup, "-refresh"); diff --git a/ikiwiki-transition b/ikiwiki-transition deleted file mode 100755 index 1bebb1176..000000000 --- a/ikiwiki-transition +++ /dev/null @@ -1,348 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use IkiWiki; -use HTML::Entities; - -my $regex = qr{ - (\\?) # 1: escape? - \[\[(!?) # directive open; 2: optional prefix - ([-\w]+) # 3: command - ( # 4: the parameters (including initial whitespace) - \s+ - (?: - (?:[-\w]+=)? # named parameter key? - (?: - """.*?""" # triple-quoted value - | - "[^"]+" # single-quoted value - | - [^\s\]]+ # unquoted value - ) - \s* # whitespace or end - # of directive - ) - *) # 0 or more parameters - \]\] # directive closed -}sx; - -sub handle_directive { - my $escape = shift; - my $prefix = shift; - my $directive = shift; - my $args = shift; - - if (length $escape) { - return "${escape}[[${prefix}${directive}${args}]]" - } - if ($directive =~ m/^(if|more|table|template|toggleable)$/) { - $args =~ s{$regex}{handle_directive($1, $2, $3, $4)}eg; - } - return "[[!${directive}${args}]]" -} - -sub prefix_directives { - loadsetup(shift); - - IkiWiki::loadplugins(); - IkiWiki::checkconfig(); - IkiWiki::loadindex(); - - if (! %pagesources) { - error "ikiwiki has not built this wiki yet, cannot transition"; - } - - foreach my $page (values %pagesources) { - next unless defined pagetype($page) && - -f $config{srcdir}."/".$page; - my $content=readfile($config{srcdir}."/".$page); - my $oldcontent=$content; - $content=~s{$regex}{handle_directive($1, $2, $3, $4)}eg; - if ($oldcontent ne $content) { - writefile($page, $config{srcdir}, $content); - } - } -} - -sub indexdb { - setstatedir(shift); - - # Note: No lockwiki here because ikiwiki already locks it - # before calling this. - if (! IkiWiki::oldloadindex()) { - die "failed to load index\n"; - } - if (! IkiWiki::saveindex()) { - die "failed to save indexdb\n" - } - if (! IkiWiki::loadindex()) { - die "transition failed, cannot load new indexdb\n"; - } - if (! unlink("$config{wikistatedir}/index")) { - die "unlink failed: $!\n"; - } -} - -sub hashpassword { - setstatedir(shift); - - eval q{use IkiWiki::UserInfo}; - eval q{use Authen::Passphrase::BlowfishCrypt}; - if ($@) { - error("ikiwiki-transition hashpassword: failed to load Authen::Passphrase, passwords not hashed"); - } - - IkiWiki::lockwiki(); - IkiWiki::loadplugin("passwordauth"); - my $userinfo = IkiWiki::userinfo_retrieve(); - foreach my $user (keys %{$userinfo}) { - if (ref $userinfo->{$user} && - exists $userinfo->{$user}->{password} && - length $userinfo->{$user}->{password} && - ! exists $userinfo->{$user}->{cryptpassword}) { - IkiWiki::Plugin::passwordauth::setpassword($user, $userinfo->{$user}->{password}); - } - } -} - -sub aggregateinternal { - loadsetup(shift); - require IkiWiki::Plugin::aggregate; - IkiWiki::checkconfig(); - IkiWiki::Plugin::aggregate::migrate_to_internal(); -} - -sub setupformat { - my $setup=shift; - - loadsetup($setup); - IkiWiki::checkconfig(); - - # unpack old-format wrappers setting into new fields - my $cgi_seen=0; - my $rcs_seen=0; - foreach my $wrapper (@{$config{wrappers}}) { - if ($wrapper->{cgi}) { - if ($cgi_seen) { - die "don't know what to do with second cgi wrapper ".$wrapper->{wrapper}."\n"; - } - $cgi_seen++; - print "setting cgi_wrapper to ".$wrapper->{wrapper}."\n"; - $config{cgi_wrapper}=$wrapper->{wrapper}; - $config{cgi_wrappermode}=$wrapper->{wrappermode} - if exists $wrapper->{wrappermode}; - } - elsif ($config{rcs}) { - if ($rcs_seen) { - die "don't know what to do with second rcs wrapper ".$wrapper->{wrapper}."\n"; - } - $rcs_seen++; - print "setting $config{rcs}_wrapper to ".$wrapper->{wrapper}."\n"; - $config{$config{rcs}."_wrapper"}=$wrapper->{wrapper}; - $config{$config{rcs}."_wrappermode"}=$wrapper->{wrappermode} - if exists $wrapper->{wrappermode}; - } - else { - die "don't know what to do with wrapper ".$wrapper->{wrapper}."\n"; - } - } - - IkiWiki::Setup::dump($setup); -} - -sub moveprefs { - my $setup=shift; - - loadsetup($setup); - IkiWiki::checkconfig(); - - eval q{use IkiWiki::UserInfo}; - error $@ if $@; - - foreach my $field (qw{allowed_attachments locked_pages}) { - my $orig=$config{$field}; - foreach my $admin (@{$config{adminuser}}) { - my $a=IkiWiki::userinfo_get($admin, $field); - if (defined $a && length $a && - # might already have been moved - (! defined $orig || $a ne $orig)) { - if (defined $config{$field} && - length $config{$field}) { - $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a); - } - else { - $config{$field}=$a; - } - } - } - } - - my %banned=map { $_ => 1 } @{$config{banned_users}}, IkiWiki::get_banned_users(); - $config{banned_users}=[sort keys %banned]; - - IkiWiki::Setup::dump($setup); -} - -sub deduplinks { - loadsetup(shift); - IkiWiki::loadplugins(); - IkiWiki::checkconfig(); - IkiWiki::loadindex(); - foreach my $page (keys %links) { - my %l; - $l{$_}=1 foreach @{$links{$page}}; - $links{$page}=[keys %l] - } - IkiWiki::saveindex(); -} - -sub setstatedir { - my $dirorsetup=shift; - - if (! defined $dirorsetup) { - usage(); - } - - if (-d $dirorsetup) { - $config{wikistatedir}=$dirorsetup."/.ikiwiki"; - } - elsif (-f $dirorsetup) { - loadsetup($dirorsetup); - } - else { - error("ikiwiki-transition: $dirorsetup does not exist"); - } - - if (! -d $config{wikistatedir}) { - error("ikiwiki-transition: $config{wikistatedir} does not exist"); - } -} - -sub loadsetup { - my $setup=shift; - if (! defined $setup) { - usage(); - } - - require IkiWiki::Setup; - - %config = IkiWiki::defaultconfig(); - IkiWiki::Setup::load($setup); -} - -sub usage { - print STDERR "Usage: ikiwiki-transition type ...\n"; - print STDERR "Currently supported transition subcommands:\n"; - print STDERR "\tprefix_directives setupfile ...\n"; - print STDERR "\taggregateinternal setupfile\n"; - print STDERR "\tsetupformat setupfile\n"; - print STDERR "\tmoveprefs setupfile\n"; - print STDERR "\thashpassword setupfile|srcdir\n"; - print STDERR "\tindexdb setupfile|srcdir\n"; - print STDERR "\tdeduplinks setupfile\n"; - exit 1; -} - -usage() unless @ARGV; - -my $mode=shift; -if ($mode eq 'prefix_directives') { - prefix_directives(@ARGV); -} -elsif ($mode eq 'hashpassword') { - hashpassword(@ARGV); -} -elsif ($mode eq 'indexdb') { - indexdb(@ARGV); -} -elsif ($mode eq 'aggregateinternal') { - aggregateinternal(@ARGV); -} -elsif ($mode eq 'setupformat') { - setupformat(@ARGV); -} -elsif ($mode eq 'moveprefs') { - moveprefs(@ARGV); -} -elsif ($mode eq 'deduplinks') { - deduplinks(@ARGV); -} -else { - usage(); -} - -package IkiWiki; - -# A slightly modified version of the old loadindex function. -sub oldloadindex { - %oldrenderedfiles=%pagectime=(); - if (! $config{rebuild}) { - %pagesources=%pagemtime=%oldlinks=%links=%depends= - %destsources=%renderedfiles=%pagecase=%pagestate=(); - } - open (my $in, "<", "$config{wikistatedir}/index") || return; - while (<$in>) { - chomp; - my %items; - $items{link}=[]; - $items{dest}=[]; - foreach my $i (split(/ /, $_)) { - my ($item, $val)=split(/=/, $i, 2); - push @{$items{$item}}, decode_entities($val); - } - - next unless exists $items{src}; # skip bad lines for now - - my $page=pagename($items{src}[0]); - if (! $config{rebuild}) { - $pagesources{$page}=$items{src}[0]; - $pagemtime{$page}=$items{mtime}[0]; - $oldlinks{$page}=[@{$items{link}}]; - $links{$page}=[@{$items{link}}]; - $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT } if exists $items{depends}; - $destsources{$_}=$page foreach @{$items{dest}}; - $renderedfiles{$page}=[@{$items{dest}}]; - $pagecase{lc $page}=$page; - foreach my $k (grep /_/, keys %items) { - my ($id, $key)=split(/_/, $k, 2); - $pagestate{$page}{decode_entities($id)}{decode_entities($key)}=$items{$k}[0]; - } - } - $oldrenderedfiles{$page}=[@{$items{dest}}]; - $pagectime{$page}=$items{ctime}[0]; - } - - # saveindex relies on %hooks being populated, else it won't save - # the page state owned by a given hook. But no plugins are loaded - # by this program, so populate %hooks with all hook ids that - # currently have page state. - foreach my $page (keys %pagemtime) { - foreach my $id (keys %{$pagestate{$page}}) { - $hooks{_dummy}{$id}=1; - } - } - - return close($in); -} - -# Used to be in IkiWiki/UserInfo, but only used here now. -sub get_banned_users () { - my @ret; - my $userinfo=userinfo_retrieve(); - foreach my $user (keys %{$userinfo}) { - push @ret, $user if $userinfo->{$user}->{banned}; - } - return @ret; -} - -# Used to be in IkiWiki, but only used here (to migrate admin prefs into the -# setup file) now. -sub pagespec_merge ($$) { - my $a=shift; - my $b=shift; - - return $a if $a eq $b; - return "($a) or ($b)"; -} - -1 diff --git a/ikiwiki-transition.in b/ikiwiki-transition.in new file mode 100755 index 000000000..e3be645cc --- /dev/null +++ b/ikiwiki-transition.in @@ -0,0 +1,349 @@ +#!/usr/bin/perl +use warnings; +use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. +use IkiWiki; +use HTML::Entities; + +my $regex = qr{ + (\\?) # 1: escape? + \[\[(!?) # directive open; 2: optional prefix + ([-\w]+) # 3: command + ( # 4: the parameters (including initial whitespace) + \s+ + (?: + (?:[-\w]+=)? # named parameter key? + (?: + """.*?""" # triple-quoted value + | + "[^"]+" # single-quoted value + | + [^\s\]]+ # unquoted value + ) + \s* # whitespace or end + # of directive + ) + *) # 0 or more parameters + \]\] # directive closed +}sx; + +sub handle_directive { + my $escape = shift; + my $prefix = shift; + my $directive = shift; + my $args = shift; + + if (length $escape) { + return "${escape}[[${prefix}${directive}${args}]]" + } + if ($directive =~ m/^(if|more|table|template|toggleable)$/) { + $args =~ s{$regex}{handle_directive($1, $2, $3, $4)}eg; + } + return "[[!${directive}${args}]]" +} + +sub prefix_directives { + loadsetup(shift); + + IkiWiki::loadplugins(); + IkiWiki::checkconfig(); + IkiWiki::loadindex(); + + if (! %pagesources) { + error "ikiwiki has not built this wiki yet, cannot transition"; + } + + foreach my $page (values %pagesources) { + next unless defined pagetype($page) && + -f $config{srcdir}."/".$page; + my $content=readfile($config{srcdir}."/".$page); + my $oldcontent=$content; + $content=~s{$regex}{handle_directive($1, $2, $3, $4)}eg; + if ($oldcontent ne $content) { + writefile($page, $config{srcdir}, $content); + } + } +} + +sub indexdb { + setstatedir(shift); + + # Note: No lockwiki here because ikiwiki already locks it + # before calling this. + if (! IkiWiki::oldloadindex()) { + die "failed to load index\n"; + } + if (! IkiWiki::saveindex()) { + die "failed to save indexdb\n" + } + if (! IkiWiki::loadindex()) { + die "transition failed, cannot load new indexdb\n"; + } + if (! unlink("$config{wikistatedir}/index")) { + die "unlink failed: $!\n"; + } +} + +sub hashpassword { + setstatedir(shift); + + eval q{use IkiWiki::UserInfo}; + eval q{use Authen::Passphrase::BlowfishCrypt}; + if ($@) { + error("ikiwiki-transition hashpassword: failed to load Authen::Passphrase, passwords not hashed"); + } + + IkiWiki::lockwiki(); + IkiWiki::loadplugin("passwordauth"); + my $userinfo = IkiWiki::userinfo_retrieve(); + foreach my $user (keys %{$userinfo}) { + if (ref $userinfo->{$user} && + exists $userinfo->{$user}->{password} && + length $userinfo->{$user}->{password} && + ! exists $userinfo->{$user}->{cryptpassword}) { + IkiWiki::Plugin::passwordauth::setpassword($user, $userinfo->{$user}->{password}); + } + } +} + +sub aggregateinternal { + loadsetup(shift); + require IkiWiki::Plugin::aggregate; + IkiWiki::checkconfig(); + IkiWiki::Plugin::aggregate::migrate_to_internal(); +} + +sub setupformat { + my $setup=shift; + + loadsetup($setup); + IkiWiki::checkconfig(); + + # unpack old-format wrappers setting into new fields + my $cgi_seen=0; + my $rcs_seen=0; + foreach my $wrapper (@{$config{wrappers}}) { + if ($wrapper->{cgi}) { + if ($cgi_seen) { + die "don't know what to do with second cgi wrapper ".$wrapper->{wrapper}."\n"; + } + $cgi_seen++; + print "setting cgi_wrapper to ".$wrapper->{wrapper}."\n"; + $config{cgi_wrapper}=$wrapper->{wrapper}; + $config{cgi_wrappermode}=$wrapper->{wrappermode} + if exists $wrapper->{wrappermode}; + } + elsif ($config{rcs}) { + if ($rcs_seen) { + die "don't know what to do with second rcs wrapper ".$wrapper->{wrapper}."\n"; + } + $rcs_seen++; + print "setting $config{rcs}_wrapper to ".$wrapper->{wrapper}."\n"; + $config{$config{rcs}."_wrapper"}=$wrapper->{wrapper}; + $config{$config{rcs}."_wrappermode"}=$wrapper->{wrappermode} + if exists $wrapper->{wrappermode}; + } + else { + die "don't know what to do with wrapper ".$wrapper->{wrapper}."\n"; + } + } + + IkiWiki::Setup::dump($setup); +} + +sub moveprefs { + my $setup=shift; + + loadsetup($setup); + IkiWiki::checkconfig(); + + eval q{use IkiWiki::UserInfo}; + error $@ if $@; + + foreach my $field (qw{allowed_attachments locked_pages}) { + my $orig=$config{$field}; + foreach my $admin (@{$config{adminuser}}) { + my $a=IkiWiki::userinfo_get($admin, $field); + if (defined $a && length $a && + # might already have been moved + (! defined $orig || $a ne $orig)) { + if (defined $config{$field} && + length $config{$field}) { + $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a); + } + else { + $config{$field}=$a; + } + } + } + } + + my %banned=map { $_ => 1 } @{$config{banned_users}}, IkiWiki::get_banned_users(); + $config{banned_users}=[sort keys %banned]; + + IkiWiki::Setup::dump($setup); +} + +sub deduplinks { + loadsetup(shift); + IkiWiki::loadplugins(); + IkiWiki::checkconfig(); + IkiWiki::loadindex(); + foreach my $page (keys %links) { + my %l; + $l{$_}=1 foreach @{$links{$page}}; + $links{$page}=[keys %l] + } + IkiWiki::saveindex(); +} + +sub setstatedir { + my $dirorsetup=shift; + + if (! defined $dirorsetup) { + usage(); + } + + if (-d $dirorsetup) { + $config{wikistatedir}=$dirorsetup."/.ikiwiki"; + } + elsif (-f $dirorsetup) { + loadsetup($dirorsetup); + } + else { + error("ikiwiki-transition: $dirorsetup does not exist"); + } + + if (! -d $config{wikistatedir}) { + error("ikiwiki-transition: $config{wikistatedir} does not exist"); + } +} + +sub loadsetup { + my $setup=shift; + if (! defined $setup) { + usage(); + } + + require IkiWiki::Setup; + + %config = IkiWiki::defaultconfig(); + IkiWiki::Setup::load($setup); +} + +sub usage { + print STDERR "Usage: ikiwiki-transition type ...\n"; + print STDERR "Currently supported transition subcommands:\n"; + print STDERR "\tprefix_directives setupfile ...\n"; + print STDERR "\taggregateinternal setupfile\n"; + print STDERR "\tsetupformat setupfile\n"; + print STDERR "\tmoveprefs setupfile\n"; + print STDERR "\thashpassword setupfile|srcdir\n"; + print STDERR "\tindexdb setupfile|srcdir\n"; + print STDERR "\tdeduplinks setupfile\n"; + exit 1; +} + +usage() unless @ARGV; + +my $mode=shift; +if ($mode eq 'prefix_directives') { + prefix_directives(@ARGV); +} +elsif ($mode eq 'hashpassword') { + hashpassword(@ARGV); +} +elsif ($mode eq 'indexdb') { + indexdb(@ARGV); +} +elsif ($mode eq 'aggregateinternal') { + aggregateinternal(@ARGV); +} +elsif ($mode eq 'setupformat') { + setupformat(@ARGV); +} +elsif ($mode eq 'moveprefs') { + moveprefs(@ARGV); +} +elsif ($mode eq 'deduplinks') { + deduplinks(@ARGV); +} +else { + usage(); +} + +package IkiWiki; + +# A slightly modified version of the old loadindex function. +sub oldloadindex { + %oldrenderedfiles=%pagectime=(); + if (! $config{rebuild}) { + %pagesources=%pagemtime=%oldlinks=%links=%depends= + %destsources=%renderedfiles=%pagecase=%pagestate=(); + } + open (my $in, "<", "$config{wikistatedir}/index") || return; + while (<$in>) { + chomp; + my %items; + $items{link}=[]; + $items{dest}=[]; + foreach my $i (split(/ /, $_)) { + my ($item, $val)=split(/=/, $i, 2); + push @{$items{$item}}, decode_entities($val); + } + + next unless exists $items{src}; # skip bad lines for now + + my $page=pagename($items{src}[0]); + if (! $config{rebuild}) { + $pagesources{$page}=$items{src}[0]; + $pagemtime{$page}=$items{mtime}[0]; + $oldlinks{$page}=[@{$items{link}}]; + $links{$page}=[@{$items{link}}]; + $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT } if exists $items{depends}; + $destsources{$_}=$page foreach @{$items{dest}}; + $renderedfiles{$page}=[@{$items{dest}}]; + $pagecase{lc $page}=$page; + foreach my $k (grep /_/, keys %items) { + my ($id, $key)=split(/_/, $k, 2); + $pagestate{$page}{decode_entities($id)}{decode_entities($key)}=$items{$k}[0]; + } + } + $oldrenderedfiles{$page}=[@{$items{dest}}]; + $pagectime{$page}=$items{ctime}[0]; + } + + # saveindex relies on %hooks being populated, else it won't save + # the page state owned by a given hook. But no plugins are loaded + # by this program, so populate %hooks with all hook ids that + # currently have page state. + foreach my $page (keys %pagemtime) { + foreach my $id (keys %{$pagestate{$page}}) { + $hooks{_dummy}{$id}=1; + } + } + + return close($in); +} + +# Used to be in IkiWiki/UserInfo, but only used here now. +sub get_banned_users () { + my @ret; + my $userinfo=userinfo_retrieve(); + foreach my $user (keys %{$userinfo}) { + push @ret, $user if $userinfo->{$user}->{banned}; + } + return @ret; +} + +# Used to be in IkiWiki, but only used here (to migrate admin prefs into the +# setup file) now. +sub pagespec_merge ($$) { + my $a=shift; + my $b=shift; + + return $a if $a eq $b; + return "($a) or ($b)"; +} + +1 diff --git a/ikiwiki.spec b/ikiwiki.spec index 2bb87724d..532a91885 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100312 +Version: 3.20100324 Release: 1%{?dist} Summary: A wiki compiler -- cgit v1.2.3 From b66f9026177639d06ebbd1134886d37e2451b3a8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Apr 2010 15:09:04 -0400 Subject: fix buggy program installation code --- Makefile.PL | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 5a9028b51..38db20d44 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -29,6 +29,7 @@ W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out +scripts=ikiwiki-update-wikilist ikiwiki-makerepo %.out: %.in ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < $< > $@ @@ -116,8 +117,8 @@ extra_install: underlay_install install ikiwiki-w3m.cgi $(DESTDIR)$(W3M_CGI_BIN) install -d $(DESTDIR)$(PREFIX)/bin - for prog in $(outprogs); do \ - install $$prog $(DESTDIR)$(PREFIX)/bin/$$(shell echo $$prog | sed 's/\.out//'); \ + for prog in $(outprogs) $(scripts); do \ + install $$prog $(DESTDIR)$(PREFIX)/bin/$$(echo $$prog | sed 's/\.out//'); \ done $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) -- cgit v1.2.3 From 5bc7efab7cc7a437d3d593a3ff62595ed0ab7f81 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 23:00:33 -0400 Subject: switch to PERL5LIB so that use lib inserted for INSTALL_BASE is overridden during build --- Makefile.PL | 6 +++--- doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 38db20d44..794a2ed47 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -36,7 +36,7 @@ scripts=ikiwiki-update-wikilist ikiwiki-makerepo chmod +x $@ ikiwiki.setup: ikiwiki.out - HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup + PERL5LIB=. HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -dumpsetup ikiwiki.setup extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man @@ -50,10 +50,10 @@ extra_build: $(outprogs) ikiwiki.setup docwiki rm -f ikiwiki.spec.bkp docwiki: ikiwiki.out - $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh + PERL5LIB=. $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -setup docwiki.setup -refresh extra_clean: - $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean + PERL5LIB=. $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -clean rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean diff --git a/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn index b11972165..7b252031b 100644 --- a/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn +++ b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn @@ -24,3 +24,8 @@ if I first remove the old ikiwiki installation, nor does it fail with 3.20100403 or newer installed at /opt/ikiwiki. Hence this is not really a critical bug, although it's somewhat perplexing to me why it ought to make a difference. + +> So, using INSTALL_BASE causes a 'use lib' to be hardcoded into the `.out` +> files; which overrides the -libdir and the -I, and so the old version +> of IkiWiki.pm is used. +> [[fixed|done]] --[[Joey]] -- cgit v1.2.3 From aaf1d98ebe08271abee8b55f76e5a59183894acb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 23:14:57 -0400 Subject: better fix for use lib issue PER5LIB does not override fully, so need to run .in versions --- Makefile.PL | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 794a2ed47..b079886ac 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -35,8 +35,8 @@ scripts=ikiwiki-update-wikilist ikiwiki-makerepo ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < $< > $@ chmod +x $@ -ikiwiki.setup: ikiwiki.out - PERL5LIB=. HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -dumpsetup ikiwiki.setup +ikiwiki.setup: + HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -dumpsetup ikiwiki.setup extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man @@ -49,11 +49,11 @@ extra_build: $(outprogs) ikiwiki.setup docwiki sed -i.bkp "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/' Date: Fri, 23 Apr 2010 16:40:42 -0400 Subject: add myclean --- Makefile.PL | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 38db20d44..09ec2e730 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -57,6 +57,10 @@ extra_clean: rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean +# Joey uses this before committing. +myclean: clean + git checkout po ikiwiki.spec + underlay_install: install -d $(DESTDIR)$(PREFIX)/share/ikiwiki for dir in `cd underlays && find . -follow -type d ! -regex '.*\.svn.*'`; do \ -- cgit v1.2.3 From 062ed44f47d61c3bbbf2e8a7944a9b4e423b735a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 16 Jun 2010 15:43:42 -0400 Subject: add theme plugin --- IkiWiki/Plugin/theme.pm | 37 ++++ Makefile.PL | 14 +- debian/changelog | 1 + doc/plugins/theme.pm | 11 + themes/actiontabs/style.css | 123 +++++++++++ themes/bzed/background_darkness.png | Bin 0 -> 165 bytes themes/bzed/style.css | 280 ++++++++++++++++++++++++++ underlays/themes/actiontabs/style.css | 123 ----------- underlays/themes/bzed/background_darkness.png | Bin 165 -> 0 bytes underlays/themes/bzed/style.css | 280 -------------------------- 10 files changed, 465 insertions(+), 404 deletions(-) create mode 100644 IkiWiki/Plugin/theme.pm create mode 100644 doc/plugins/theme.pm create mode 100644 themes/actiontabs/style.css create mode 100644 themes/bzed/background_darkness.png create mode 100644 themes/bzed/style.css delete mode 100644 underlays/themes/actiontabs/style.css delete mode 100644 underlays/themes/bzed/background_darkness.png delete mode 100644 underlays/themes/bzed/style.css (limited to 'Makefile.PL') diff --git a/IkiWiki/Plugin/theme.pm b/IkiWiki/Plugin/theme.pm new file mode 100644 index 000000000..5e6e4b092 --- /dev/null +++ b/IkiWiki/Plugin/theme.pm @@ -0,0 +1,37 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::theme; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "theme", call => \&getsetup); + hook(type => "checkconfig", id => "theme", call => \&checkconfig); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 0, + section => "web", + }, + theme => { + type => "string", + example => "actiontabs", + description => "name of theme to enable", + safe => 1, + rebuild => 0, + }, +} + +my $added=0; +sub checkconfig () { + if (! $added && exists $config{theme} && $config{theme} =~ /^\w+$/) { + add_underlay("themes/".$config{theme}); + $added=1; + } +} + +1 diff --git a/Makefile.PL b/Makefile.PL index 4001c841b..29ec9c209 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -78,7 +78,19 @@ underlay_install: install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \ fi \ done - + + # Themes have their style.css appended to the normal one. + for theme in themes/*; do \ + install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme; \ + for file in $$theme/*; do \ + if echo "$$file" | grep -q style.css; then \ + (cat doc/style.css; cat $$file) >> $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ + elif [ -f "$$file" ]; then \ + install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file; \ + fi \ + done; \ + done + extra_install: underlay_install # Install example sites. for dir in `cd doc/examples; find . -type d ! -regex '.*\.svn.*'`; do \ diff --git a/debian/changelog b/debian/changelog index 1f350912e..0d49df676 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ ikiwiki (3.20100611) UNRELEASED; urgency=low * git: Gix --gettime to properly support utf8 filenames. * attachment: Support Windows paths when taking basename of client-supplied file name. + * theme: New plugin, allows easily theming a site via the underlay. -- Joey Hess Fri, 11 Jun 2010 13:39:15 -0400 diff --git a/doc/plugins/theme.pm b/doc/plugins/theme.pm new file mode 100644 index 000000000..7149cc163 --- /dev/null +++ b/doc/plugins/theme.pm @@ -0,0 +1,11 @@ +[[!template id=plugin name=theme author="[[Joey]]"]] +[[!tag type/web]] + +The theme plugin allows easily applying a theme to your wiki, by +configuring the `theme` setting in the setup file with the name of a theme +to use. The themes you can choose from are all subdirectories, typically +inside `/usr/share/ikiwiki/themes/`. + +A theme provides, via the underlay, an enhanced version of the regular +[[style.css]]. This leaves [[local.css]] free for you to further +customise. Themes can also provide header and background images. diff --git a/themes/actiontabs/style.css b/themes/actiontabs/style.css new file mode 100644 index 000000000..f48448e2e --- /dev/null +++ b/themes/actiontabs/style.css @@ -0,0 +1,123 @@ +/* actiontabs theme for ikiwiki + * + * by svend + */ + +a { + text-decoration: none; + color: #005a9c; +} + +a:hover { + text-decoration: underline; +} + + +hr { + border-style: none; + background-color: #999; + height: 1px; +} + +code, pre { + background: #eee; +} + +pre { + padding: .5em; +} + +body { + margin: 0; + padding: 0; + font-family: sans-serif; + color: black; + background: white; +} + +.pageheader { + margin: 0; + padding: 1em 2em 0 2em; + background: #eee; + border-color: #999; + border-style: none none solid none; + border-width: 1px; +} + +.header { + font-size: 100%; + font-weight: normal; +} + +.title { + display: block; + margin-top: .2em; + font: 140% sans-serif; + text-transform: capitalize; +} + +.actions { + text-align: right; + padding: 0; +} + +#content, #comments, #footer { + margin: 1em 2em; +} + +#pageinfo { + border-color: #999; +} + +.inlinepage { + margin: .4em 0; + padding: .4em 0; + border-style: none; + border-top: 1px solid #aaa; +} + +.inlineheader { + font-size: 120%; + font-weight: normal; +} + +h1 { font: 120% sans-serif } +h2 { font: bold 100% sans-serif } +h3 { font: italic 100% sans-serif } +h4, h5, h6 { font: small-caps 100% sans-serif } + +/* Smaller headings for inline pages */ +.inlinepage h1 { font-size: 110% } +.inlinepage h2 { font-size: 100% } +.inlinepage h3 { font-size: 100% } + +.pageheader .actions ul { + border-style: none +} + +.actions ul { + font-size: 75%; + padding: 0; + border-style: none; +} + +.actions ul li a { + text-decoration: none; +} + +.actions ul li { + margin: 0; + padding: .1em .5em 0 .5em; + background: white; + border-color: #999; + border-style: solid solid none solid; + border-width: 1px; +} + +div.recentchanges { + border-style: none; +} + +.pagecloud { + width: auto; +} diff --git a/themes/bzed/background_darkness.png b/themes/bzed/background_darkness.png new file mode 100644 index 000000000..0a1cb4e9e Binary files /dev/null and b/themes/bzed/background_darkness.png differ diff --git a/themes/bzed/style.css b/themes/bzed/style.css new file mode 100644 index 000000000..540cac415 --- /dev/null +++ b/themes/bzed/style.css @@ -0,0 +1,280 @@ +/* bzed theme for ikiwiki + * + * Copyright (C) 2010 Bernd Zeimetz + * Licensed under same license as ikiwiki: GPL v2 or later + * + * Parts of this file are based on the awesome YUI, + * these parts will stay under the BSD license, + * but you're free to apply the GPLv2 to them, of course. + */ + + + +/* ------------------------------------------------------------------------------------------------- +Based on reset-fonts-grids.css from yui. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.1 +*/ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,legend,p,blockquote,th,td{margin:0;padding:0;} +table{border-collapse:collapse;border-spacing:0;} +img{border:0;} +address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;} +li{list-style:none;} +caption,th{text-align:left;} +h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} +q:before,q:after{content:'';} +abbr,acronym {border:0;font-variant:normal;} +sup {vertical-align:text-top;} +sub {vertical-align:text-bottom;} +input,textarea,select{font-family:inherit;font-size: 13px/1.23;font-weight:normal;} +input,textarea,select{*font-size:100%;} +legend{color:#000;} +/* body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} */ +body {font:13px/1.231 "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;*font-size:small;*font:x-small;} +table {font-size:inherit;font:100%;} +pre,code,kbd,samp,tt{font-family:monospace;} + + +body{text-align:left;} +.inlinefooter{clear:both;} + +/* #doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;} */ +.page {margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;} + +/* #doc3{margin:auto 10px;width:auto;} */ +.page {margin:auto 10px;width:auto;} + +#pagebody, .sidebar{position:relative;} +#pagebody, .sidebar{_position:static;} +#pagebody {position:static;} +.sidebar {float:right;width:16.5em;*width:16em;} +#pagebody {margin-right:19em;*margin-right:18.5em;} +/* #content {float:none;width:auto;} */ +#pagebody:after, .sidebar:after, .page:after{content:".";display:block;height:0;clear:both;visibility:hidden;} +.page f{zoom:1;} + +/* ------------------------------------------------------------------------------------------------ + * Taken from base.css, part of YUI's CSS Foundation + * Copyright (c) 2008, Yahoo! Inc. All rights reserved. + * Code licensed under the BSD License: + * http://developer.yahoo.net/yui/license.txt + * version: 2.5.1 +*/ +h1 { + /*18px via YUI Fonts CSS foundation*/ + font-size:138.5%; +} +h2 { + /*16px via YUI Fonts CSS foundation*/ + font-size:123.1%; +} +h3 { + /*14px via YUI Fonts CSS foundation*/ + font-size:108%; +} +h1,h2,h3 { + /* top & bottom margin based on font size */ + margin:1em 0; +} +h1,h2,h3,h4,h5,h6,strong { + /*bringing boldness back to headers and the strong element*/ + font-weight:bold; +} +abbr,acronym { + /*indicating to users that more info is available */ + border-bottom:1px dotted #000; + cursor:help; +} +em { + /*bringing italics back to the em element*/ + font-style:italic; +} +blockquote,ul,ol,dl { + /*giving blockquotes and lists room to breath*/ + margin:1em; +} +ol,ul,dl { + /*bringing lists on to the page with breathing room */ + margin-left:2em; +} +ol li { + /*giving OL's LIs generated numbers*/ + list-style: decimal outside; +} +ul li { + /*giving UL's LIs generated disc markers*/ + list-style: disc outside; +} +dl dd { + /*giving UL's LIs generated numbers*/ + margin-left:1em; +} +th,td { + /*borders and padding to make the table readable*/ + border:1px solid #000; + padding:.5em; +} +th { + /*distinguishing table headers from data cells*/ + font-weight:bold; + text-align:center; +} +caption { + /*coordinated margin to match cell's padding*/ + margin-bottom:.5em; + /*centered so it doesn't blend in to other content*/ + text-align:center; +} +p,fieldset,table,pre { + /*so things don't run into each other*/ + margin-bottom:1em; +} + +#searchbox { + width:21.5em;*width:21em; +} + + + +/* ------------------------------------------------------------------------------------------------ + * All CSS below is + * Copyright (C) 2010 Bernd Zeimetz + * Licensed under same license as ikiwiki: GPL v2 or later */ + +.page, .pageheader, .sidebar, #content, #comments, .inlinepage, .recentchanges, .pageheader .actions ul, #pagebody { + border: none; +} + +html, body { + color:#000; + /* background-image: url('body_background.png'); + background-repeat: repeat; */ + background-color: #8da1b8; +} + +body { + padding-left: 5%; + padding-right: 5%; + padding-top: 1em; + padding-bottom: 1em; +} + +.page { + background: #fff; + border: outset #ccc; + padding-left: 1em; + padding-right: 1em; + padding-top: 1em; +} + +.pageheader { + background-image: url('header_background.png'); + background-repeat: repeat-x; + height: 100px; + padding-left: 1em; + padding-right: 1em; + padding-bottom: 1em; + padding-top: 1em; +} + +.pageheader .header { + text-align: top; + clear: both; +} + +.pageheader .header form { + padding: 0em 0em 0em 0em; + float: right; + margin-top: 0.5em; +} + +.pageheader .header .title, .pageheader .header .parentlinks, + .inlinepage .inlineheader, + h1, h2, h3, h4, h5, h6 { + margin-top: 1em; + font-weight: bold; +} + +.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span { + padding: 0.25em 0.25em 0.25em 0.25em; + background-image: url('background_darkness.png'); + background-repeat: repeat; + color: white; +} + +.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a { + color: white; + text-decoration: none; +} + +.pageheader .actions { + text-align: right; + vertical-align: bottom; + clear: both; +} + +#pagebody { + padding-right: 1em; + padding-bottom: 2em; + border-right: ridge #eee; + clear: none; +} + +#content a, #comments a, .sidebar a { + color: #315485; + text-decoration: none; + font-weight: bold; +} + +.sidebar h2 { + border-bottom: ridge #eee; + padding-right: 0; +} + +.sidebar .menu { + margin-left: 1em; +} + + +.inlinepage, .recentchanges, div.recentchanges { + clear: none !important; + margin-bottom: 2em; +} + +.inlinefooter { + border-top: 1px dotted #315485; +} + +.inlinefooter .pagedate, .inlinefooter .tags { + display: inline; + clear: none; + margin-right: 2em; +} + +.calendar .month-calendar th, .calendar .month-calendar td { + padding: 0.22em; +} + +@media print { + .sidebar, .page .pageheader .header .parentlinks { + content:"."; + display:block; + height:0; + visibility:hidden; + } + .page { + padding: 1em 1em 1em 1em; + } + .pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a { + color #315485; + } + #content, #comments, #pagebody { + margin-right: 0; + *margin-right: 0; + border-right: none; + } + +} + diff --git a/underlays/themes/actiontabs/style.css b/underlays/themes/actiontabs/style.css deleted file mode 100644 index f48448e2e..000000000 --- a/underlays/themes/actiontabs/style.css +++ /dev/null @@ -1,123 +0,0 @@ -/* actiontabs theme for ikiwiki - * - * by svend - */ - -a { - text-decoration: none; - color: #005a9c; -} - -a:hover { - text-decoration: underline; -} - - -hr { - border-style: none; - background-color: #999; - height: 1px; -} - -code, pre { - background: #eee; -} - -pre { - padding: .5em; -} - -body { - margin: 0; - padding: 0; - font-family: sans-serif; - color: black; - background: white; -} - -.pageheader { - margin: 0; - padding: 1em 2em 0 2em; - background: #eee; - border-color: #999; - border-style: none none solid none; - border-width: 1px; -} - -.header { - font-size: 100%; - font-weight: normal; -} - -.title { - display: block; - margin-top: .2em; - font: 140% sans-serif; - text-transform: capitalize; -} - -.actions { - text-align: right; - padding: 0; -} - -#content, #comments, #footer { - margin: 1em 2em; -} - -#pageinfo { - border-color: #999; -} - -.inlinepage { - margin: .4em 0; - padding: .4em 0; - border-style: none; - border-top: 1px solid #aaa; -} - -.inlineheader { - font-size: 120%; - font-weight: normal; -} - -h1 { font: 120% sans-serif } -h2 { font: bold 100% sans-serif } -h3 { font: italic 100% sans-serif } -h4, h5, h6 { font: small-caps 100% sans-serif } - -/* Smaller headings for inline pages */ -.inlinepage h1 { font-size: 110% } -.inlinepage h2 { font-size: 100% } -.inlinepage h3 { font-size: 100% } - -.pageheader .actions ul { - border-style: none -} - -.actions ul { - font-size: 75%; - padding: 0; - border-style: none; -} - -.actions ul li a { - text-decoration: none; -} - -.actions ul li { - margin: 0; - padding: .1em .5em 0 .5em; - background: white; - border-color: #999; - border-style: solid solid none solid; - border-width: 1px; -} - -div.recentchanges { - border-style: none; -} - -.pagecloud { - width: auto; -} diff --git a/underlays/themes/bzed/background_darkness.png b/underlays/themes/bzed/background_darkness.png deleted file mode 100644 index 0a1cb4e9e..000000000 Binary files a/underlays/themes/bzed/background_darkness.png and /dev/null differ diff --git a/underlays/themes/bzed/style.css b/underlays/themes/bzed/style.css deleted file mode 100644 index 540cac415..000000000 --- a/underlays/themes/bzed/style.css +++ /dev/null @@ -1,280 +0,0 @@ -/* bzed theme for ikiwiki - * - * Copyright (C) 2010 Bernd Zeimetz - * Licensed under same license as ikiwiki: GPL v2 or later - * - * Parts of this file are based on the awesome YUI, - * these parts will stay under the BSD license, - * but you're free to apply the GPLv2 to them, of course. - */ - - - -/* ------------------------------------------------------------------------------------------------- -Based on reset-fonts-grids.css from yui. -Copyright (c) 2008, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.5.1 -*/ -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,legend,p,blockquote,th,td{margin:0;padding:0;} -table{border-collapse:collapse;border-spacing:0;} -img{border:0;} -address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;} -li{list-style:none;} -caption,th{text-align:left;} -h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} -q:before,q:after{content:'';} -abbr,acronym {border:0;font-variant:normal;} -sup {vertical-align:text-top;} -sub {vertical-align:text-bottom;} -input,textarea,select{font-family:inherit;font-size: 13px/1.23;font-weight:normal;} -input,textarea,select{*font-size:100%;} -legend{color:#000;} -/* body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} */ -body {font:13px/1.231 "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;*font-size:small;*font:x-small;} -table {font-size:inherit;font:100%;} -pre,code,kbd,samp,tt{font-family:monospace;} - - -body{text-align:left;} -.inlinefooter{clear:both;} - -/* #doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;} */ -.page {margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;} - -/* #doc3{margin:auto 10px;width:auto;} */ -.page {margin:auto 10px;width:auto;} - -#pagebody, .sidebar{position:relative;} -#pagebody, .sidebar{_position:static;} -#pagebody {position:static;} -.sidebar {float:right;width:16.5em;*width:16em;} -#pagebody {margin-right:19em;*margin-right:18.5em;} -/* #content {float:none;width:auto;} */ -#pagebody:after, .sidebar:after, .page:after{content:".";display:block;height:0;clear:both;visibility:hidden;} -.page f{zoom:1;} - -/* ------------------------------------------------------------------------------------------------ - * Taken from base.css, part of YUI's CSS Foundation - * Copyright (c) 2008, Yahoo! Inc. All rights reserved. - * Code licensed under the BSD License: - * http://developer.yahoo.net/yui/license.txt - * version: 2.5.1 -*/ -h1 { - /*18px via YUI Fonts CSS foundation*/ - font-size:138.5%; -} -h2 { - /*16px via YUI Fonts CSS foundation*/ - font-size:123.1%; -} -h3 { - /*14px via YUI Fonts CSS foundation*/ - font-size:108%; -} -h1,h2,h3 { - /* top & bottom margin based on font size */ - margin:1em 0; -} -h1,h2,h3,h4,h5,h6,strong { - /*bringing boldness back to headers and the strong element*/ - font-weight:bold; -} -abbr,acronym { - /*indicating to users that more info is available */ - border-bottom:1px dotted #000; - cursor:help; -} -em { - /*bringing italics back to the em element*/ - font-style:italic; -} -blockquote,ul,ol,dl { - /*giving blockquotes and lists room to breath*/ - margin:1em; -} -ol,ul,dl { - /*bringing lists on to the page with breathing room */ - margin-left:2em; -} -ol li { - /*giving OL's LIs generated numbers*/ - list-style: decimal outside; -} -ul li { - /*giving UL's LIs generated disc markers*/ - list-style: disc outside; -} -dl dd { - /*giving UL's LIs generated numbers*/ - margin-left:1em; -} -th,td { - /*borders and padding to make the table readable*/ - border:1px solid #000; - padding:.5em; -} -th { - /*distinguishing table headers from data cells*/ - font-weight:bold; - text-align:center; -} -caption { - /*coordinated margin to match cell's padding*/ - margin-bottom:.5em; - /*centered so it doesn't blend in to other content*/ - text-align:center; -} -p,fieldset,table,pre { - /*so things don't run into each other*/ - margin-bottom:1em; -} - -#searchbox { - width:21.5em;*width:21em; -} - - - -/* ------------------------------------------------------------------------------------------------ - * All CSS below is - * Copyright (C) 2010 Bernd Zeimetz - * Licensed under same license as ikiwiki: GPL v2 or later */ - -.page, .pageheader, .sidebar, #content, #comments, .inlinepage, .recentchanges, .pageheader .actions ul, #pagebody { - border: none; -} - -html, body { - color:#000; - /* background-image: url('body_background.png'); - background-repeat: repeat; */ - background-color: #8da1b8; -} - -body { - padding-left: 5%; - padding-right: 5%; - padding-top: 1em; - padding-bottom: 1em; -} - -.page { - background: #fff; - border: outset #ccc; - padding-left: 1em; - padding-right: 1em; - padding-top: 1em; -} - -.pageheader { - background-image: url('header_background.png'); - background-repeat: repeat-x; - height: 100px; - padding-left: 1em; - padding-right: 1em; - padding-bottom: 1em; - padding-top: 1em; -} - -.pageheader .header { - text-align: top; - clear: both; -} - -.pageheader .header form { - padding: 0em 0em 0em 0em; - float: right; - margin-top: 0.5em; -} - -.pageheader .header .title, .pageheader .header .parentlinks, - .inlinepage .inlineheader, - h1, h2, h3, h4, h5, h6 { - margin-top: 1em; - font-weight: bold; -} - -.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span { - padding: 0.25em 0.25em 0.25em 0.25em; - background-image: url('background_darkness.png'); - background-repeat: repeat; - color: white; -} - -.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a { - color: white; - text-decoration: none; -} - -.pageheader .actions { - text-align: right; - vertical-align: bottom; - clear: both; -} - -#pagebody { - padding-right: 1em; - padding-bottom: 2em; - border-right: ridge #eee; - clear: none; -} - -#content a, #comments a, .sidebar a { - color: #315485; - text-decoration: none; - font-weight: bold; -} - -.sidebar h2 { - border-bottom: ridge #eee; - padding-right: 0; -} - -.sidebar .menu { - margin-left: 1em; -} - - -.inlinepage, .recentchanges, div.recentchanges { - clear: none !important; - margin-bottom: 2em; -} - -.inlinefooter { - border-top: 1px dotted #315485; -} - -.inlinefooter .pagedate, .inlinefooter .tags { - display: inline; - clear: none; - margin-right: 2em; -} - -.calendar .month-calendar th, .calendar .month-calendar td { - padding: 0.22em; -} - -@media print { - .sidebar, .page .pageheader .header .parentlinks { - content:"."; - display:block; - height:0; - visibility:hidden; - } - .page { - padding: 1em 1em 1em 1em; - } - .pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a { - color #315485; - } - #content, #comments, #pagebody { - margin-right: 0; - *margin-right: 0; - border-right: none; - } - -} - -- cgit v1.2.3 From 3789bce105120b2571665c71b3bd20ec7dbf9c9c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 16 Jun 2010 15:48:50 -0400 Subject: preserve timestamps for directive and theme underlays --- Makefile.PL | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 29ec9c209..4b2e28544 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -75,6 +75,7 @@ underlay_install: install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive for file in doc/ikiwiki/directive/*; do \ if [ -f "$$file" ]; then \ + cp -aL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive 2>/dev/null || \ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \ fi \ done @@ -86,6 +87,7 @@ underlay_install: if echo "$$file" | grep -q style.css; then \ (cat doc/style.css; cat $$file) >> $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ elif [ -f "$$file" ]; then \ + cp -aL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file 2>/dev/null || \ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file; \ fi \ done; \ -- cgit v1.2.3