3
# debian/rules file for plotutils
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)
10
package := $(firstword $(shell dh_listpackages))
11
prefix := $(PWD)/debian/tmp
14
config_flags := --prefix=/usr \
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)
24
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
4
# Uncomment this to turn on verbose mode.
7
# This has to be exported to make some magic below work.
10
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
11
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
30
ifeq ($(DEB_HOST_GNU_TYPE),alpha-linux)
34
export CFLAGS=$(cflags)
35
export CXXFLAGS=$(cflags)
37
docs := AUTHORS COMPAT KNOWN_BUGS NEWS ONEWS PROBLEMS README THANKS TODO
39
version := $(shell dpkg-parsechangelog | \
40
sed -ne 's/^Version: *\([0-9]\+:\)*//p')
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)
47
cvs tag -c -F $(subst .,_,debian_version_$(version))
48
ifeq ($(findstring -,$(version)),)
49
cvs tag -c -F $(subst .,_,upstream_version_$(version))
55
$(SHELL) ./configure $(config_flags) \
60
build: config build-stamp
22
configure: patch autogen
23
autogen: autogen-stamp
26
chmod +x 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
33
config.status: configure
35
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
36
--build=$(DEB_BUILD_GNU_TYPE) \
38
--mandir=\$${prefix}/share/man \
39
--infodir=\$${prefix}/share/info \
44
build: build-arch build-indep
46
build-arch: build-arch-stamp
47
build-arch-stamp: config.status
51
build-indep: build-indep-stamp
52
build-indep-stamp: config.status
55
clean: clean-patched unpatch
69
-$(update_config_guess)
72
binary-indep: checkroot build
74
binary-arch: checkroot build
78
make install DESTDIR=$(prefix)
61
chmod +x debian/backup.sh
66
install: install-indep install-arch
74
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
76
# Must not depend on anything. This is to be called by
77
# binary-arch/binary-indep
78
# in another 'make' thread.
83
dh_installdocs $(docs)
83
dh_installchangelogs #ChangeLog # upstream is empty
85
dh_installman debian/*.1
97
binary: binary-indep binary-arch
103
.PHONY: binary binary-arch binary-indep clean checkroot build config
97
binary-indep: build-indep install-indep
100
binary-arch: build-arch install-arch
101
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
106
dpatch cat-all >patch-stamp
110
rm -rf patch-stamp debian/patched
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