Koha/debian
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
..
docs Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
scripts Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
source
templates Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
bd-to-depends Bug 4847: Remove the python dependency for package builds 2015-03-25 11:22:49 -03:00
build-git-snapshot Bug 16396: Update package version for master packages 2016-05-03 15:23:05 +00:00
changelog Changelog update for 3.22.00~beta 2015-11-17 23:41:16 -03:00
compat
control Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
control.in Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
copyright
koha-common.bash-completion Bug 14727: koha-indexer tab completion in bash 2015-10-13 11:37:55 -03:00
koha-common.config Bug 11404: (follow-up) only ask user if there are instances needing upgrading 2014-05-19 21:51:33 +00:00
koha-common.cron.d Bug 8773 - Start per-instance koha-index-daemon in .deb setup 2014-07-14 09:15:22 -03:00
koha-common.cron.daily Bug 14840: Added new cron script send membership expiry reminder notices in crontab.example file 2015-10-06 11:21:18 -03:00
koha-common.cron.hourly
koha-common.cron.monthly Bug 13585: Add a cronjob which send UsageStats monthly. 2015-09-07 10:47:06 -03:00
koha-common.default [SIGNED-OFF] Bug 16190: Enable the indexer daemon by default 2016-04-19 17:50:17 +00:00
koha-common.dirs
koha-common.docs Bug 10802: make Debian package install history.txt 2013-09-16 15:27:16 +00:00
koha-common.init Bug 13791: make koha-common init script aware of plack 2015-08-24 13:00:41 -03:00
koha-common.install Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
koha-common.logrotate Bug 16138: Restart plack when rotating logfiles 2016-04-01 18:47:01 +00:00
koha-common.postinst Bug 14106: (QA followup) avoid failures if no instances created 2015-05-22 12:28:14 -03:00
koha-common.preinst Bug 14068: fix preinst for fresh package installs 2015-04-29 15:14:10 -03:00
koha-common.README.Debian
koha-common.templates Bug 11404: Make the install process aware of the changes 2014-05-19 21:50:54 +00:00
koha-post-install-setup
koha.apache-ports
koha.config
koha.dirs
koha.install Bug 7818 : Following, fixing so the packages build Still need to update koha-create to make use of the new file 2012-07-06 11:17:19 +02:00
koha.postinst
koha.postrm
koha.prerm
koha.README.Debian
list-deps Bug 12393 - Depend on SSL module for LWP, for OverDrive 2014-06-22 20:35:46 -03:00
README.build Bug 5602: Changes to account for the version update. 2011-08-04 10:26:39 +12:00
rules Bug 14167: remove the log4perl.conf file from /etc for packages 2015-07-24 12:54:23 -03:00
unavailable.html
update-control

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.