File: rules

package info (click to toggle)
gtk-sharp2 2.12.40-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 26,620 kB
  • ctags: 6,739
  • sloc: xml: 351,292; cs: 26,443; sh: 4,228; ansic: 2,915; makefile: 1,288; perl: 1,179
file content (123 lines) | stat: -rwxr-xr-x 3,208 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
#!/usr/bin/make -f

#export DH_VERBOSE=1
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
export MONO_SHARED_DIR=$(CURDIR)

CFLAGS ?= -O2 -Wall -g
LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

API_VERSION = 2.12.40

UPVERSION = $(shell dpkg-parsechangelog | grep ^Vers | cut -d\  -f2 | sed 's,-.*,,')
NEXT_UPVERSION = $(shell perl -e '$$_=pop; s/(\d+)$$/$$1+1/e; print' $(UPVERSION))

MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..

DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')

get-orig-source:
	uscan \
		--package $(DEB_SOURCE_NAME) \
		--watchfile $(DEBIAN_DIR)/watch \
		--upstream-version $(VERSION) \
		--download-version $(VERSION) \
		--destdir . \
		--force-download \
		--rename

config: config-stamp
config-stamp:
	dh_testdir
	dh_autoreconf --as-needed
	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=/usr RUNTIME=/usr/bin/cli CSC=/usr/bin/mono-csc MONO_CAIRO_LIBS=-r:Mono.Cairo MONO_CAIRO_CFLAGS=" "
	touch config-stamp

build-indep: build-indep-stamp
build-indep-stamp: config-stamp
	dh_testdir
	$(MAKE) RUNTIME=/usr/bin/cli
	# generate Gtk#2 docs (for monodoc)
	cd doc/ && $(MAKE) assemble
	touch build-indep-stamp

build-arch: build-arch-stamp
build-arch-stamp: config-stamp
	dh_testdir
	$(MAKE) RUNTIME=/usr/bin/cli
	touch build-arch-stamp

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean RUNTIME=/usr/bin/cli
	rm -f config-stamp build-indep-stamp build-arch-stamp
	rm -rf $(MONO_SHARED_DIR)/.wapi
	dh_autoreconf_clean
	dh_clean

install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp RUNTIME=/usr/bin/cli

binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installdirs -i
	dh_movefiles -i
	dh_link -i
	# we must install arch dep and indep here! dh_clideps will get problems otherwise
	dh_install
	install -m755 $(CURDIR)/debian/list-examples $(CURDIR)/debian/gtk-sharp2-examples/usr/bin/gtk-sharp2-examples-list
	dh_installchangelogs -i ChangeLog
	dh_installdocs -i
	dh_installman -i
	dh_compress -i
	dh_fixperms -i
	dh_clifixperms -i
	dh_clistrip -i
	umask 022 && dh_cligacpolicy -i
	dh_makeclilibs -m $(API_VERSION)
	dh_installcligac -i
	dh_clideps -i -d
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build-arch install
	dh_testdir
	dh_testroot
	dh_movefiles -a
	dh_link -a
	# we must install arch dep and indep here! dh_clideps will get problems otherwise
	dh_install
	dh_installchangelogs -a ChangeLog
	dh_installdocs -a
	dh_installman -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_clifixperms -a
	dh_clistrip -a
	umask 022 && dh_cligacpolicy -a
	dh_makeclilibs -m $(API_VERSION)
	dh_installcligac -a
	dh_clideps -a -d
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

build: build-indep build-arch
binary: binary-indep binary-arch

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