File: rules

package info (click to toggle)
graphviz 2.2.1-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 24,184 kB
  • ctags: 37,810
  • sloc: ansic: 160,746; sh: 18,331; cpp: 13,782; objc: 3,971; yacc: 2,346; makefile: 1,589; tcl: 1,280; perl: 706; lex: 153; awk: 150
file content (150 lines) | stat: -rwxr-xr-x 5,040 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
#!/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 \
	--datadir=\$${prefix}/share \
	--infodir=\$${prefix}/share/info \
	--with-x \
	--with-tcl=/usr \
	--with-tk=/usr
 
	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) clean
	-rm -f cdt/*.lo
	# remove fluff from upstream package (per lintian)
	-rm -f config.log 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
    #
	#  Rearrange install tree (upstream differences)
    #
	#  move demo tree from lib to examples
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/demo/* \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/demo
	#  move stuff from lib to examples
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/graphs \
	  $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples
	#  Remove unneeded parts of TCL/TK libraries
	(cd $(CURDIR)/debian/graphviz/usr/lib/graphviz; \
	  for LIB in libtcldot libgdtclft libtclplan libtkspline; do \
	   rm -f $${LIB}.la; \
	   rm -f $${LIB}.so; \
	   rm -f $${LIB}.so.0; \
	  done; \
	 cd -) 
	#  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 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.*
	#  hrm... remove extra copy of lefty-grace
	rm -rf $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/contrib/lefty-grace/lefty-grace
	#  remove badly placed man(n) pages
	rm -rf $(CURDIR)/debian/graphviz/usr/share/man/mann
	#  remove badly placed lefty
	rm -rf $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/lefty
	#  setup lefty by removing execute perms
	chmod 644 $(CURDIR)/debian/graphviz/usr/share/graphviz/lefty/*
	#  move incorrect doc tree to proper location
	mv $(CURDIR)/debian/graphviz/usr/share/graphviz/doc/* \
       $(CURDIR)/debian/graphviz/usr/share/doc/graphviz
	#  remove execute perms from examples dir
	chmod -R -x $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/examples/*
	#  remove bizarre arrival of copying file
	rm -f $(CURDIR)/debian/graphviz/usr/share/doc/graphviz/COPYING*
	# now move files into proper binary-package subdirs
	dh_movefiles --sourcedir=debian/graphviz
	#  remove empty dir trees
	rmdir $(CURDIR)/debian/graphviz/usr/share/graphviz/doc
	rmdir $(CURDIR)/debian/graphviz/usr/lib/graphviz/pkgconfig
	rmdir $(CURDIR)/debian/graphviz/usr/share/man/man3
	rmdir $(CURDIR)/debian/graphviz/usr/include/graphviz
	rmdir $(CURDIR)/debian/graphviz/usr/include

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

# 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 debian/index.html
	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
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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