~ubuntu-branches/ubuntu/raring/binutils-mingw-w64/raring

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt, Stephen Kitt, Didier Raboud
  • Date: 2011-11-30 20:09:17 UTC
  • Revision ID: package-import@ubuntu.com-20111130200917-umhb584bueqdl139
Tags: 1
[ Stephen Kitt ]
* Fix Lintian error about copyright templates.
* Add build-arch and build-indep targets.
* Switch to single-number versions and add the binutils-mingw-w64
  version to the resulting binary package's version.
* Split package into 32- and 64-bit specific versions (-i686 and
  -x86-64) - see thread starting at
  http://lists.debian.org/4EBA730A.7060707@greffrath.com for rationale.

[ Didier Raboud ]
* Confidently setting the DMUA-flag to yes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
binutils_dir := /usr/src/binutils
10
10
upstream_dir := $(top_dir)/upstream
11
11
build_dir := $(top_dir)/build
12
 
deb_version := $(shell dpkg-query -W -f="\$${Version}\n" binutils-source)
 
12
source_version := $(shell dpkg-query -W -f="\$${Version}\n" binutils-source)
 
13
deb_version := $(source_version)+$(shell dpkg-parsechangelog | sed -ne "s/^Version: \(.*\)/\1/p")
13
14
deb_upstream_version := $(shell echo $(deb_version) | cut -d- -f1)
14
15
gnu_upstream_version := $(shell echo $(deb_upstream_version) | cut -d. -f1-3)
15
 
package := binutils-mingw-w64
16
16
 
17
17
targets := i686-w64-mingw32 x86_64-w64-mingw32
18
18
 
19
19
CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
20
20
CFLAGS += -Wall
21
21
 
22
 
all:
23
 
        echo $(deb_version)
24
 
 
25
22
unpack: unpack-stamp
26
23
unpack-stamp:
27
24
        tar xf $(binutils_dir)/binutils-$(gnu_upstream_version).tar.*
43
40
        done
44
41
        touch $@
45
42
 
46
 
build: build-stamp
47
 
build-stamp: configure-stamp
 
43
build-arch-stamp: configure-stamp
48
44
        dh_testdir
49
45
        for target in $(targets); do \
50
46
                dh_auto_build --parallel -B$(build_dir)/$$target; \
51
47
        done
52
48
        touch $@
53
49
 
54
 
install: install-stamp
55
 
install-stamp: build-stamp
 
50
build-indep-stamp:
 
51
        touch $@
 
52
 
 
53
install-arch: install-arch-stamp
 
54
install-arch-stamp: build-arch-stamp
56
55
        dh_testdir
57
56
        dh_testroot
58
57
        dh_prep
61
60
        done
62
61
 
63
62
        # Drop files which will conflict with other packages
64
 
        rm -rf debian/$(package)/usr/lib/*.a
65
 
        rm -rf debian/$(package)/usr/share/info
66
 
        rm -rf debian/$(package)/usr/share/locale
 
63
        rm -rf debian/tmp/usr/lib/*.a
 
64
        rm -rf debian/tmp/usr/share/info
 
65
        rm -rf debian/tmp/usr/share/locale
67
66
 
68
67
        # The following aren't necessary and don't comply with the FHS
69
 
        rm -rf $(patsubst %,debian/$(package)/usr/%,$(targets))
 
68
        rm -rf $(patsubst %,debian/tmp/usr/%,$(targets))
70
69
 
71
70
        # Copy the dllwrap manpages
72
71
        for target in $(targets); do \
75
74
 
76
75
        touch $@
77
76
 
78
 
binary-indep:
79
 
binary-arch: build install
80
 
        dh_testdir
81
 
        dh_testroot
82
 
        dh_installdocs
83
 
        dh_installman $(patsubst %,debian/%-dllwrap.1,$(targets))
 
77
build: build-arch build-indep
 
78
build-arch: build-arch-stamp
 
79
build-indep: build-indep-stamp
 
80
 
 
81
binary-indep: build-indep
 
82
        dh $@
 
83
 
 
84
binary-arch: install-arch
 
85
        dh $@
 
86
 
 
87
override_dh_installchangelogs:
84
88
        dh_installchangelogs $(upstream_dir)/ChangeLog
85
 
        dh_link
86
 
        dh_strip
87
 
        dh_lintian
88
 
        dh_compress
89
 
        dh_fixperms
90
 
        dh_installdeb
91
 
        dh_shlibdeps
92
 
        dh_gencontrol -- -v$(deb_version) -Vlocal:Version=$(deb_upstream_version)
93
 
        dh_md5sums
94
 
        dh_builddeb
 
89
 
 
90
override_dh_gencontrol:
 
91
        dh_gencontrol -- -v$(deb_version) -Vlocal:Version=$(deb_upstream_version) -Vbinutils:Version=$(source_version)
95
92
 
96
93
binary: binary-indep binary-arch
97
94
 
98
 
.PHONY: binary-indep binary-arch binary clean build install
 
95
.PHONY: binary-indep binary-arch binary clean build-indep build-arch build install-arch