From a8dc8f0f7ebf542d2d67a2e52500ba2fd9a026e7 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 19 Jun 2008 11:10:39 +1200 Subject: [PATCH] Split into multiple packages for davical, rscds and davical-doc --- debian/control | 28 ++++++++- debian/davical-doc.install | 0 debian/davical.install | 5 ++ debian/davical.postinst | 26 +++++++++ debian/davical.postrm | 15 +++++ debian/davical.prerm | 15 +++++ debian/keepme | 0 debian/rscds.install | 5 ++ debian/rscds.postinst | 2 +- debian/rules | 115 +++++++++++++++++++++++-------------- 10 files changed, 167 insertions(+), 44 deletions(-) create mode 100644 debian/davical-doc.install create mode 100644 debian/davical.install create mode 100644 debian/davical.postinst create mode 100644 debian/davical.postrm create mode 100644 debian/davical.prerm create mode 100644 debian/keepme create mode 100644 debian/rscds.install diff --git a/debian/control b/debian/control index b74ac582..0c0bcb46 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: rscds +Source: davical Section: web Priority: extra Maintainer: Andrew McMillan @@ -8,6 +8,29 @@ Vcs-git: git://git.catalyst.net.nz/rscds.git Vcs-browser: http://git.catalyst.net.nz/?p=rscds.git Homepage: http://davical.org/ +Package: davical +Architecture: all +Depends: debconf (>= 1.0.32), php5 | php4 (>= 4:4.3), php5-pgsql | php4-pgsql(>= 3:4.3.0), postgresql-client (>= 7.4) | postgresql-client-8.3 | postgresql-client-8.2 | postgresql-client-8.1, libawl-php (>=0.26), libclass-dbi-pg-perl, php5 | php4-domxml, libyaml-perl +Conflicts: rscds +Description: DAViCal CalDAV Server + The DAViCal CalDAV Server is designed to trivially store + CalDAV calendars, such as those from Evolution, Sunbird/Lightning, + Mulberry, iCal or SOHO Organizer, in a central location, providing + shared calendars, free/busy publication and basic administration + +Package: davical-doc +Architecture: all +Depends: debconf (>= 1.0.32), php5 | php4 (>= 4:4.3), php5-pgsql | php4-pgsql(>= 3:4.3.0), postgresql-client (>= 7.4) | postgresql-client-8.3 | postgresql-client-8.2 | postgresql-client-8.1, libawl-php (>=0.26), libclass-dbi-pg-perl, php5 | php4-domxml, libyaml-perl +Description: DAViCal CalDAV Server - documentation + The DAViCal CalDAV Server is designed to trivially store + CalDAV calendars, such as those from Evolution, Sunbird/Lightning, + Mulberry, iCal or SOHO Organizer, in a central location, providing + shared calendars, free/busy publication and basic administration + . + This package contains detailed technical documentation for the + classes and methods in the DAViCal programs. Some user-centric + configuration documentation is also included. + Package: rscds Architecture: all Depends: debconf (>= 1.0.32), php5 | php4 (>= 4:4.3), php5-pgsql | php4-pgsql(>= 3:4.3.0), postgresql-client (>= 7.4) | postgresql-client-8.3 | postgresql-client-8.2 | postgresql-client-8.1, libawl-php (>=0.26), libclass-dbi-pg-perl, php5 | php4-domxml, libyaml-perl @@ -17,3 +40,6 @@ Description: DAViCal CalDAV Server Mulberry, iCal or SOHO Organizer, in a central location, providing shared calendars, free/busy publication and basic administration (grouping, delegating, etc). + . + This legacy package is the same as the 'davical' package but is + for older installations installed from original 'rscds' packages. diff --git a/debian/davical-doc.install b/debian/davical-doc.install new file mode 100644 index 00000000..e69de29b diff --git a/debian/davical.install b/debian/davical.install new file mode 100644 index 00000000..8cf588e0 --- /dev/null +++ b/debian/davical.install @@ -0,0 +1,5 @@ +dba htdocs inc locale usr/share/davical +debian/keepme etc/davical/.keep +config/example-config.php usr/share/doc/davical/examples/davical-conf.php +config/example-administration.yml usr/share/doc/davical/examples/administration.yml +config/debug-config.php config/other-config.php usr/share/doc/davical/examples diff --git a/debian/davical.postinst b/debian/davical.postinst new file mode 100644 index 00000000..e0ab0892 --- /dev/null +++ b/debian/davical.postinst @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +[ -n "${DEBUG}" ] && set -o xtrace +PACKAGE=::package:: +[ -n "${DEBUG}" ] && echo "PostInst Parameters: $@" + +# +# Migrate directory location to /etc/davical from /etc/rscds +# +if [ -d /etc/rscds -a -d /etc/davical -a ! -h /etc/rscds ]; then + for CNFFILE in /etc/rscds/*; do + if [ -f "${CNFFILE}" ]; then + mv "${CNFFILE}" /etc/davical + fi + done + rmdir /etc/rscds +fi + +case $1 in + configure) + ;; +esac + +#DEBHELPER# diff --git a/debian/davical.postrm b/debian/davical.postrm new file mode 100644 index 00000000..18b25f50 --- /dev/null +++ b/debian/davical.postrm @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +[ -n "${DEBUG}" ] && set -o xtrace +PACKAGE=::package:: + +[ -n "${DEBUG}" ] && echo "PostRM Parameters: $@" + +case $1 in + purge) + ;; +esac + +#DEBHELPER# diff --git a/debian/davical.prerm b/debian/davical.prerm new file mode 100644 index 00000000..c6daa218 --- /dev/null +++ b/debian/davical.prerm @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +[ -n "${DEBUG}" ] && set -o xtrace +PACKAGE=::package:: + +[ -n "${DEBUG}" ] && echo "PreRM Parameters: $@" + +case $1 in + remove) + ;; +esac + +#DEBHELPER# diff --git a/debian/keepme b/debian/keepme new file mode 100644 index 00000000..e69de29b diff --git a/debian/rscds.install b/debian/rscds.install new file mode 100644 index 00000000..3ddd3e2a --- /dev/null +++ b/debian/rscds.install @@ -0,0 +1,5 @@ +dba htdocs inc locale usr/share/rscds +debian/keepme etc/davical/.keep +config/example-config.php usr/share/doc/rscds/examples/davical-conf.php +config/example-administration.yml usr/share/doc/rscds/examples/administration.yml +config/debug-config.php config/other-config.php usr/share/doc/rscds/examples diff --git a/debian/rscds.postinst b/debian/rscds.postinst index f9c7f94d..36d3cb6c 100644 --- a/debian/rscds.postinst +++ b/debian/rscds.postinst @@ -9,7 +9,7 @@ PACKAGE=::package:: # # Migrate directory location to /etc/davical from /etc/rscds # -if [ -d /etc/rscds -a -d /etc/davical -a ! -h /etc/rscds ]]; then +if [ -d /etc/rscds -a -d /etc/davical -a ! -h /etc/rscds ]; then for CNFFILE in /etc/rscds/*; do if [ -f "${CNFFILE}" ]; then mv "${CNFFILE}" /etc/davical diff --git a/debian/rules b/debian/rules index 6518d6e5..7ae66b2c 100755 --- a/debian/rules +++ b/debian/rules @@ -1,59 +1,90 @@ #!/usr/bin/make -f # -# rules for RSCDS +# rules for DAViCal # +# This file allows you to build any of the binary packages independantly, via binary- targets. -package=rscds -newname=davical -dt=debian/$(package) +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 -build: inc htdocs debian - $(checkdir) - make - touch build +# This has to be exported to make some magic below work. +export DH_OPTIONS + +build: build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch build-stamp clean: - $(checkdir) - make clean - rm -f build - -rm -rf $(dt) debian/files* core debian/substvars debian/html + dh_testdir + dh_testroot + rm -f build-stamp + + $(MAKE) clean + -rm -f build + dh_clean -binary-indep: checkroot build - $(checkdir) - -rm -rf $(dt) - dh_clean -k - # dh_installdebconf - install -d $(dt) $(dt)/DEBIAN $(dt)/etc/$(newname) \ - $(dt)/usr/share/$(package) $(dt)/usr/share/doc/$(package) - cp -a htdocs $(dt)/usr/share/$(package) - cp -a dba $(dt)/usr/share/$(package) - cp -a inc $(dt)/usr/share/$(package) - cp -a locale $(dt)/usr/share/$(package) - dh_installdocs - # Install the sample configuration files into the docs/examples directory - mkdir $(dt)/usr/share/doc/$(package)/examples - cp config/example-config.php $(dt)/usr/share/doc/$(package)/examples/${newname}-conf.php - cp config/example-administration.yml $(dt)/usr/share/doc/$(package)/examples/administration.yml - cp config/debug-config.php $(dt)/usr/share/doc/$(package)/examples - cp config/other-config.php $(dt)/usr/share/doc/$(package)/examples - find $(dt)/ -name ".gitignore" -exec rm {} \; +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + dh_install + +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + dh_testdir + dh_testroot dh_installchangelogs + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installcatalogs +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installman +# dh_installcron +# dh_installinfo +# dh_installwm +# dh_installudev +# dh_lintian +# dh_undocumented +# dh_strip +# dh_link + dh_compress dh_fixperms - # install -m 1777 -d $(dt)/var/lib/$(package)/attachments +# dh_perl +# dh_python +# dh_makeshlibs dh_installdeb - dpkg-gencontrol -P$(dt) +# dh_shlibdeps + dh_gencontrol dh_md5sums - dpkg --build $(dt) .. + dh_builddeb -define checkdir - test -f debian/rules -endef +# Build architecture independant packages using the common target. +binary-indep: build install + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common -binary: binary-indep +# Build architecture dependant packages using the common target. +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common -checkroot: - $(checkdir) - test root = "`whoami`" +# Any other binary targets build just one binary package at a time. +binary-%: build install + make -f debian/rules binary-common DH_OPTIONS=-p$* -.PHONY: binary binary-arch binary-indep clean checkroot +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary-common binary install