/[pkg-gnome]/desktop/unstable/gtk+3.0/debian/rules
ViewVC logotype

Contents of /desktop/unstable/gtk+3.0/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54840 - (show annotations) (download)
Sun Nov 12 22:53:41 2017 UTC (2 months ago) by biebl
File size: 6898 byte(s)
Reposition arguments for dh_autoreconf

Fixes the following warning:

dh_autoreconf "NOCONFIGURE=true ./autogen.sh"
dh_autoreconf: doit() + doit_*() calls will no longer spawn a shell in compat 12 for single string arguments (please use complex_doit instead)
dh_autoreconf: This feature will be removed in compat 12.

1 #!/usr/bin/make -f
2
3 GNOME_MODULE = gtk+
4 DISABLE_UPDATE_UPLOADERS = 1
5 include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
6 include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
7 include /usr/share/dpkg/default.mk
8
9 binaries := $(shell dh_listpackages)
10
11 # Ensure the build aborts when there are still references to undefined symbols
12 # currently fails at least in the im-multipress im module
13 #LDFLAGS += -Wl,-z,defs
14
15 # Make the linker work a bit harder so dynamic loading can be done faster
16 LDFLAGS += -Wl,-O1
17
18 APIVER := 3
19 SONAME := 0
20
21 LIBDIR := usr/lib/$(DEB_HOST_MULTIARCH)
22
23 # earliest version that this release has backwards binary compatibility for
24 GTK_BINARY_VERSION := 3.0.0
25
26 # Gtk binary version virtual Provide
27 GTK_BINVER_DEP := gtk$(APIVER)-binver-$(GTK_BINARY_VERSION)
28
29 # relative base directory for configuration
30 CONFDIR := etc/gtk-3.0
31
32 # relative base directory for all types of modules
33 MODULES_BASE_PATH := $(LIBDIR)/gtk-3.0/$(GTK_BINARY_VERSION)
34 OLD_MODULES_BASE_PATH := usr/lib/gtk-3.0/$(GTK_BINARY_VERSION)
35
36 # package names
37 SHARED_PKG := libgtk-$(APIVER)-$(SONAME)
38 COMMON_PKG := libgtk-$(APIVER)-common
39 DEV_PKG := libgtk-$(APIVER)-dev
40 UDEB_PKG := $(SHARED_PKG)-udeb
41 DOC_PKG := libgtk-$(APIVER)-doc
42 BIN_PKG := libgtk-$(APIVER)-bin
43 EXAMPLES_PKG := gtk-$(APIVER)-examples
44
45 # files larger than 4k in size will be compressed by dh_compress
46 # so append a .gz suffix to avoid dangling symlinks
47 NEWS := NEWS$(shell find -maxdepth 1 -size +4k -name NEWS -exec echo ".gz" \;)
48 README := README$(shell find -maxdepth 1 -size +4k -name README -exec echo ".gz" \;)
49
50 # Avoid test failures on buildd environments
51 export HOME=$(CURDIR)/debian/build
52 export XDG_RUNTIME_DIR=$(HOME)
53 # So that gsettings can find the (uninstalled) gtk schemas
54 export XDG_DATA_DIRS=/usr/share:$(CURDIR)/debian/build
55 # Put these back to their defaults if we are not running with a clean
56 # environment, so that they are based on the temporary $HOME above
57 unexport XDG_CACHE_HOME
58 unexport XDG_CONFIG_DIRS
59 unexport XDG_CONFIG_HOME
60 unexport XDG_DATA_HOME
61 # Get failing tests' stdout/err so we have some information when a build fails
62 export VERBOSE=1
63
64 # macro computing the list of 'debian/<pkg>.*" files which have a
65 # corresponding ".in" file; pass the list of packages in $(1)
66 dh_subst_files = $(patsubst %.in,%,$(wildcard $(addprefix debian/, $(addsuffix *.in, $(1)))))
67
68 debian/%: debian/%.in
69 dh_testdir
70 sed \
71 -e "s#@SONAME@#$(SONAME)#g" \
72 -e "s#@APIVER@#$(APIVER)#g" \
73 -e "s#@VERSION@#$(DEB_UPSTREAM_VERSION)#g" \
74 -e "s#@GTK_BINVER_DEP@#$(GTK_BINVER_DEP)#g" \
75 -e "s#@SHARED_PKG@#$(SHARED_PKG)#g" \
76 -e "s#@COMMON_PKG@#$(COMMON_PKG)#g" \
77 -e "s#@DEV_PKG@#$(DEV_PKG)#g" \
78 -e "s#@UDEB_PKG@#$(UDEB_PKG)#g" \
79 -e "s#@DOC_PKG@#$(DOC_PKG)#g" \
80 -e "s#@BIN_PKG@#$(BIN_PKG)#g" \
81 -e "s#@EXAMPLES_PKG@#$(EXAMPLES_PKG)#g" \
82 -e "s#@GNOME_TEAM@#$(UPLOADERS)#g" \
83 -e "s#@GTK_BINARY_VERSION@#$(GTK_BINARY_VERSION)#g" \
84 -e "s#@LIBDIR@#$(LIBDIR)#g" \
85 -e 's#@CONFDIR@#$(CONFDIR)#g' \
86 -e "s#@MODULES_BASE_PATH@#$(MODULES_BASE_PATH)#g" \
87 -e "s#@OLD_MODULES_BASE_PATH@#$(OLD_MODULES_BASE_PATH)#g" \
88 -e "s#@NEWS@#$(NEWS)#g" \
89 -e "s#@README@#$(README)#g" \
90 $@.in > $@
91
92 configure_flags_common = \
93 --libdir=/$(LIBDIR) \
94 --enable-test-print-backend
95
96 configure_flags_deb = \
97 --enable-broadway-backend \
98 --enable-x11-backend \
99 --enable-gtk-doc \
100 --enable-man \
101 --enable-shared \
102 --enable-introspection \
103 --enable-cloudprint \
104 --disable-static
105
106 ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
107 configure_flags_deb += --enable-colord
108 else
109 configure_flags_deb += --disable-colord
110 endif
111
112 ifeq (linux,$(DEB_HOST_ARCH_OS))
113 configure_flags_deb += --enable-wayland-backend
114 else
115 configure_flags_deb += --disable-wayland-backend
116 endif
117
118 ifeq ($(filter %-doc,$(binaries)),)
119 configure_flags_deb += --disable-gtk-doc --disable-man
120 endif
121
122 configure_flags_udeb = \
123 --disable-broadway-backend \
124 --disable-wayland-backend \
125 --enable-x11-backend \
126 --disable-introspection \
127 --disable-cloudprint \
128 --disable-colord \
129 --disable-xcomposite \
130 --disable-xdamage \
131 --disable-xfixes \
132 --disable-xrandr
133
134 %:
135 dh $@ --with gir
136
137 override_dh_clean: debian/control
138 # gross kludge to force control generation with the %.in target
139 touch debian/control.in
140 rm -f $(call dh_subst_files,$(binaries))
141 rm -f testsuite/reftests/*.ui.known_fail
142 rm -rf debian/build debian/install
143 # The build system does not automatically update the GResource files
144 # when resources change. Force an update in case we ship a patch which
145 # modifies the theme CSS files.
146 rm -f gtk/gtkresources.c gtk/gtkresources.h
147 dh_clean
148
149 # Add dependencies to generate files from the debian/*.in ones
150 override_dh_auto_build: $(call dh_subst_files,$(binaries))
151
152 override_dh_autoreconf:
153 NOCONFIGURE=true dh_autoreconf ./autogen.sh
154
155 override_dh_auto_configure: debian/control
156 dh_auto_configure \
157 --builddirectory=debian/build/deb \
158 -- \
159 $(configure_flags_common) \
160 $(configure_flags_deb) \
161 $(NULL)
162 ifneq ($(filter %-udeb,$(binaries)),)
163 dh_auto_configure \
164 --builddirectory=debian/build/udeb \
165 -- \
166 $(configure_flags_common) \
167 $(configure_flags_udeb) \
168 $(NULL)
169 endif
170
171 override_dh_auto_build:
172 dh_auto_build --builddirectory=debian/build/deb
173 ifneq ($(filter %-udeb,$(binaries)),)
174 dh_auto_build --builddirectory=debian/build/udeb
175 endif
176
177 override_dh_auto_test:
178 # Mark reftests with known failures as non-fatal
179 touch testsuite/reftests/nonresizable-size.ui.known_fail
180 touch testsuite/reftests/window-show-contents-on-map.ui.known_fail
181 touch testsuite/reftests/inherit-and-initial.ui.known_fail
182 touch testsuite/reftests/textview-margins.ui.known_fail
183 # So that gsettings can find the (uninstalled) gtk schemas
184 mkdir -p debian/build/glib-2.0/schemas/
185 cp gtk/org.gtk.* debian/build/glib-2.0/schemas/
186 glib-compile-schemas debian/build/glib-2.0/schemas/
187 # Remove LD_PRELOAD so we don't run with fakeroot, which makes dbus-related tests fail
188 env -u LD_PRELOAD dh_auto_test --builddirectory=debian/build/deb -- -k check -j1
189
190 override_dh_auto_install:
191 dh_auto_install --builddirectory=debian/build/deb --destdir=debian/install/deb
192 ifneq ($(filter %-udeb,$(binaries)),)
193 dh_auto_install --builddirectory=debian/build/udeb --destdir=debian/install/udeb
194 endif
195
196 override_dh_install:
197 dh_install -p$(UDEB_PKG) --sourcedir=debian/install/udeb
198 dh_install --remaining-packages --sourcedir=debian/install/deb
199
200 override_dh_missing:
201 dh_missing --sourcedir=debian/install/udeb --list-missing -X.la
202 dh_missing --sourcedir=debian/install/deb --list-missing -X.la
203
204 override_dh_installdocs:
205 dh_installdocs -p$(COMMON_PKG) AUTHORS README NEWS
206 dh_installdocs -p$(DOC_PKG) AUTHORS -X.in
207 dh_installdocs --remaining-packages -A AUTHORS
208
209 override_dh_makeshlibs:
210 dh_makeshlibs -p$(SHARED_PKG) -V --add-udeb=$(UDEB_PKG) -X$(MODULES_BASE_PATH) -- -c4
211 dh_makeshlibs -plibgail-3-0 -V -- -c4
212 dh_makeshlibs --remaining-packages -X$(MODULES_BASE_PATH)

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5