File: rules

package info (click to toggle)
gcin 2.9.4%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,812 kB
  • sloc: cpp: 34,326; ansic: 9,319; makefile: 648; sh: 556
file content (50 lines) | stat: -rwxr-xr-x 1,766 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# Circumvent FTBFS:
# gtab-buf.cpp:1339:57: note: expected ‘char (*)[65]’ but argument is of type ‘char (*)[64]’
export DEB_CFLAGS_MAINT_APPEND = -Wno-incompatible-pointer-types

export DEB_CFLAGS_MAINT_APPEND += -std=gnu17

GTK3VER := $(shell pkg-config --variable=gtk_binary_version gtk+-3.0)
GTK3_IMMODULES := $(shell pkg-config --variable=libdir gtk+-3.0)/libgtk-3-0/gtk-query-immodules-3.0

%:
	dh $@ --no-parallel --no-dwz-multifile

override_dh_auto_configure:
	dh_auto_configure -- --gcinlibdir=/usr/lib/$(DEB_HOST_MULTIARCH)/gcin

	sed 's,%%GTK_QUERY_IMMODULES%%,$(GTK3_IMMODULES),g' $(CURDIR)/debian/gcin-gtk-immodule.postinst.in > $(CURDIR)/debian/gcin-gtk3-immodule.postinst
	sed 's,%%GTK_QUERY_IMMODULES%%,$(GTK3_IMMODULES),g' $(CURDIR)/debian/gcin-gtk-immodule.postrm.in > $(CURDIR)/debian/gcin-gtk3-immodule.postrm

override_dh_auto_install:
	make install DESTDIR=$(CURDIR)/debian/tmp

	# move libraries to the correspond gtk version
	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-3.0/$(GTK3VER)
	mv debian/tmp/usr/lib/gtk-3.0/immodules debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-3.0/$(GTK3VER)/

	# workaround to move arch-dep tables to /usr/lib
	mv debian/tmp/usr/share/gcin/table debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gcin/table
	ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/gcin/table debian/tmp/usr/share/gcin/table

override_dh_missing:
	dh_missing --fail-missing \
		--exclude=Changelog.html \
		--exclude=README.html \
		--exclude=gcin.png \
		$(NULL)

override_dh_installchangelogs:
	dh_installchangelogs Changelog.html

override_dh_makeshlibs:
	dh_makeshlibs -n