File: rules

package info (click to toggle)
libgtkdatabox 1:0.9.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 8,316 kB
  • sloc: ansic: 7,522; sh: 4,152; makefile: 195; xml: 22
file content (67 lines) | stat: -rwxr-xr-x 2,329 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
#!/usr/bin/make -f
# rules file for gtkdatabox using dh
# Andreas Tille <tille@debian.org>
# License: GPL

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

include /usr/share/dpkg/default.mk
devpkg := $(shell grep -- "-dev" debian/control | sed -n 's/^Package: //p' | head -n 1)
docpkg := $(shell grep -- "-doc" debian/control | sed -n 's/^Package: //p' | head -n 1)
gladepkg := $(shell grep -- "-glade" debian/control | sed -n 's/^Package: //p' | head -n 1)
libglade := $(shell grep -- "-libglade" debian/control | sed -n 's/^Package: //p' | head -n 1)

%:
	dh $@

DEB_INSTALL_DOCS_ALL := AUTHORS README

DEB_CONFIGURE_EXTRA_FLAGS += \
			--enable-libglade \
			--enable-glade \
			--enable-gtk-doc

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)

override_dh_compress:
	dh_compress --exclude=.devhelp

override_dh_install:
	dh_install
	# Do not use debian/$(devpkg).examples as debhelper input because
	# you always have to adapt the file name when a new version pops up
	mkdir -p debian/$(devpkg)/usr/share/doc/$(devpkg)/examples
	cp -a examples/*.[ch] examples/*.glade debian/$(devpkg)/usr/share/doc/$(devpkg)/examples
	cp -a debian/Makefile.testdatabox debian/$(devpkg)/usr/share/doc/$(devpkg)/examples/Makefile
	# Same here for the other binary packages to avoid renaming
	dh_install -p$(gladepkg) usr/share/glade/catalogs/gtkdatabox.xml
	dh_install -p$(gladepkg) usr/lib/$(DEB_HOST_MULTIARCH)/glade/modules/libgladedatabox.*
	dh_install -p$(libglade) usr/lib/*/libglade/2.0/libdatabox.*

	# Call d-shlibmove to comply with library packaging guide
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --movedev "debian/tmp/usr/include" usr \
                    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/$(DEB_SOURCE).so
	rm `find debian -name '*.la'`

override_dh_installdocs:
	dh_installdocs $(DEB_INSTALL_DOCS_ALL)
	find debian -name "*.md5" -delete

override_dh_auto_clean:
	dh_auto_clean
	if [ -d docs/reference.orig ] ; then \
	    rm -rf docs/reference ; \
	    mv docs/reference.orig docs/reference ; \
	fi

override_dh_link:
	dh_link
	dh_link -p$(devpkg) usr/share/doc/$(devpkg)/html usr/share/gtk-doc/html/gtkdatabox