Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Filename

Description

Content Example

control

This file contains important information about the package like name, description, dependent packages etc.

Source: shibboleth-site
Section: web
Priority: optional
Maintainer:  <you@yourdomain.ch>
Build-Depends: debhelper (>= 5)
Standards-Version: 3.7.2

Package: shibboleth-site
Architecture: all
Depends: libapache2-mod-shib2, libsaml6, libshibsp4, libxmltooling4, liblog4cpp5, openssl, ntp, apache2
Pre-Depends: m4
Description: Shibboleth configuration for Drupal to become an SP

config

 

#!/bin/sh -e

# Source debconf library.
. /usr/share/debconf/confmodule

# Decide how important it is for the user to see this message
PRIORITY=high

db_input $PRIORITY shibboleth-site/sphost || true
db_go

# Foreach user-question db_input and db_go command is added.
# The db_input command above will ask user for the SP Host name.

dirs

This file contains a list with all directory paths for which the package is responsible for.

etc/shibboleth
usr/share/shibboleth-site

install

This file defines where the files in package directory are copied to.
In this exmaple the debian/shibboleth2.xml.template is copied to /usr/share/shibboleth-site/.
Theres no "staring" slash required.

debian/shibboleth2.xml.template usr/share/shibboleth-site/

compat

This file specifies the compatibility level of the debhelper tools.

5

changelog

Log you changes in this file.
How this is done is described on the parent page:
Debian Packaging Guide

shibboleth-site (0.1-1) unstable; urgency=low

  * Initial package for shibboleth-site

 -- Christian Mueller <you@yourdomain.org>  Thu, 03 Sep 2010 11:35:00 +0200

postinst

This script is executes after the installation of the package.
Example: get the user inputed values an set them to a template.


preinst

This script is executed before the installation of the package.
Example: If a file, which is already owned by an other package, must be changed,
add a command dpkg-divert to make a backup of the existing file an replace it.

case "$1" in
    install)
        dpkg-divert --package shibboleth-site --add --rename
           --divert /etc/shibboleth/shibboleth2.xml.orig /etc/shibboleth/shibboleth2.xml
    ;;
    upgrade)  
    ;;
    abort-upgrade)
    ;;
    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
db_stop
exit 0

postrm

This script is executed after the package is removed.
Example: Reset the backuped file with dpkg-divert.

case "$1" in
    purge)
        dpkg-divert --package shibboleth-site --remove --rename
             --divert  /etc/shibboleth/shibboleth2.xml.orig /etc/shibboleth/shibboleth2.xml
        apache2ctl graceful
    ;;
    remove)
        dpkg-divert --package shibboleth-site --remove --rename
             --divert  /etc/shibboleth/shibboleth2.xml.orig /etc/shibboleth/shibboleth2.xml
        apache2ctl graceful
    ;;
    failed-upgrade|abort-install|abort-upgrade|disappear|upgrade)
    ;;
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;  
esac
exit 0

prerm

This script is executed before the package is removed.
Example: remove files owned by the package.

case "$1" in
    remove|deconfigure)
        rm -f /usr/share/shibboleth-site/shibboleth2.xml.template
        rm -f /etc/shibboleth/shibboleth2.xml
    ;;
    upgrade)
    ;;
    failed-upgrade)
    ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

rules

This script should accept the command clean, build and binary,
The script contains a set of commands which are executed.
Example: call debian/rules clean to clean up your package directory.

clean:
    dh_testdir
    dh_testroot
    dh_clean

templates

This file defines the user questions.
Example: Ask user for the SP Host name.

Template: shibboleth-site/sphost
Type: string
Default:
Description: SP Hostname
 This is the main domain and of the Service Provider installation
 .
 Note that this is not a full url, so for "http://site.com" you only
 need to enter "site.com"

...