File: rules

package info (click to toggle)
ruby-gnome2 0.12.0-2sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,820 kB
  • ctags: 7,421
  • sloc: ansic: 61,387; ruby: 17,307; makefile: 85; xml: 35; sql: 13
file content (116 lines) | stat: -rwxr-xr-x 3,391 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
#!/usr/bin/make -f
# Debian rules file for ruby-gnome2.
# Dafydd Harries <daf@muse.19inch.net>; 2003, 2004.

# 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

ruby=ruby1.8

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 $(1) make \
		DESTDIR=$(shell pwd)/debian/$(2)-ruby \
		sitedir=$(shell pwd)/debian/$(2)-ruby/usr/lib/ruby 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 $(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))

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

configure: configure-stamp

clean: configure
	dh_testdir
	dh_testroot
	rm -f *-stamp
	dh_clean Makefile gnomeprintui/src/libgnomeprintui-enum-types.?
	$(ruby) exec_make.rb "`find * -maxdepth 0 -type d | grep -v debian`" \
		make distclean

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 clean build install binary-indep binary-arch binary