Koha/debian/koha-common.install
Tomas Cohen Arazi 4e7734ce33 Bug 16016: Sitemap handling scripts for packages
This patch introduces the koha-sitemap script. This script wraps calls to
the misc/cronjobs/sitemap.pl script so it can be done easily instance-wise.

It sets /var/lib/koha/${instance}/sitemap as the destination directory for
the sitemap files. A followup will make them available through an Apache
configuration entry.

koha-functions.sh is provided with a handy is_sitemap_enabled function so
we can later add filters to other commands (koha-list, koha-foreach, etc).

Exposes sitemap files to apache. This is suitable for including the sitemap in
the robots.txt file as proposed in

  http://www.sitemaps.org/protocol.html#submit_robots

Note: it depends on Apache 2.4+ so we can patch the file as needed. Older
Apache users will be warned that they need to tweak the apache files on their
own.

To test:
- You can build a package out of this patchset, or do the following on a kohadevbox
  cp debian/scripts/koha-functions.sh /usr/share/koha/bin
- Run
  $ debian/scripts/koha-sitemap --help
- Go through all the options (--enable, --disable, generate).
(a) --enable:
  - debian/scripts/koha-sitemap --enable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is created
  - call it again, a suitable warning is raised and the file is still there
(b) debian/scripts/koha-sitemap --disable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is deleted
  - call it again, a suitable warning is raised and the file does not exist
(c) --generate:
  - debian/scripts/koha-sitemap --generate kohadev
=> SUCCESS: sitemapindex.xml and sitemap000X.xml files are generated in
            /var/lib/koha/kohadev/sitemap/
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:34:21 +00:00

41 lines
2.1 KiB
Text

debian/tmp/usr/* usr
debian/tmp/etc/koha/searchengine
debian/tmp/etc/koha/pazpar2
debian/tmp/etc/koha/zebradb/[!z]*
debian/templates/* etc/koha
debian/koha-post-install-setup usr/sbin
debian/unavailable.html usr/share/koha/intranet/htdocs
debian/unavailable.html usr/share/koha/opac/htdocs
debian/templates/* etc/koha
debian/scripts/koha-functions.sh usr/share/koha/bin
debian/scripts/koha-create usr/sbin
debian/scripts/koha-create-dirs usr/sbin
debian/scripts/koha-disable usr/sbin
debian/scripts/koha-dump usr/sbin
debian/scripts/koha-dump-defaults usr/sbin
debian/scripts/koha-email-disable usr/sbin
debian/scripts/koha-email-enable usr/sbin
debian/scripts/koha-enable usr/sbin
debian/scripts/koha-foreach usr/sbin
debian/scripts/koha-indexer usr/sbin
debian/scripts/koha-list usr/sbin
debian/scripts/koha-mysql usr/sbin
debian/scripts/koha-passwd usr/sbin
debian/scripts/koha-plack usr/sbin
debian/scripts/koha-rebuild-zebra usr/sbin
debian/scripts/koha-remove usr/sbin
debian/scripts/koha-reset-passwd usr/sbin
debian/scripts/koha-restart-zebra usr/sbin
debian/scripts/koha-restore usr/sbin
debian/scripts/koha-run-backups usr/sbin
debian/scripts/koha-shell usr/sbin
debian/scripts/koha-sitemap usr/sbin
debian/scripts/koha-start-zebra usr/sbin
debian/scripts/koha-stop-zebra usr/sbin
debian/scripts/koha-translate usr/sbin
debian/scripts/koha-upgrade-schema usr/sbin
debian/scripts/koha-upgrade-to-3.4 usr/sbin
debian/scripts/koha-start-sip usr/sbin
debian/scripts/koha-stop-sip usr/sbin
debian/scripts/koha-enable-sip usr/sbin
debian/tmp_docbook/*.8 usr/share/man/man8