diff --git a/debian/build-git-snapshot b/debian/build-git-snapshot new file mode 100755 index 0000000000..41f9d857d3 --- /dev/null +++ b/debian/build-git-snapshot @@ -0,0 +1,59 @@ +#!/bin/sh +# +# This script will build a .deb from a git snapshot of koha. +# Don't use it for building actual versions for uploading to Debian. +# +# To use: +# - commit any changes into git +# - run this script + +set -e + +die() +{ + echo "$@" + exit 1 +} + +everything_is_commited() +{ + if git status --short | grep -q '^' + then + return 1 + else + return 0 + fi +} + +latest_sha1() { + git rev-parse --short=8 HEAD +} + +newversion() { + printf '3.2.git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1) +} + +adjust_debian_changelog() { + dch -v "$1-1" "Building git snapshot." + dch -r "Building git snapshot." +} + +reset_debian_changelog() { + git checkout -- debian/changelog +} + +build_package() { + git archive --format=tar --prefix="koha-$1/" HEAD | + gzip -9 > "../koha_$1.orig.tar.gz" + debuild -us -uc +} + +if ! everything_is_commited +then + die "cannot build: uncommited changes" +fi + +version="$(newversion)" +adjust_debian_changelog "$version" +build_package "$version" +reset_debian_changelog diff --git a/debian/changelog b/debian/changelog index 31b50d61ab..e59e8d5c0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,23 +1,5 @@ -libkoha-perl (3.0.0-04) testing; urgency=low +koha (3.01.00.128-1~) squeeze; urgency=low - * More bugfixing, close to stable release soon + * Initial release. - -- Chris Cormack Sun, 10 Aug 2008 11:13:16 +1200 - -libkoha-perl (3.0.0-03) unstable; urgency=low - - * Fixes 2743, 2451, 2411 - - -- Chris Cormack Wed, 06 Aug 2008 09:02:31 +1200 - -libkoha-perl (3.0.0-02) unstable; urgency=low - - * Fixes bugs, 2549,2457,2456,2437,2417,1679,2451, and new help files - - -- Chris Cormack Tue, 05 Aug 2008 10:21:10 +1200 - -libkoha-perl (3.0.0-01) unstable; urgency=low - - * Initial Release. - - -- Chris Cormack Sun, 03 Aug 2008 21:22:32 +1200 + -- Lars Wirzenius Mon, 12 Apr 2010 12:55:38 +1200 diff --git a/debian/compat b/debian/compat index 7ed6ff82de..7f8f011eb7 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 diff --git a/debian/control b/debian/control index 775bcc5e8c..567ae57029 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,27 @@ -Source: libkoha-perl -Section: perl +Source: koha +Maintainer: Lars Wirzenius +Section: web Priority: optional -Maintainer: chris@bigballofwax.co.nz -Build-Depends: debhelper (>= 5.0.0) -Build-Depends-Indep: perl (>= 5.8.8-12) +Standards-Version: 3.8.4 +Build-Depends: koha-dev-env, debhelper (>= 7.0.50), gettext - -Package: libkoha-perl +Package: koha Architecture: all -Depends: libalgorithm-checkdigits-perl (>= 0.50) | cpan-libalgorithm-checkdigits-perl (>= 0.50), libansicolor-perl (>= 1.10) | cpan-libansicolor-perl (>= 1.10), libbiblio-endnotestyle-perl (>= 0.05) | cpan-libbiblio-endnotestyle-perl (>= 0.05), libcgi-perl (>= 3.15) | cpan-libcgi-perl (>= 3.15), libcgi-session-perl (>= 4.20) | cpan-libcgi-session-perl (>= 4.20), libclass-accessor-perl (>= 0.31) | cpan-libclass-accessor-perl (>= 0.31), libclass-factory-util-perl (>= 1.7) | cpan-libclass-factory-util-perl (>= 1.7), libdata-dumper-perl (>= 2.121) | cpan-libdata-dumper-perl (>= 2.121), libdata-ical-perl (>= 0.13) | cpan-libdata-ical-perl (>= 0.13), libdate-calc-perl (>= 5.4) | cpan-libdate-calc-perl (>= 5.4), libdate-ical-perl (>= 1.72) | cpan-libdate-ical-perl (>= 1.72), libdate-manip-perl (>= 5.48) | cpan-libdate-manip-perl (>= 5.48), libdbd-mysql-perl (>= 4.005) | cpan-libdbd-mysql-perl (>= 4.005), libdbi-perl (>= 1.601) | cpan-libdbi-perl (>= 1.601), libdigest-md5-perl (>= 2.36) | cpan-libdigest-md5-perl (>= 2.36), libgd-barcode-perl (>= 1.15) | cpan-libgd-barcode-perl (>= 1.15), libgetopt-long-perl (>= 2.35) | cpan-libgetopt-long-perl (>= 2.35), libhtml-scrubber-perl (>= 0.08) | cpan-libhtml-scrubber-perl (>= 0.08), libhtml-template-pro-perl (>= 0.68) | cpan-libhtml-template-pro-perl (>= 0.68), liblingua-stem-perl (>= 0.82) | cpan-liblingua-stem-perl (>= 0.82), liblist-moreutils-perl (>= 0.21) | cpan-liblist-moreutils-perl (>= 0.21), liblocale-codes-perl (>= 2.07) | cpan-liblocale-codes-perl (>= 2.07), libmail-sendmail-perl (>= 0.79) | cpan-libmail-sendmail-perl (>= 0.79), libmarc-charset-perl (>= 0.98) | cpan-libmarc-charset-perl (>= 0.98), libmarc-crosswalk-dublincore-perl (>= 0.02) | cpan-libmarc-crosswalk-dublincore-perl (>= 0.02), libmarc-record-perl (>= 2.0.0) | cpan-libmarc-record-perl (>= 2.0.0), libmarc-xml-perl (>= 0.88) | cpan-libmarc-xml-perl (>= 0.88), libmime-base64-perl (>= 3.07) | cpan-libmime-base64-perl (>= 3.07), libnet-z3950-zoom-perl (>= 1.21) | cpan-libnet-z3950-zoom-perl (>= 1.21), libpdf-api2-perl (>= 0.69) | cpan-libpdf-api2-perl (>= 0.69), libpdf-reuse-barcode-perl (>= 0.05) | cpan-libpdf-reuse-barcode-perl (>= 0.05), libpdf-reuse-perl (>= 0.33) | cpan-libpdf-reuse-perl (>= 0.33), libperl-ldap-perl (>= 0.34) | cpan-libperl-ldap-perl (>= 0.34), libpoe-perl (>= 0.9999) | cpan-libpoe-perl (>= 0.9999), libscalar-list-utils-perl (>= 1.18) | cpan-libscalar-list-utils-perl (>= 1.18), libschedule-at-perl (>= 1.06) | cpan-libschedule-at-perl (>= 1.06), libsms-send-perl (>= 0.05) | cpan-libsms-send-perl (>= 0.05), libtest-harness-perl (>= 3.03) | cpan-libtest-harness-perl (>= 3.03), libtest-perl (>= 1.25) | cpan-libtest-perl (>= 1.25), libtest-simple-perl (>= 0.74) | cpan-libtest-simple-perl (>= 0.74), libtext-csv-perl (>= 1.06) | cpan-libtext-csv-perl (>= 1.06), libtext-csv-xs-perl (>= 0.32) | cpan-libtext-csv-xs-perl (>= 0.32), libtext-iconv-perl (>= 1.4) | cpan-libtext-iconv-perl (>= 1.4), libtext-tabs-wrap-perl (>= 2005.082401) | cpan-libtext-tabs-wrap-perl (>= 2005.082401), libtime-hires-perl (>= 1.86) | cpan-libtime-hires-perl (>= 1.86), libunicode-normalize-perl (>= 0.32) | cpan-libunicode-normalize-perl (>= 0.32), libwww-perl (>= 1.39) | cpan-libwww-perl (>= 1.39), libxml-dumper-perl (>= 0.81) | cpan-libxml-dumper-perl (>= 0.81), libxml-libxml-perl (>= 1.66) | cpan-libxml-libxml-perl (>= 1.66), libxml-libxslt-perl (>= 1.62) | cpan-libxml-libxslt-perl (>= 1.62), libxml-rss-perl (>= 1.32) | cpan-libxml-rss-perl (>= 1.32), libxml-sax-perl (>= 0.16) | cpan-libxml-sax-perl (>= 0.16), libxml-simple-perl (>= 2.18) | cpan-libxml-simple-perl (>= 2.18), libyaml-syck-perl (>= 1.00) | cpan-libyaml-syck-perl (>= 1.00), perl (>= 5.8.8) -Provides: libkoha-perl -Description: Koha ILS - Koha Integrated Library System +Depends: ${shlib:Depends}, ${misc:Depends}, + dbconfig-common, + koha-dev-env, + apache2, + mysql-server, + daemon, + at, + idzebra-2.0, + yaz, + libjs-jquery, + tinymce2, + libjs-yui +Recommends: mysql-client +Homepage: http://koha-community.org/ +Description: integrated (physical) library management system + Koha is an Integrated Library Managment system for real-world libraries + (the kinds with books). + diff --git a/debian/copyright b/debian/copyright index 954c23d4b2..c1be5fdc50 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,29 +1,9 @@ -This is the debian package for Koha Integrated Library System. -It was created by Chris Cormack using dh-make-perl. +This will be filled in later. -The upstream author is: +Copyright by various people. -Koha Developement team . +Debian packaging copyright: -Copyright is owned by a number of people, too many to list here easily. +Copyright 2010 Catalyst IT Ltd -The copyright license is: - Koha is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - Koha is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA - -The Debian packaging is (C) 2008, Chris Cormack and -is licensed under the same terms as the software itself (see above). - -On a Debian system, you can find a copy of the license in -/usr/share/common-licenses/GPL-2 . diff --git a/debian/koha.README.Debian b/debian/koha.README.Debian new file mode 100644 index 0000000000..ce271ba923 --- /dev/null +++ b/debian/koha.README.Debian @@ -0,0 +1,29 @@ +koha packaged for Debian +======================== + +When you install the koha.deb package, it does not quite work out of the +box. Due to various limitations imposed by sanity and the Debian packaging +policies, it is not yet possible to make it so without excessive work. +The work will happen later. For now, you get a checklist. + +To enable Koha on your machine, after installing this package, do the +following: + +* Make XML::LibXML::SAX:Parser the default parser for Perl's XML SAX + implementation. + - edit /etc/perl/XML/SAX/ParserDetails.ini to + move XML::LibXML::SAX:Parser section last in the file +* Enable the rewrite module for Apache. + - sudo a2enmod rewrite +* Restart Apache. + - sudo service apache2 restart + +Then access the following URL: + + http://localhost:8080/ + +Alternatively, any other name, IP address, and interface will work, too. + +This should bring up the Koha intranet administration screen, which will +let you log in. The username is koha, the password is in the +/etc/koha/koha-config.xml file (search for "pass"). diff --git a/debian/koha.apache-ports b/debian/koha.apache-ports new file mode 100644 index 0000000000..3cc6764ebd --- /dev/null +++ b/debian/koha.apache-ports @@ -0,0 +1 @@ +Listen 8080 diff --git a/debian/koha.config b/debian/koha.config new file mode 100644 index 0000000000..dbadd0acbb --- /dev/null +++ b/debian/koha.config @@ -0,0 +1,13 @@ +#!/bin/sh +# config maintainer script for koha. + +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then + . /usr/share/dbconfig-common/dpkg/config.mysql + dbc_go koha $@ +fi + diff --git a/debian/koha.dirs b/debian/koha.dirs new file mode 100644 index 0000000000..07e83ab455 --- /dev/null +++ b/debian/koha.dirs @@ -0,0 +1,3 @@ +etc/apache2/sites-available +etc/apache2/sites-enabled +etc/apache2/conf.d diff --git a/debian/koha.install b/debian/koha.install new file mode 100644 index 0000000000..2f036b4cc9 --- /dev/null +++ b/debian/koha.install @@ -0,0 +1 @@ +misc/release_notes/release_notes_3*.txt usr/share/doc/koha diff --git a/debian/koha.postinst b/debian/koha.postinst new file mode 100644 index 0000000000..3a67cc9aff --- /dev/null +++ b/debian/koha.postinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +dbc_generate_include="template:/etc/koha/koha-conf.xml" +dbc_generate_include_args=" + -o template_infile=/usr/share/koha/koha-conf.xml.in + -O root:www-data -m 0640 +" + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst.mysql +dbc_go koha $@ + +#DEBHELPER# diff --git a/debian/koha.postrm b/debian/koha.postrm new file mode 100644 index 0000000000..60ba704f47 --- /dev/null +++ b/debian/koha.postrm @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.mysql + dbc_go koha $@ +fi + +#if [ "$1" = "purge" ]; then +# rm -f /etc/db-test-mysql/debian-db.php +# if which ucf >/dev/null 2>&1; then +# ucf --purge /etc/db-test-mysql/debian-db.php +# ucfr --purge db-test-mysql /etc/db-test-mysql/debian-db.php +# fi +#fi + +#DEBHELPER# diff --git a/debian/koha.prerm b/debian/koha.prerm new file mode 100644 index 0000000000..61e7b4f14d --- /dev/null +++ b/debian/koha.prerm @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/prerm.mysql +dbc_go koha $@ + +#DEBHELPER# diff --git a/debian/patches/cronjob-hashbang b/debian/patches/cronjob-hashbang new file mode 100644 index 0000000000..7ca8849edd --- /dev/null +++ b/debian/patches/cronjob-hashbang @@ -0,0 +1,14 @@ +Description: fix #! for cronjob +Origin: vendor +Forwarded: no +Author: Lars Wirzenius +Last-Update: 2010-04-12 + +--- a/misc/cronjobs/printoverdues.sh ++++ b/misc/cronjobs/printoverdues.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/bash ++#!/bin/bash + + print_usage(){ + echo "$0 : generates PDF files from html files in directorys and prints them"; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000000..e34a824a77 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +cronjob-hashbang diff --git a/debian/rules b/debian/rules index c2bc3aba03..da16972213 100755 --- a/debian/rules +++ b/debian/rules @@ -1,86 +1,44 @@ #!/usr/bin/make -f -# This debian/rules file is provided as a template for normal perl -# packages. It was created by Marc Brockschmidt for -# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may -# be used freely wherever it is useful. -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 +PACKAGE = $(shell dh_listpackages) +TMP = $(CURDIR)/debian/$(PACKAGE) -VERSION=$(shell dpkg-parsechangelog | grep ^Vers | cut -d\ -f2) - -# If set to a true value then MakeMaker's prompt function will -# always return the default without waiting for user input. +# Make "perl Makefile.PL" be non-interactive. export PERL_MM_USE_DEFAULT=1 -#PACKAGE=libkoha-perl +%: + dh $@ + +override_dh_auto_install: + dh_auto_install + rm -r $(TMP)/var/run + rm -r $(TMP)/var/lock + rm $(TMP)/var/log/koha/README + rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js + ln -s /usr/share/javascript/jquery/jquery.js \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js + rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js + ln -s /usr/share/javascript/jquery \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js + rm -r \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce + ln -s /usr/share/tinymce2/www \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce + rm -r \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/yui + ln -s /usr/share/javascript/yui \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/yui + rm -r \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/yui + ln -s /usr/share/javascript/yui \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/yui + ln -s ../../koha/koha-httpd.conf $(TMP)/etc/apache2/sites-available/koha + ln -s ../sites-available/koha $(TMP)/etc/apache2/sites-enabled/koha + install -m 0644 debian/koha.apache-ports $(TMP)/etc/apache2/conf.d/koha + sed -i '/^/s/>.*_DBC_DBUSER_/s/>.*_DBC_DBPASS_&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)