~ubuntu-branches/ubuntu/raring/net-tools/raring

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Muharem Hrnjadovic
  • Date: 2009-05-04 12:29:43 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504122943-6zyafjosb8a1u21q
Tags: 1.60-23ubuntu1
* Merge from debian unstable, remaining changes:
  Ubuntu_unit_conversion.patch:
    - the diff-style patch was converted into quilt format
    - Ubuntu Policy: output using standard SI unit multiples:
      KB (10^3), MB (10^6), GB (10^9), TB (10^12) and PB (10^15).
      Includes manpage update to remove comment about IEC units.
      LP: #240073.
  Dropped patches, already in debian:
    - lib/ec_hw.c: #include <stddef.h to get definition of NULL.
    - lib/fddi.c: #include <linux/types.h> to get types.  LP: #66209.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# Sample debian/rules that uses debhelper.
3
 
# GNU copyright 1997 to 1999 by Joey Hess.
 
2
 
 
3
include /usr/share/quilt/quilt.make
4
4
 
5
5
# Uncomment this to turn on verbose mode.
6
6
#export DH_VERBOSE=1
7
7
 
8
 
# This is the debhelper compatability version to use.
9
 
export DH_COMPAT=1
 
8
# This has to be exported to make some magic below work.
 
9
export DH_OPTIONS
 
10
 
 
11
# These are used for cross-compiling and for saving the configure script
 
12
# from having to guess our platform (since we know it already)
 
13
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
14
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10
15
 
11
16
configure: configure-stamp
12
 
configure-stamp:
13
 
        dh_testdir
14
 
        touch configure-stamp
15
 
 
16
 
build: configure-stamp build-stamp
17
 
build-stamp:
18
 
        dh_testdir
19
 
        cp debian/config.h config.h
20
 
        cp debian/config.make config.make
21
 
        $(MAKE)
22
 
        touch build-stamp
23
 
 
24
 
clean:
 
17
configure-stamp: $(QUILT_STAMPFN)
 
18
        [ ! -f config.make ] || mv config.make debian/config.make.bk
 
19
        cp -f debian/config.make config.make
 
20
        [ ! -f config.h ] || mv config.h debian/config.h.bk
 
21
        cp -f debian/config.h config.h
 
22
        dh_testdir
 
23
        touch $@
 
24
 
 
25
build: build-stamp
 
26
build-stamp: configure-stamp
 
27
        dh_testdir
 
28
        $(MAKE) PROGS="ifconfig arp netstat route rarp slattach plipconfig \
 
29
                nameif iptunnel ipmaddr mii-tool"
 
30
        touch $@
 
31
 
 
32
clean: unpatch
25
33
        dh_testdir
26
34
        dh_testroot
27
35
        rm -f build-stamp configure-stamp
28
 
        -$(MAKE) clobber
 
36
        [ ! -f Makefile ] || $(MAKE) clobber
 
37
        [ ! -f debian/config.h.bk ] || \
 
38
                mv debian/config.h.bk config.h
 
39
        [ ! -f debian/config.make.bk ] || \
 
40
                mv debian/config.make.bk config.make
29
41
        dh_clean
30
42
 
 
43
MANPAGES = arp.8 ethers.5 ifconfig.8 mii-tool.8 nameif.8 netstat.8 \
 
44
           plipconfig.8 rarp.8 route.8 slattach.8
 
45
 
31
46
install: build
32
47
        dh_testdir
33
48
        dh_testroot
34
49
        dh_clean -k
35
 
        dh_installdirs
36
 
        $(MAKE) update BASEDIR=`pwd`/debian/tmp
37
 
        mv debian/tmp/sbin/arp debian/tmp/usr/sbin/arp
38
 
        # we don't want man pages for domainname and friends... (yet)
39
 
        rm -rf debian/tmp/usr/share/man/*/man1/ debian/tmp/usr/share/man/man1/
40
 
        # we don't install local manpages until policy is clear
41
 
        rm -rf debian/tmp/usr/share/man/*_*/
42
 
 
43
 
 
44
 
# Build architecture-independent files here.
 
50
        dh_installdirs bin sbin usr/sbin
 
51
        dh_install
 
52
        $(MAKE) -C po install BASEDIR=$(CURDIR)/debian/net-tools
 
53
        dh_installman --language=de \
 
54
                $(wildcard $(addprefix man/de_DE/,$(MANPAGES)))
 
55
        dh_installman --language=C \
 
56
                $(wildcard $(addprefix man/en_US/,$(MANPAGES)))
 
57
        dh_installman --language=fr \
 
58
                $(wildcard $(addprefix man/fr_FR/,$(MANPAGES)))
 
59
        dh_installman --language=pt_BR \
 
60
                $(wildcard $(addprefix man/pt_BR/,$(MANPAGES)))
 
61
 
45
62
binary-indep: build install
46
 
# We have nothing to do by default.
47
63
 
48
 
# Build architecture-dependent files here.
49
64
binary-arch: build install
50
 
#       dh_testversion
51
65
        dh_testdir
52
66
        dh_testroot
53
 
#       dh_installdebconf       
54
 
        dh_installdocs
55
 
        dh_installexamples
56
 
        dh_installmenu
57
 
        dh_installcron
58
 
#       dh_installmanpages
59
 
        dh_installinfo
60
 
#       dh_undocumented
61
 
        dh_installchangelogs 
 
67
        dh_installchangelogs
 
68
        dh_installdocs README README.ipv6 TODO
62
69
        dh_link
63
70
        dh_strip
64
71
        dh_compress
65
72
        dh_fixperms
66
 
#       dh_makeshlibs
67
73
        dh_installdeb
68
74
        dh_shlibdeps
69
 
        dh_gencontrol -- -isp
 
75
        dh_gencontrol
70
76
        dh_md5sums
71
77
        dh_builddeb
72
78
 
73
 
binary: binary-indep binary-arch
74
 
.PHONY: build clean binary-indep binary-arch binary install
 
79
binary: binary-arch binary-indep
 
80
.PHONY: build clean binary-indep binary-arch binary install install-indep \
 
81
        install-arch