File: rules

package info (click to toggle)
libfm 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 9,224 kB
  • sloc: ansic: 58,273; sh: 4,387; makefile: 773; xml: 180; python: 29
file content (61 lines) | stat: -rwxr-xr-x 1,537 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
#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
CONFIGURE_OPTIONS = --with-extra-only
else
CONFIGURE_OPTIONS = --enable-udisks
ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),)
ifneq ($(filter libfm-doc,$(shell dh_listpackages)),)
CONFIGURE_OPTIONS += --enable-gtk-doc
endif
endif
endif

%:
	dh ${@}

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_OPTIONS)

override_dh_auto_install:
	dh_auto_install

	# split extra headers
	mkdir -p debian/libfm-extra-dev/usr/include/libfm-1.0
	for file in fm-extra.h fm-version.h fm-xml-file.h; do \
		mv debian/tmp/usr/include/libfm-1.0/$$file debian/libfm-extra-dev/usr/include/libfm-1.0/; \
	done

	# removing unused files
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.a
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

override_dh_install:
ifneq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),)
	# in nodoc mode no documentation will be installed
	mkdir -p debian/tmp/usr/share/gtk-doc/html/libfm
endif
	dh_install

override_dh_missing:
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_makeshlibs:
	# modules are not shared libs so disable processing for them
	dh_makeshlibs -X/modules/

override_dh_auto_clean:
	test -f docs/Makefile && cd docs && $(MAKE) distclean || true
	dh_auto_clean

ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
override_dh_auto_test:
	# will not work for stage1
endif