~ubuntu-branches/ubuntu/saucy/linux-meta-ppc/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-11-27 14:48:42 UTC
  • Revision ID: package-import@ubuntu.com-20121127144842-5v8bnauu4m7csx4e
Tags: 3.7.0.1.3
* Make source package naming scheme consistent with the other flavours.
* Move the kernel metapackages to the "kernel" section (LP: #1074787)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
#
 
3
# debian/rules for kernel-source.
 
4
#
 
5
# GNU copyright 1997 to 1999 by Joey Hess.
 
6
# Copyright (c) 1999-2004 Herbert Xu <herbert@gondor.apana.org.au>
 
7
# Copyright (c) 2004 Jens Schmalzing <jensen@debian.org>
 
8
#
 
9
 
 
10
RELEASE_NAME=quantal
 
11
 
 
12
# 5 digit versions (2.6.38.<abi>.<upload>, 3 digit kernel base versions (2.6.38)
 
13
KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \
 
14
        's/Version: \([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1/')
 
15
KERNEL_ABI=$(shell head -n1 < debian/changelog | gawk '{n=split($$0,v,"."); print v[4];}')
 
16
 
 
17
# 4 digit versions (3.0.<abi>.<upload>), 2 digit kernel base versions (3.0)
 
18
#KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \
 
19
        's/Version: \([0-9]*\.[0-9]*\)\..*/\1/')
 
20
#KERNEL_ABI=$(shell head -n1 < debian/changelog | gawk '{n=split($$0,v,"."); print v[3];}')
 
21
 
 
22
KERNEL_ABI_VERSION=$(KERNEL_VERSION)-$(KERNEL_ABI)
 
23
 
 
24
GENERIC_i386=generic
 
25
GENERIC_amd64=generic
 
26
 
 
27
GENERIC=$(value GENERIC_$(shell dpkg-architecture -qDEB_HOST_ARCH))
 
28
GENERIC_DEP=$(if $(GENERIC),$(GENERIC),)
 
29
 
 
30
control_files := debian/control.common $(shell LC_ALL=C ls -d debian/control.d/*)
 
31
 
 
32
SHELL := sh -e
 
33
 
 
34
build:
 
35
        dh_testdir
 
36
 
 
37
clean: debian/control
 
38
        dh_testdir
 
39
        dh_testroot
 
40
        dh_clean
 
41
 
 
42
debian/control: $(control_files)
 
43
        rm -f debian/control.tmp
 
44
        for i in $^; do \
 
45
                sed 's/RELEASE_NAME/$(RELEASE_NAME)/g' $$i >> debian/control.tmp; \
 
46
                echo >> debian/control.tmp; \
 
47
        done
 
48
        rm -f $@
 
49
        mv debian/control.tmp $@
 
50
 
 
51
install: build
 
52
        dh_testdir
 
53
        dh_testroot
 
54
        dh_clean -k
 
55
 
 
56
gencontrol_flags = -Vkernel-version=$(KERNEL_VERSION)
 
57
gencontrol_flags += -Vkernel-abi-version=$(KERNEL_ABI_VERSION)
 
58
gencontrol_flags += -Vgeneric-depends=$(GENERIC_DEP)
 
59
 
 
60
# Build architecture-independent files here.
 
61
binary-indep: debian/control install
 
62
        dh_testdir
 
63
        dh_testroot
 
64
 
 
65
        dh_installdirs -i
 
66
        dh_installdocs -i
 
67
        dh_installchangelogs -i
 
68
        dh_compress -i
 
69
        dh_fixperms -i
 
70
        dh_installdeb -i
 
71
        dh_gencontrol -i -- $(gencontrol_flags)
 
72
        dh_md5sums -i
 
73
        dh_builddeb -i
 
74
 
 
75
# Build architecture-dependent files here.
 
76
binary-arch: debian/control install
 
77
        dh_testdir
 
78
        dh_testroot
 
79
 
 
80
        dh_installdirs -s
 
81
        dh_installdocs -s
 
82
        dh_installchangelogs -s
 
83
        dh_compress -s
 
84
        dh_fixperms -s
 
85
        dh_installdeb -s
 
86
        dh_gencontrol -s -- $(gencontrol_flags)
 
87
        dh_md5sums -s
 
88
        dh_builddeb -s
 
89
 
 
90
binary: binary-indep binary-arch
 
91
 
 
92
.PHONY: build clean binary-indep binary-arch binary install