File: rules

package info (click to toggle)
ggobi 2.1.10-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,080 kB
  • sloc: ansic: 53,256; xml: 28,411; sh: 11,700; makefile: 257; sed: 16
file content (185 lines) | stat: -rwxr-xr-x 5,502 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
175
176
177
178
179
180
181
182
183
184
185
#!/usr/bin/make -f
# 							-*- makefile -*-
# debian/rules file for the Debian/GNU Linux ggobi package
# Copyright 2002 - 2009 by Dirk Eddelbuettel <edd@debian.org>

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

package	:= $(shell grep Package debian/control | sed 's/^Package: //')
debtmp	:= $(CURDIR)/debian/$(package)
plugins := "DataViewer DescribeDisplay GraphAction VarCloud ggvis"

configure: configure-stamp
#configure-stamp: patch-stamp
configure-stamp: 
	dh_testdir

#	GGOBI_HOME=/usr/lib/ggobi			\
#	GGOBI_ROOT=/usr/lib/ggobi			

#	./bootstrap
#       ## same as 
#	autoreconf -iv --force
#	autopoint -f

	./configure	--prefix=/usr			\
			--with-all-plugins		

#			--with-plugins="DataViewer DescribeDisplay ggvis GraphAction VarCloud"

#			--without-plugins

#			--enable-embed			\
#			--with-dataviewer		\
#			--with-describedisplay		\
#			--with-ggvis			\
#			--without-graphaction		\
#			--without-graphlayout		\
#			--with-varcloud			

#			--with-xml=/usr/include/libxml2	
        # 3 Aug 2004: turn off all plugins
# 			--without-graphlayout		\
# 			--without-graphaction		\
# 			--without-ggvis			\
# 			--without-dataviewer		\
# 			--without-varcloud		\
# 			--without-describedisplay	\
# 			--without-gtk2			\
# 			--without-postgres		\
# 			--without-fileselector		\
# 			--without-plugins		\
# 			--without-R			\
# 			--without-Python		\
# 			--without-Perl
	touch configure-stamp

build: configure build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

#clean: clean1 unpatch
clean: clean1 
clean1:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp install-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean 	src/libggobi.so src/xmlConvert.o src/config.h   \
			bin/ggobi.bin	bin/xmlConvert   bin/setLD.csh  \
			bin/ggobi	bin/ggobi-config bin/setLD.bsh  \
			src/ggobiMain.o \
			config.log	config.status	 config.cache	\
			Makeconf	GNUmakefile	 bugTemplate	\
			lib/*		.CRulesFrag	 local.config	\
			ggobi
	rm -vf gtkext/src/*.so
	find plugins -name \*.o -o -name \*.so -o -name config.log|xargs rm -vf
	find . -name config.cache -o -name config.status | xargs rm -vf

tryfix:
	cp bin/ggobi-config bin/ggobi-config-backup
        # Need to fix cflags, libs and ld-library-path options for ggobi-config
	perl -p -i -e "s|^CFLAGS=.*|CFLAGS=\"-I/usr/lib/ggobi/include\"|; s|^LIBS=.*|LIBS=\"-L/usr/lib/ggobi/lib -lggobi\"|; s|echo \"/home/.*\"|echo \"/usr/lib/ggobi/lib\"|" bin/ggobi-config-backup


install: build install-stamp 
install-stamp:
	dh_testdir
	dh_testroot
	dh_prep
#	dh_installdirs	usr/bin	\
#			usr/lib/ggobi/bin usr/lib/ggobi/lib \
#			usr/lib/ggobi/include		    \
#			usr/lib/ggobi/data

        # edd: the GNUmakefile has a broken install
        # edd 25 Mar 2006  reactivated under Ggobi 2.1.1
	$(MAKE) install prefix=$(debtmp)/usr

        # install ggobirc into /etc/xdg/ggobi
	$(MAKE) ggobirc
	dh_installdirs	etc/xdg/ggobic
	dh_install ggobirc etc/xdg/ggobi/
#       # so do it manually	
# 	for i in ggobi ggobi-config; \
# 		do install -v -c -m 0755   bin/$$i  $(debtmp)/usr/bin/; done
# 	for i in setLD.bsh setLD.csh; do \
# 		install -v -c -m 0644   bin/$$i  \
# 				$(debtmp)/usr/lib/ggobi/bin/; done
# 	install -v -c -m 0755   bin/ggobi.bin  $(debtmp)/usr/lib/ggobi/bin/
# 	for i in libggobi.so libgtkext.so; do \
# 		install -v -c -m 0755   lib/$$i  \
# 					$(debtmp)/usr/lib/ggobi/lib/; done
# 	install -c -m 0644 include/* 	$(debtmp)/usr/lib/ggobi/include
#	install -c -m 0644 data/* 	$(debtmp)/usr/lib/ggobi/data
#         # 
#         # slightly modified version of ggobi shell script
# 	install -v -c -m 0755 debian/ggobi 	$(debtmp)/usr/bin/

        # edd 26 Mar 2006  plugins/ should not be in share, move to lib
        # edd 02 Dec 2006  correcting softlink, now it even works
	dh_installdirs usr/lib/ggobi
	(cd $(debtmp)/usr/share/ggobi 			&& \
		mv -v plugins ../../lib/ggobi/ 		&& \
		ln -svf ../../lib/ggobi/plugins .	)	

        # 15 Dec 2009  remove la files
        # 23 Jan 2010  undo this and keep them
        #-rm -v $(debtmp)/usr/lib/ggobi/plugins/*/plugin.la
	-rm -rf $(debtmp)/usr/etc/

        # edd 08 May 2011
        # empty dependency_lib in .la files (cf #621213)	
	find $(debtmp) -name \*.la | \
		xargs perl -p -i -e "s/dependency_libs='.*'/dependency_libs=''/" 


	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		doc/manual.pdf doc/XML.pdf
#	dh_installexamples	data/*
#	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
	dh_installman		debian/ggobi.1 debian/ggobi-config.1 
#	dh_installinfo
#	dh_undocumented		ggobi.1 ggobi-config.1 xmlConvert.1
	dh_installchangelogs 
	dh_install -a debian/ggobi.xpm usr/share/pixmaps/
	dh_install -a xdg/ggobi.desktop usr/share/applications/
	dh_lintian
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
        # clean up zero-length file (lintian)
#	-rm 		$(debtmp)/usr/share/doc/ggobi/commandArgs.html
#	dh_suidregister
	dh_makeshlibs
	dh_installdeb
#	dh_perl
##	edd: not sure how to suppress the warnings
#	dh_shlibdeps	-Xlibgtkext -Xlibggobi
	dh_shlibdeps	
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure 
#.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch