~ubuntu-branches/ubuntu/lucid/qemu-kvm/lucid-updates

« back to all changes in this revision

Viewing changes to debian/qemu-arm-static.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Loïc Minier
  • Date: 2009-09-23 09:18:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090923091841-iuffth44p1v6kiik
Tags: 0.11.0~rc2-0ubuntu8
* Drop awful binary-static target; binary-arch works fine and binary-static
  is not guaranteed to be called (in fact it was only called on the arch:
  all buildd, i.e. i386, even if there are no arch: all packages here).
  Similarly, merge build-static commands with build-arch commands.
  Similarly, merge install-static commands with install commands.
* Replace configure-static with $(STATIC_BUILDDIR)/config.status which
  matches config.status; let $(STATIC_BUILDDIR)/config.status depend on
  configure.
* Depending on whether we want to build a qemu-%-static package, as reported
  by dh_listpackages, set DO_STATIC and MAYBE_STATIC_CONFIG to "yes" and
  $(STATIC_BUILDDIR)/config.status (or "no" and empty) and use these vars to
  conditionalize the build.
* Drop unexisting targets from .PHONY.
* Let build depend on build-indep and build-arch.
* Use $(MAKE) -C instead of cd && $(MAKE).
* Consistenly use $() for make vars instead of mixing with ${}.
* Drop conditional for quilt.make being present, it's always satisfied per
  build-deps, and move the include to the top of rules.
* Remove boilerplate comments from rules.
* Don't overwrite CFLAGS from the environment and honour DEB_BUILD_OPTIONS
  in a more condensed manner.
* Use DEB_BUILD_ARCH instead of calling dpkg-architecture repeatedly.
* Let the config.status targets depend on patch instead of configure.
* Rename STATIC_BUILDDIR to debian/build-static to avoid clashes with a
  possible qemu-static.
* No need for build-{arch,indep} to depend on patch, actually they should
  only depend on the -stamp file which itself should depend on
  config.status targets.
* Drop build-arch/build-indep split in favour of a single build target; the
  split was unused and not supported properly anyway; let install depend on
  build and binary-{indep,arch} depend on install.
* Also pass -k debian/changelog.qemu debian/changelog.kvm to
  dh_installchangelogs in binary-arch.
* Drop unused binary-indep commands.
* Drop -s from dh_testdir/dh_testroot.
* Test for config-host.mak before calling $(MAKE) in clean: and drop the
  bogus dep on the config.status target.
* Call unpatch explicitly after distclean instead of using a dep as we don't
  want to run upstream rules unpatched.
* Rename config.status targets to config-host.mak since it's the actual name
  of the file spit by configure.
* Rework copying of sources for static build to filter-out the debian and
  potentially the static build dir and hence avoid the || true error
  handler.
* Install old Debian changelogs debian/changelog.{kvm,qemu} with
  dh_installdocs; drop the dh_installchangelogs hacks, that resurrects the
  actual upstream changelog.
* Drop bogus debian/qemu-arm-static.install for now as it installs to the
  wrong dir.
* Rework qemu-arm-static.{postint,prerm} to not hardcode the update-binfmts
  pathname, not do useless tests, and to drop boilerplate.
* Rework postinst to set -e and to drop boilerplate.
* Add install-stamp to run install only once; install should really be
  reworked to install to debian/tmp, moving the copying to binary packages
  to binary-%.
* Add watch file.
* Add debian/README.source pointing at the quilt one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
# postinst script for qemu-arm-eabi
3
 
#
4
 
# see: dh_installdeb(1)
5
2
 
6
3
set -e
7
4
 
8
 
# summary of how this script can be called:
9
 
#        * <postinst> `configure' <most-recently-configured-version>
10
 
#        * <old-postinst> `abort-upgrade' <new version>
11
 
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12
 
#          <new-version>
13
 
#        * <postinst> `abort-remove'
14
 
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15
 
#          <failed-install-package> <version> `removing'
16
 
#          <conflicting-package> <version>
17
 
# for details, see http://www.debian.org/doc/debian-policy/ or
18
 
# the debian-policy package
19
 
 
20
 
 
21
 
case "$1" in
22
 
    configure)
23
 
    if [ "$1" = configure ] && [ -x /usr/sbin/update-binfmts ]; then
24
 
        /usr/sbin/update-binfmts --import arm
25
 
    fi
 
5
if [ "$1" = configure ] && which update-binfmts >/dev/null; then
 
6
    update-binfmts --import arm
 
7
fi
 
8
 
 
9
if [ "$1" = configure ]; then
26
10
    sysctl -p /etc/sysctl.d/qemu-arm-static.sysctl.conf
27
 
    ;;
28
 
 
29
 
    abort-upgrade|abort-remove|abort-deconfigure)
30
 
    ;;
31
 
 
32
 
    *)
33
 
        echo "postinst called with unknown argument \`$1'" >&2
34
 
        exit 1
35
 
    ;;
36
 
esac
37
 
 
38
 
# dh_installdeb will replace this with shell code automatically
39
 
# generated by other debhelper scripts.
 
11
fi
40
12
 
41
13
#DEBHELPER#
42
14