File: rules

package info (click to toggle)
mysql-query-browser 1.2.5beta-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 63,792 kB
  • ctags: 46,485
  • sloc: pascal: 249,299; ansic: 80,111; cpp: 72,467; sh: 25,271; objc: 20,015; yacc: 10,755; java: 9,917; xml: 4,580; php: 2,806; python: 1,566; sql: 1,563; makefile: 1,452; perl: 3
file content (182 lines) | stat: -rwxr-xr-x 5,530 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

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

# This has to be exported to make some magic below work.
export DH_OPTIONS



CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

configure: config-stamp
config-stamp:
	chmod +x debian/configupdate
	debian/configupdate update
	touch config-stamp

#Architecture 
build: configure build-arch build-indep

build-arch: build-arch-stamp
build-arch-stamp:  

	# Add here commands to compile the arch part of the package.
	cd mysql-gui-common; \
	if [ ! -e Makefile ]; then  ./configure --prefix=/usr --mandir=/usr/share/man \
				--infodir=/usr/share/info \
				--sysconfdir=/etc \
				--build=${DEB_BUILD_GNU_TYPE} \
				--host=${DEB_HOST_GNU_TYPE} \
				--with-commondirname=query-browser \
				--disable-dependency-tracking; fi; \
	$(MAKE)
	
	cd mysql-query-browser; \
	if [ ! -e Makefile ]; then ./configure --prefix=/usr --mandir=/usr/share/man \
				--infodir=/usr/share/info \
				--sysconfdir=/etc \
				--build=${DEB_BUILD_GNU_TYPE} \
				--host=${DEB_HOST_GNU_TYPE} \
				--with-commondirname=query-browser \
				--with-gtkhtml=libgtkhtml-3.8 \
				--disable-dependency-tracking; fi; \
	$(MAKE)

	#$(MAKE) 
	touch build-arch-stamp

build-indep: build-arch-stamp build-indep-stamp
build-indep-stamp:  

	# Add here commands to compile the indep part of the package.
	#$(MAKE) doc
	touch build-indep-stamp

clean:
	dh_testdir
	dh_testroot

	rm -f config-stamp build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#

	# Add here commands to clean up after the build process.
	cd mysql-query-browser; if [ -a Makefile ]; then $(MAKE) distclean; fi
	cd mysql-gui-common; if [ -a Makefile ]; then $(MAKE) distclean; fi
	# cd mysql-query-browser/source/linux/gtksourceview; if [ -a Makefile ]; then $(MAKE) distclean; fi
	# cd mysql-query-browser/source/linux/gtksourceview/docs; if [ -a Makefile ]; then $(MAKE) distclean; fi
	# cd mysql-query-browser/source/linux/gtksourceview/tests; if [ -a Makefile ]; then $(MAKE) distclean; fi
	cd mysql-query-browser/source/linux/gtksourceview/gtksourceview; if [ -a Makefile ]; then $(MAKE) distclean; fi
	
	# Clean up things not cleaned up in the makefiles
	for i in source/linux/gtksourceview/po/Makefile.in \
		source/linux/gtksourceview/po/Makefile \
		source/linux/gtksourceview/po/POTFILES \
		source/linux/stamp-h.in; \
	   do rm -f mysql-query-browser/$$i; \
	done
	rm -rf mysql-query-browser/autom4te.cache
	rm -rf mysql-query-browser/po/*.gmo
	rm -rf mysql-gui-common/po/*.gmo

	chmod +x debian/configupdate
	debian/configupdate reset
	dh_clean 

install-indep: install-arch
install-arch: install
#	dh_testdir
#	dh_testroot
#	dh_clean -k -i 
#	dh_installdirs -i
#
#	# Add here commands to install the indep part of the package into
#	# debian/<package>-doc.
#	#INSTALLDOC#
#
#	dh_install -i

# To build all we need arch, and vice-versa...
install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# installing binaries
	cd mysql-query-browser; $(MAKE) install DESTDIR=$(CURDIR)/debian/mysql-query-browser
	cd mysql-gui-common; $(MAKE) install DESTDIR=$(CURDIR)/debian/mysql-query-browser-common
	
	mv debian/mysql-query-browser/usr/share/mysql-gui/query-browser/* debian/mysql-query-browser-common/usr/share/mysql-gui/query-browser
	rmdir debian/mysql-query-browser/usr/share/mysql-gui/query-browser
	mv debian/mysql-query-browser/usr/share/applications debian/mysql-query-browser-common/usr/share
#	mv debian/mysql-query-browser/usr/share/mysql-gui/dolphin_anim.gif debian/mysql-query-browser-common/usr/share/mysql-gui
	mv debian/mysql-query-browser/usr/bin/mysql-query-browser-bin debian/mysql-query-browser/usr/bin/mysql-query-browser
	
	install -m644 -oroot -groot debian/mysql_query_browser.xpm debian/mysql-query-browser/usr/share/pixmaps
	
	# TEMPORARY - remove all translations as they are not used in 1.1.18 and break stuff
	rm -rf debian/mysql-query-browser/usr/share/locale
	rm -rf debian/mysql-query-browser-common/usr/share/locale
	
#	dh_install

# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
#	dh_installexamples
	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress 
	dh_fixperms
#	dh_perl
#	dh_python
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

manpage: debian/mysql-query-browser.xml
	xsltproc -''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl debian/mysql-query-browser.xml

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