~ubuntu-branches/ubuntu/jaunty/plotutils/jaunty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2006-06-10 22:30:09 UTC
  • mfrom: (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060610223009-lfgb9ceyzjykj3z1
Tags: 2.4.1-15
* 14_manpage_spline.dpatch: correct long option of -n (Closes: #247208).
* debian/control: changed maintainer email address, old will expire soon.
* Changed libpng12-0-dev (virtual) to libpng12-dev (real) in Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# -*-makefile-*-
3
 
# debian/rules file for plotutils
4
 
 
5
 
export DH_COMPAT=4
6
 
 
7
 
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
8
 
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
9
 
 
10
 
package := $(firstword $(shell dh_listpackages))
11
 
prefix  := $(PWD)/debian/tmp
12
 
share   := /usr/share
13
 
 
14
 
config_flags    := --prefix=/usr \
15
 
        --sysconfdir=/etc \
16
 
        --mandir=$(share)/man \
17
 
        --infodir=$(share)/info \
18
 
        --build $(DEB_HOST_GNU_TYPE)
19
 
ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
20
 
config_flags    += --host $(DEB_HOST_GNU_TYPE)
21
 
endif
22
 
 
23
 
cflags  := -g -Wall
24
 
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25
 
cflags  += -O2
 
2
# -*- makefile -*-
 
3
 
 
4
# Uncomment this to turn on verbose mode.
 
5
#export DH_VERBOSE=1
 
6
 
 
7
# This has to be exported to make some magic below work.
 
8
export DH_OPTIONS
 
9
 
 
10
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
11
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
12
 
 
13
 
 
14
CFLAGS = -Wall -g
 
15
 
 
16
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
17
        CFLAGS += -O0
26
18
else
27
 
cflags  += -O0
28
 
endif
29
 
 
30
 
ifeq ($(DEB_HOST_GNU_TYPE),alpha-linux)
31
 
cflags  += -mieee
32
 
endif
33
 
 
34
 
export CFLAGS=$(cflags)
35
 
export CXXFLAGS=$(cflags)
36
 
 
37
 
docs    := AUTHORS COMPAT KNOWN_BUGS NEWS ONEWS PROBLEMS README THANKS TODO
38
 
 
39
 
version := $(shell dpkg-parsechangelog | \
40
 
                        sed -ne 's/^Version: *\([0-9]\+:\)*//p')
41
 
 
42
 
get_misc_file           = cp -a /usr/share/misc/$(1) $(1)
43
 
update_config_sub       := $(call get_misc_file,config.sub)
44
 
update_config_guess     := $(call get_misc_file,config.guess)
45
 
 
46
 
tag:
47
 
        cvs tag -c -F $(subst .,_,debian_version_$(version))
48
 
ifeq ($(findstring -,$(version)),)
49
 
        cvs tag -c -F $(subst .,_,upstream_version_$(version))
50
 
endif
51
 
 
52
 
config: config-stamp
53
 
config-stamp:
54
 
        dh_testdir
55
 
        $(SHELL) ./configure $(config_flags) \
56
 
                --enable-libplotter \
57
 
                --enable-libxmi
58
 
        touch $@
59
 
 
60
 
build:  config build-stamp
61
 
build-stamp:
62
 
        $(MAKE)
63
 
        touch $@
64
 
 
65
 
clean:  checkroot
 
19
        CFLAGS += -O2
 
20
endif
 
21
 
 
22
configure: patch autogen
 
23
autogen: autogen-stamp
 
24
autogen-stamp:
 
25
        dh_testdir
 
26
        chmod +x debian/backup.sh
 
27
        debian/backup.sh
 
28
        autoreconf --force --install
 
29
        cp -f /usr/share/misc/config.sub config.sub
 
30
        cp -f /usr/share/misc/config.guess config.guess
 
31
        touch $@
 
32
 
 
33
config.status: configure
 
34
        dh_testdir
 
35
        CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
 
36
                                       --build=$(DEB_BUILD_GNU_TYPE) \
 
37
                                       --prefix=/usr \
 
38
                                       --mandir=\$${prefix}/share/man \
 
39
                                       --infodir=\$${prefix}/share/info \
 
40
                                       --sysconfdir=/etc \
 
41
                                       --enable-libplotter \
 
42
                                       --enable-libxmi
 
43
 
 
44
build: build-arch build-indep
 
45
 
 
46
build-arch: build-arch-stamp
 
47
build-arch-stamp:  config.status
 
48
        $(MAKE) 
 
49
        touch $@
 
50
 
 
51
build-indep: build-indep-stamp
 
52
build-indep-stamp:  config.status
 
53
        # Empty
 
54
 
 
55
clean: clean-patched unpatch
 
56
clean-patched:
 
57
        dh_testdir
 
58
        dh_testroot
66
59
        rm -f *-stamp
67
60
        -$(MAKE) distclean
68
 
        -$(update_config_sub)
69
 
        -$(update_config_guess)
70
 
        dh_clean
71
 
 
72
 
binary-indep:   checkroot build
73
 
 
74
 
binary-arch:    checkroot build
75
 
        dh_clean
76
 
        dh_installdirs
77
 
 
78
 
        make install DESTDIR=$(prefix)
79
 
 
 
61
        chmod +x debian/backup.sh
 
62
        -debian/backup.sh -r
 
63
        rm -f depcomp
 
64
        dh_clean 
 
65
 
 
66
install: install-indep install-arch
 
67
install-indep:
 
68
        # Empty
 
69
 
 
70
install-arch:
 
71
        dh_testdir
 
72
        dh_testroot
 
73
        dh_clean -k -a
 
74
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
75
 
 
76
# Must not depend on anything. This is to be called by
 
77
# binary-arch/binary-indep
 
78
# in another 'make' thread.
 
79
binary-common:
 
80
        dh_testdir
 
81
        dh_testroot
80
82
        dh_install
81
 
 
82
 
        dh_installchangelogs
83
 
        dh_installdocs $(docs)
 
83
        dh_installchangelogs #ChangeLog         # upstream is empty
 
84
        dh_installdocs
84
85
        dh_installinfo
85
 
        dh_installman debian/*.1
86
 
 
 
86
        dh_installman
87
87
        dh_strip
88
 
        dh_compress
 
88
        dh_compress 
89
89
        dh_fixperms
90
90
        dh_makeshlibs
91
91
        dh_installdeb
94
94
        dh_md5sums
95
95
        dh_builddeb
96
96
 
97
 
binary: binary-indep binary-arch
98
 
 
99
 
checkroot:
100
 
        dh_testdir
101
 
        dh_testroot
102
 
 
103
 
.PHONY: binary binary-arch binary-indep clean checkroot build config
 
97
binary-indep: build-indep install-indep
 
98
        # Empty
 
99
 
 
100
binary-arch: build-arch install-arch
 
101
        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
 
102
 
 
103
patch: patch-stamp
 
104
patch-stamp:
 
105
        dpatch apply-all
 
106
        dpatch cat-all >patch-stamp
 
107
 
 
108
unpatch:
 
109
        dpatch deapply-all
 
110
        rm -rf patch-stamp debian/patched
 
111
 
 
112
binary: binary-arch binary-indep
 
113
.PHONY: build clean clean-patched binary-indep binary-arch binary \
 
114
          install install-indep install-arch patch unpatch autogen test