File: rules

package info (click to toggle)
gnuplot 3.7.2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,212 kB
  • ctags: 4,635
  • sloc: ansic: 43,538; cpp: 970; makefile: 883; lisp: 661; sh: 578; asm: 539; objc: 379; csh: 297; pascal: 192; perl: 138
file content (133 lines) | stat: -rwxr-xr-x 3,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/usr/bin/make -f
# originally created by Tibor Simko
# changed to debhelper by Thimo Neubauer <thimo@debian.org>

# $Id: rules,v 1.13 2002/03/11 14:43:24 thimo Exp $

# This is the debhelper compatability version to use.
export DH_COMPAT=3

package=gnuplot

# often used vars

# take target architecture from dpkg-buildpackage-environment
ARCH    := $(DEB_BUILD_ARCH)
BASEDIR := $(shell pwd)
DEBDIR  := $(BASEDIR)/debian
DESTDIR := $(DEBDIR)/gnuplot

# from autotools-dev README
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# the default flags
CFLAGS=-O2 -Wall

# only include debugging-symbols if option is set
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif

# which types of docs should be produced?
DOCS = html ps info tutorial gpcard.ps

# arch-dependent configure-options

# the only arch with a real svgalib is i386
ifeq ($(ARCH),i386)
  EXTRACONF := --with-linux-vga
else
  EXTRACONF := --without-linux-vga
endif

build: build-stamp
build-stamp:
	dh_testdir

# configure the stuff
	./configure --build=$(DEB_BUILD_GNU_TYPE) \
	  --host=$(DEB_HOST_GNU_TYPE) \
	  --prefix=/usr --without-gnu-readline --without-lasergnu \
	  --with-png --without-gd --datadir="/usr/share/gnuplot" \
	  --mandir="/usr/share/man" --infodir="/usr/share/info" \
	  --libexecdir="/usr/lib/gnuplot" $(EXTRACONF)

# compile the program
	make CFLAGS="$(CFLAGS)"

# create documentation
	make -C docs $(DOCS)
	make -C docs/psdoc

	touch build-stamp

clean:
	dh_testdir
	dh_testroot

	rm -f build-stamp install-stamp

# use the main Makefile to clean up
	-$(MAKE) distclean
# one directory is not cleaned by distclean...
	-$(MAKE) -C docs/psdoc clean

# Wichert reminded me of this:	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

# install into DESTDIR
	make install DESTDIR="$(DESTDIR)"
# clear SUID-flag
	chmod u-s $(DESTDIR)/usr/bin/gnuplot

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_installdocs 

# no regexps possible in file examples
	dh_installexamples ./demo/*
	dh_installmenu
#       dh_installemacsen
	dh_installmanpages
	dh_installinfo ./docs/gnuplot.info
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps

# the following is "borrowed" from the xaos debian/rules ;-)
# Make package depend on svgalibg1 | svgalib-dummyg1
	set -e; \
	if ! grep svgalib-dummyg1 debian/gnuplot.substvars >/dev/null ; then \
	     mv debian/gnuplot.substvars debian/gnuplot.substvars-unhacked ; \
	     sed -e 's/svgalibg1\( *([^)]*)\)\{0,1\}/& | svgalib-dummyg1\1/' \
	       <debian/gnuplot.substvars-unhacked >debian/gnuplot.substvars; \
	     rm debian/gnuplot.substvars-unhacked; \
	fi

	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install