File: rules

package info (click to toggle)
graphviz 2.8-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,480 kB
  • ctags: 22,071
  • sloc: ansic: 163,260; cpp: 36,565; sh: 25,024; yacc: 2,358; tcl: 1,808; makefile: 1,745; cs: 805; perl: 801; ml: 649; awk: 160; lex: 153; python: 105; ruby: 32; php: 6
file content (189 lines) | stat: -rwxr-xr-x 6,894 bytes parent folder | download | duplicates (2)
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

# Get build platform info
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

configure: configure-stamp
configure-stamp:
	dh_testdir
	#  Configure the package.
	./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
	--prefix=/usr \
	--mandir=\$${prefix}/share/man \
	--datadir=\$${prefix}/share \
	--infodir=\$${prefix}/share/info \
	--with-x \
	--enable-tcl \
	--disable-static \
	--disable-guile \
	--disable-java \
	--disable-lua \
	--disable-ocaml \
	--disable-php \
	--disable-python \
	--disable-ruby \
	--disable-sharp \
	--disable-python
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	#  Compile the package.
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	#  Clean up after the build process.
	-$(MAKE) distclean
	-rm -f cdt/*.lo
	# remove fluff from upstream package (per lintian)
	-rm -f config.log config.status
	-rm -f libltdl/config.log libltdl/config.status
	#  Update our config.sub, config.guess files
	-test -r /usr/share/misc/config.sub && \
	cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	cp -f /usr/share/misc/config.guess config.guess
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	#  Install the package into debian/graphviz/usr.
	$(MAKE) install prefix=$(CURDIR)/debian/graphviz/usr 
	#  move stuff from lib to examples
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs/directed/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/graphs/directed
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs/undirected/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/graphs/undirected
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs/directed
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs/undirected
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs
	#  move demo tree to examples, then remove empty dir
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/demo/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/demo
	#  remove unneeded parts of TCL/TK libraries (in tcl subdir)
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz/tcl; \
	  for LIB in libtcldot libgdtclft libtclplan libtkspline; do \
	    rm -f $${LIB}.la; \
	    rm -f $${LIB}.so; \
	    rm -f $${LIB}.so.0; \
	  done; \
	 cd -)
	#  setup lefty by copying (from doc) and cleaning both
	cp $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/lefty
	rm -f $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/lefty/dotty*
	rm -f $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/lefty/lefty.psp
	#  remove examples from leftylib dir
	rm -f $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/box.*
	rm -f $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/def.*
	rm -f $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/fractal*.*
	rm -f $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/slides.*
	rm -f $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/tree.*
	#  setup lefty by removing execute perms
	chmod 644 $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/*
	# move doc tree to proper root
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/doc/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/doc
	#  remove bizarre arrival of copying file
	rm -f $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/COPYING*
	#  setup contrib
	cp $(CURDIR)/contrib/INDEX \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/contrib
	cp -r $(CURDIR)/contrib/lefty-grace \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/contrib
	#  hrm... remove extra copy of lefty-grace
	rm -rf $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/contrib/lefty-grace/lefty-grace
	#  remove execute perms from examples dir
	chmod -R -x $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/*
	# **TEMP** remove lang packs we aren't distributing, yet
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/guile
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/java
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/lua
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/ocaml
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/php
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/python
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/ruby
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/sharp
	rm -rf $(CURDIR)/debian/graphviz/usr/lib/graphviz/python
	# remove badly placed and unused mann pages
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/mann
	# remove a couple of man pages we are not distributing
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/tcl/*.man
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/perl/*.man
	# now move files into proper binary-package subdirs
	dh_movefiles --sourcedir=debian/graphviz
	#  remove empty dir trees
	rmdir $(CURDIR)/debian/graphviz/usr/lib/pkgconfig
	rmdir $(CURDIR)/debian/graphviz/usr/include/graphviz
	rmdir $(CURDIR)/debian/graphviz/usr/include
	rmdir $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/html/info
	rmdir $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/html
	rmdir $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/pdf
	# install their replacements (after dh_movefiles call)
	cp $(CURDIR)/debian/gv_tcl.3 \
	   $(CURDIR)/debian/graphviz/usr/share/man/man3
	cp $(CURDIR)/debian/gv_perl.3 \
	   $(CURDIR)/debian/graphviz/usr/share/man/man3

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i 
	#dh_installexamples -i
	dh_installmenu -i
	#dh_installman -i
	dh_installchangelogs ChangeLog -i
	dh_link -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_makeshlibs -i 
	dh_installdeb -i 
	dh_shlibdeps -i 
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a -XMakefile 
	dh_installexamples -a
	dh_installmenu -a
	dh_installman -a
	dh_installchangelogs ChangeLog -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -n
	dh_installdeb -a 
	dh_shlibdeps -a -L libgvc -l debian/graphviz-dev/usr/lib/graphviz
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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