Old:Pacchettizzare un tema per Bootsplash: differenze tra le versioni

inseriti gli script
(inseriti gli script)
Riga 143: Riga 143:
  Resolutions: 1280x1024</pre>
  Resolutions: 1280x1024</pre>


===changelog===
===dirs===
Dovr� contenere
<pre>
etc/bootsplash/themes/<nometema>
</pre>
 
===docs===
Dovr� contenere
<pre>
docs/*
</pre>
se la directory � presente nei sorgenti del tema (altrimenti si pu� omettere questo file).
 
===postinst===
Usiamo direttamente quelli creati per i pacchetti dei temi presenti su http://www.bootsplash.org :
<pre>
#! /bin/sh
# postinst script for test
#
# see: dh_installdeb(1)
 
set -e
. /usr/share/debconf/confmodule
 
THEME_SUFFIX=<nometema>
 
# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
 
case "$1" in
    configure)
        db_register shared/bootsplash-theme bootsplash-theme-$THEME_SUFFIX
    ;;
 
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
 
    *)
        gettext -s "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
 
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
 
#DEBHELPER#
 
exit 0
</pre>
===postrm===
<pre>
#! /bin/sh
# postrm script for bootsplash-theme-newtux
#
# see: dh_installdeb(1)
 
set -e
 
# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
 
# Theme variables
THEME_SUFFIX=<nometema>
 
 
case "$1" in
      remove)
 
        # This only applies to the remove process.
        # By default the directory of the theme under
        # /etc/bootsplash/themes will not be removed.
        # However, this postrm script will do this if
        # a directory exists.
        if [ -d /etc/bootsplash/themes/$THEME_SUFFIX ]
        then
                gettext -s "Deleting orphaned files under /etc/bootsplash/themes/$THEME_SUFFIX ... "
                rm -rf /etc/bootsplash/themes/$THEME_SUFFIX || gettext -s "ERROR: Couldn't delete directory /etc/bootsplash/themes/$THEME_SUFFIX."
        fi
        ;;
 
      purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 
 
        ;;
 
    *)
        gettext -s "postrm called with unknown argument \`$1'" >&2
        exit 1
 
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
 
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
        . /usr/share/debconf/confmodule
        db_purge
fi
# End automatically added section
 
 
exit 0
</pre>
 
===prerm===
<pre>
#! /bin/sh
# prerm script for bootsplash-theme-debblue
#
# see: dh_installdeb(1)
 
set -e
. /usr/share/debconf/confmodule
 
# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
 
case "$1" in
    remove|upgrade|deconfigure)
        # I no longer claim this question.
        db_unregister shared/bootsplash-theme
        # See if the shared question still exists.
        if db_get shared/bootsplash-theme; then
                db_metaget shared/bootsplash-theme owners
                db_subst shared/bootsplash-theme choices $RET
                db_metaget shared/bootsplash-theme value
                if [ "<package>" = "$RET" ] ; then
                        db_fset shared/bootsplash-theme seen false
                        db_input high shared/bootsplash-theme || true
                        db_go || true
                fi
        fi
        ;;
 
    failed-upgrade)
        ;;
    *)
        gettext -s "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
 
exit 0
</pre>
1 487

contributi