File: rules

package info (click to toggle)
graphviz 1.7.16-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 11,124 kB
  • ctags: 12,650
  • sloc: ansic: 131,002; sh: 7,483; makefile: 1,954; tcl: 1,760; yacc: 1,758; perl: 253; awk: 150; lex: 96
file content (174 lines) | stat: -rwxr-xr-x 6,794 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
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
#!/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=3

# 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 --infodir=\$${prefix}/share/info
 
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	#  Compile the package.
	$(MAKE) LEFTYLIBDIR=/usr/lib/graphviz/lefty LEFTYPATH=/../lib/graphviz/lefty

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	#  Clean up after the build process.
	-$(MAKE) distclean

	#  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

	# Add here commands to rearrange install tree (upstream weaknesses)
	#    clean up the installation cruft

	#  at this point in time we have no approval to package man/mann pages
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/mann
	#  move stuff from lib to examples
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/graphs \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples

	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/demo/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples
	rmdir $(CURDIR)/debian/graphviz/usr/lib/graphviz/demo

	#  remove un-needed libs/lib-links
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/lib*.la
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/lib*.so.0
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/lib*.so
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldot.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldot.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libtcldot.so.1.7.16 libtcldot.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldgl.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldgl.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libtcldgl.so.1.7.16 libtcldgl.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libgdtclft.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libgdtclft.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libgdtclft.so.1.7.16 libgdtclft.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldgr.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtcldgr.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libtcldgr.so.1.7.16 libtcldgr.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtclplan.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtclplan.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libtclplan.so.1.7.16 libtclplan.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtkspline.so.0.0.0 \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/libtkspline.so.1.7.16
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz;ln -s libtkspline.so.1.7.16 libtkspline.so.1; cd -)
	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/pkgIndex.tcl \
	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/pi.tcl
	cat  $(CURDIR)/debian/graphviz/usr/lib/graphviz/pi.tcl | \
	  sed -e 's/\.so/.so.1.7.16/g' | \
	  sed -e 's/pathplan/plan/g' \
	  > $(CURDIR)/debian/graphviz/usr/lib/graphviz/pkgIndex.tcl 
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/pi.tcl
	#  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
	#  setup lefty by copying (from lib) and cleaning both
	cp $(CURDIR)/debian/graphviz/usr/lib/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
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/lefty/[sfbt]*
	rm -f $(CURDIR)/debian/graphviz/usr/lib/graphviz/lefty/def.*
	#  setup lefty by removing execute perms
	chmod 644 $(CURDIR)/debian/graphviz/usr/lib/graphviz/lefty/*
	#  remove execute perms from examples dir
	chmod -R -x $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/*
	#  hrm... remove extra copy of lefty-grace
	rm -rf $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/contrib/lefty-grace/lefty-grace
	#  also since we don't distribute the libs and the man-pages comflict, let's remove them
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/man3/graph.3*
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/man3/expr.3*
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/man3/cdt.3*
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/man3/agraph.3*
	#  fixup gvr overlap with gvr package
	mv $(CURDIR)/debian/graphviz/usr/bin/gpr \
	$(CURDIR)/debian/graphviz/usr/bin/gvgpr
	mv $(CURDIR)/debian/graphviz/usr/share/man/man1/gpr.1 \
	$(CURDIR)/debian/graphviz/usr/share/man/man1/gvgpr.1
	#  fixup colorize overlap with ???? package
	mv $(CURDIR)/debian/graphviz/usr/bin/colorize \
	$(CURDIR)/debian/graphviz/usr/bin/gvcolorize
	mv $(CURDIR)/debian/graphviz/usr/share/man/man1/colorize.1 \
	$(CURDIR)/debian/graphviz/usr/share/man/man1/gvcolorize.1

check:
#	mv $(CURDIR)/debian/graphviz/usr/lib/graphviz/pkgIndex.tcl \
#	  $(CURDIR)/debian/graphviz/usr/lib/graphviz/Tcldot
	#   more to do here (rest of libs)

# 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
	dh_installexamples
#	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
	dh_installman debian/lneato.1
#	dh_installinfo
#	dh_undocumented 
	dh_installchangelogs ChangeLog
	#  remove developer man/man3 pages which are not needed by user
#	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/man3
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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