~ubuntu-branches/ubuntu/precise/makedumpfile/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): John Wright
  • Date: 2010-03-03 17:17:35 UTC
  • mfrom: (1.1.3 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100303171735-vxw4zqii21mcj0a0
Tags: 1.3.5-1
* New upstream version
* Preserve upstream's original makedumpfile.8 in clean target
* kdump-config: Fix a typo
* Switch to the "3.0 (quilt)" source format
  - Remove unneeded Build-Depends on quilt
* Update kdump-tools.README.Debian to reflect that recent kernels
  don't need a crash kernel start address
* Apply patch from Petter Reinholdtsen to fix incorrect dependencies
  in kdump-tools.init (Closes: #569685)
* Indicate support for Linux 2.6.32
  - Although upstream hasn't updated its LATEST_VERSION macro, this
    version works without modification on Linux 2.6.32.  Squelch a
    warning that a 2.6.32 kernel is not supported.
* Backport upstream commit 4a16bd39866093f4949f8e9dc183fa2321bda22d
  - Fix buffer overflow when writing dh->signature

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
include /usr/share/dpatch/dpatch.make
4
 
 
5
 
build: patch
6
 
        dh_testdir
7
 
        $(MAKE)
8
 
 
9
 
clean: clean1 unpatch
10
 
clean1:
11
 
        dh_testdir
12
 
        dh_testroot
13
 
        -$(MAKE) clean
14
 
        dh_clean
15
 
 
16
 
install:
17
 
        dh_testdir
18
 
        dh_testroot
19
 
        dh_clean -k
20
 
        dh_installdirs
21
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/makedumpfile
22
 
        install -D -m755 debian/initramfs-hook \
23
 
                debian/makedumpfile/usr/share/initramfs-tools/hooks/makedumpfile
24
 
 
25
 
binary-indep:
26
 
 
27
 
binary-arch: build install
28
 
        dh_testdir
29
 
        dh_testroot
30
 
        dh_installchangelogs 
31
 
        dh_installdocs README
32
 
        dh_install
33
 
        dh_strip
34
 
        dh_compress
35
 
        dh_fixperms
36
 
        dh_installdeb
37
 
        dh_shlibdeps
38
 
        dh_gencontrol
39
 
        dh_md5sums
40
 
        dh_builddeb
41
 
 
42
 
binary: binary-indep binary-arch
43
 
.PHONY: build clean binary-indep binary-arch binary
 
3
# Figure out the git branch we're on
 
4
branch = $(shell git symbolic-ref HEAD 2>/dev/null | sed s:refs/heads/::)
 
5
 
 
6
%:
 
7
        dh $@
 
8
 
 
9
override_dh_auto_install:
 
10
        dh_auto_install
 
11
        install -D -m755 debian/makedumpfile-static.initramfs-hook \
 
12
          debian/makedumpfile-static/usr/share/initramfs-tools/hooks/makedumpfile
 
13
 
 
14
override_dh_installinit:
 
15
        # Start right after syslog is available, and don't bother stopping
 
16
        # (which just unloads the kdump kernel) so that we can catch crashes
 
17
        # all the way until actual shutdown.
 
18
        dh_installinit -pkdump-tools -- start 11 2 3 4 5 .
 
19
 
 
20
# The upstream Makefile modifies makedumpfile.8 in place, so without this hack
 
21
# (or a patch to the Makefile, which would be harder to maintain), our clean
 
22
# target won't get us back to the original source.
 
23
override_dh_auto_build:
 
24
        cp makedumpfile.8 makedumpfile.8.orig
 
25
        dh_auto_build
 
26
 
 
27
override_dh_auto_clean:
 
28
        if [ -f makedumpfile.8.orig ]; then \
 
29
                mv makedumpfile.8.orig makedumpfile.8; \
 
30
        fi
 
31
        dh_auto_clean
 
32
 
 
33
guilt-patches:
 
34
        dh_testdir
 
35
        dh_quilt_unpatch
 
36
        test -d .git
 
37
        test -n '$(branch)'
 
38
 
 
39
        # Make sure no guilt patches are applied.  But don't fail if guilt
 
40
        # hasn't been initialized yet.
 
41
        guilt status > /dev/null || guilt init
 
42
        guilt pop -a
 
43
 
 
44
        rm -rf .git/patches/$(branch)
 
45
        rsync -av --delete debian/patches/ .git/patches/$(branch)
 
46
        touch .git/patches/$(branch)/status
 
47
 
 
48
debian/patches:
 
49
        dh_testdir
 
50
        dh_quilt_unpatch
 
51
        test -d .git
 
52
 
 
53
        guilt pop -a
 
54
        rm -rf debian/patches
 
55
        guilt export debian/patches
 
56
 
 
57
.PHONY: guilt-patches debian/patches