File: rules

package info (click to toggle)
ruby-gnome2 0.15.0-1.1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,704 kB
  • ctags: 8,558
  • sloc: ansic: 69,912; ruby: 19,511; makefile: 97; xml: 35; sql: 13
file content (132 lines) | stat: -rwxr-xr-x 3,899 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Debian rules file for ruby-gnome2.
# Dafydd Harries <daf@rhydd.org>; 2003-2006.

ruby = ruby1.8

config      = $(shell $(ruby) -rrbconfig -e 'puts Config::CONFIG["$(1)"]')
rubylibdir := $(call config,rubylibdir)
archdir    := $(call config,archdir)

include /usr/share/quilt/quilt.make

packages = $(shell \
	find -mindepth 1 -maxdepth 1 -type d ! -name '.*' -printf '%P\n' |\
	grep -v debian |\
	grep -v poppler)

# These are parameterised rules for build-*-stamp, build-*, install-* and
# binary-* targets for bindings. They also automatically generate dependencies
# for the build-stamp, install and binary-arch targets. Example of use:
#
# 	fakeroot ./debian/rules binary-gtk

define package_template
build-$(1)-stamp: configure
	dh_testdir
	$(ruby) exec_make.rb --strict $(1) make all
	touch build-$(1)-stamp

build-$(1): build-$(1)-stamp

build-stamp: build-$(1)

install-$(1): build-$(1)
	dh_testdir
	dh_testroot
	$(ruby) exec_make.rb --strict $(1) make \
		DESTDIR=$(CURDIR)/debian/$(2)-ruby \
		sitelibdir=$(CURDIR)/debian/$(2)-ruby$(rubylibdir) \
		sitearchdir=$(CURDIR)/debian/$(2)-ruby$(archdir) install
	dh_installdocs -p$(2)-ruby debian/README.Debian NEWS AUTHORS $(1)/README
	dh_installchangelogs -p$(2)-ruby $(1)/ChangeLog

install: install-$(1)

binary-$(1): install-$(1)
	dh_testdir
	dh_testroot
	if test -d $(1)/sample; then \
		dh_installexamples -p$(2)-ruby -XCOPYING $(1)/sample/*; fi
	find debian/$(2)-ruby/usr/share/doc/$(2)-ruby -name '*.rb*' \
		-exec chmod 644 '{}' ';'
	@# package-specific command hook
	$$(call binary_$(1)_commands)
	dh_strip -p$(2)-ruby
	dh_fixperms -p$(2)-ruby
	dh_shlibdeps -p$(2)-ruby
	dh_gencontrol -p$(2)-ruby
	dh_compress -p$(2)-ruby
	dh_md5sums -p$(2)-ruby
	dh_builddeb -p$(2)-ruby

binary-arch: binary-$(1)

.PHONY: build-$(1) install-$(1) binary-$(1)
endef

define binary_libglade_commands
	dh_installman -plibglade2-ruby debian/ruby-glade-create-template.1
endef

# Generate rules for each binding.

$(eval $(call package_template,glib,libglib2))
$(eval $(call package_template,atk,libatk1))
$(eval $(call package_template,pango,libpango1))
$(eval $(call package_template,gdkpixbuf,libgdk-pixbuf2))
$(eval $(call package_template,gtk,libgtk2))
$(eval $(call package_template,libart,libart2))
$(eval $(call package_template,gnomecanvas,libgnomecanvas2))
$(eval $(call package_template,gnome,libgnome2))
$(eval $(call package_template,gconf,libgconf2))
$(eval $(call package_template,libglade,libglade2))
$(eval $(call package_template,gtkhtml2,libgtkhtml2))
$(eval $(call package_template,libgda,libgda2))
$(eval $(call package_template,gtkglext,libgtkglext1))
$(eval $(call package_template,gnomevfs,libgnomevfs2))
$(eval $(call package_template,gstreamer,libgstreamer0.8))
$(eval $(call package_template,gtksourceview,libgtksourceview1))
$(eval $(call package_template,panel-applet,libpanel-applet2))
$(eval $(call package_template,gnomeprint,libgnomeprint2))
$(eval $(call package_template,gnomeprintui,libgnomeprintui2))
$(eval $(call package_template,rsvg,librsvg2))
$(eval $(call package_template,gtkmozembed,libgtk-mozembed))
$(eval $(call package_template,vte,libvte))

configure-stamp:
	dh_testdir
	$(ruby) extconf.rb --strict $(packages)
	touch configure-stamp

configure: patch configure-stamp

clean: vacuum unpatch

vacuum: configure
	dh_testdir
	dh_testroot
	rm -f *-stamp
	$(MAKE) distclean
	dh_clean gnomeprintui/src/libgnomeprintui-enum-types.? \
		vte/mkmf.log poppler/mkmf.log

build-stamp:
	dh_testdir
	touch build-stamp

build: build-stamp

binary-indep:
	dh_testdir
	dh_testroot
	dh_installchangelogs -pruby-gnome2 ChangeLog
	dh_installdocs -pruby-gnome2 debian/README.Debian README NEWS AUTHORS
	dh_compress -pruby-gnome2
	dh_gencontrol -pruby-gnome2
	dh_builddeb -pruby-gnome2

binary: binary-indep binary-arch

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