File: rules

package info (click to toggle)
glade 2.12.1-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,252 kB
  • ctags: 4,324
  • sloc: ansic: 61,658; sh: 8,782; xml: 3,203; makefile: 477
file content (151 lines) | stat: -rwxr-xr-x 3,533 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
#!/usr/bin/make -f
#-*- makefile -*-

#export DH_VERBOSE=1
export DH_OPTIONS

# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk

p_dir = $(CURDIR)/debian
p_gtk = glade
p_gnome = glade-gnome
p_doc = glade-doc
p_common = glade-common
build_gtk = debian/tmp-gtk
build_gnome = debian/tmp-gnome

dirs_to_clean = $(build_gtk) $(build_gnome)
files_to_clean = debian/glade-gnome.links
stamps_to_clean = build-gtk-stamp build-gnome-stamp

CFLAGS = -g

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


build :


build-gtk: build-gtk-stamp
build-gtk-stamp: patch
	dh_testdir
	if test -f build-gnome-stamp; then \
	  $(MAKE) distclean; \
	  rm -f build-gnome-stamp; \
	fi
	./configure --prefix=/usr --disable-gnome
	$(MAKE)
	touch build-gtk-stamp

build-gnome: build-gnome-stamp
build-gnome-stamp: patch
	dh_testdir
	if test -f build-gtk-stamp; then \
	  $(MAKE) distclean; \
	  rm -f build-gtk-stamp; \
	fi
	./configure --prefix=/usr --enable-gnome-db
	$(MAKE)
	touch build-gnome-stamp

clean::	unpatch
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	-rm -f $(stamps_to_clean)
	-rm -f $(files_to_clean)
	-rm -rf $(dirs_to_clean)
#	-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:
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) -f debian/rules install-gtk
	$(MAKE) -f debian/rules install-gnome

install-gtk: DH_OPTIONS=-p$(p_gtk)
install-gtk: build-gtk
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/$(build_gtk)
	chmod a+x $(build_gtk)/usr/share/glade-2/gtk/autogen.sh

	dh_install

install-gnome: DH_OPTIONS=-p$(p_gnome) -p$(p_common) -p$(p_doc)
install-gnome: build-gnome
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/$(build_gnome)

	chmod a+x $(build_gnome)/usr/share/glade-2/gtk/autogen.sh
#	chmod a+x $(build_gnome)/usr/share/glade-2/gnome/autogen.sh

	cat debian/glade-gnome.links.doc > debian/glade-gnome.links
	cd /usr/share/aclocal && ls gnome*.m4 | xargs -i echo \
	  /usr/share/aclocal/{} /usr/share/glade-2/gnome/{} \
	  >> $(p_dir)/glade-gnome.links
#	cp -a macros/gperf-check.m4 $(build_gnome)/usr/share/glade-2/gnome/

	dh_install

# just for lintian only (zero-byte-file):
	rm -f debian/$(p_common)/usr/share/doc/$(p_common)/examples/editor/NEWS
	rm -f \
	  debian/$(p_common)/usr/share/doc/$(p_common)/examples/editor/po/ChangeLog
# end of lintian cosmetics

# Build architecture-independent files here.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs -p$(p_common)
	dh_installchangelogs -p$(p_common) ChangeLog
# Silly dh_installdocs shouldn't have installed this
	-rm -r debian/$(p_doc)/usr/share/doc/$(p_doc) 
	dh_scrollkeeper
	dh_installdeb
	dh_gencontrol
	dh_compress -X.c -X.h -X.sh -X.glade -X.xml
	dh_link
	dh_fixperms
	dh_strip
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdocs
	dh_installmenu
	dh_installman
#	dh_installchangelogs ChangeLog
	dh_desktop
	dh_compress -X.c -X.h -X.sh -X.glade -X.xml
	dh_link
	dh_fixperms
	dh_strip
	dh_perl
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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