File: rules

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (89 lines) | stat: -rwxr-xr-x 2,600 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS      = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND     = -Wl,--as-needed

%:
	dh $@ --with python3

override_dh_clean:
	dh_clean

override_dh_autoreconf:
	dh_autoreconf $(CURDIR)/autogen.sh

override_dh_auto_configure:
ifeq ($(DEB_BUILD_ARCH_OS), linux)
	dh_auto_configure -- \
	    --enable-uinput --enable-devinput \
	    --enable-silent-rules
else
	dh_auto_configure -- \
	    --disable-uinput --disable-devinput \
	    --enable-silent-rules
endif


override_dh_shlibdeps:
	dh_shlibdeps -l $(CURDIR)/debian/tmp/usr/lib/*/lirc/plugins

override_dh_auto_install:
	$(MAKE) V=0 DESTDIR=$(CURDIR)/debian/tmp install
	py3clean debian/tmp
	find debian/tmp -name *.la -delete
	rm -f debian/tmp/usr/share/doc/lirc/lirc.org/api-docs/api-docs
	chmod 755 debian/tmp/usr/share/lirc/python-pkg/lirc/lirctool
ifeq ($(DEB_BUILD_ARCH_OS), linux)
	mkdir -p debian/tmp/usr/lib/tmpfiles.d
	echo "d /run/lirc  0755  root  root  10d" \
	    > debian/tmp/usr/lib/tmpfiles.d/lirc.conf
endif
	# Temporary postinstall 0.9.4 script.
	cp debian/lirc-old2new debian/tmp/usr/share/lirc
	# Don't overwrite existing config files.
	for f in lircd.conf lircmd.conf irexec.lircrc lirc_options.conf; do \
	    mv debian/tmp/etc/lirc/$$f debian/tmp/etc/lirc/$$f.dist; \
	done

override_dh_auto_test:
ifneq "nocheck"  "$(findstring nocheck,$(DEB_BUILD_OPTIONS))"
	tools/lirc-lsplugins -U plugins/.libs -s | tee summary
	grep -q "Errors: 0" summary && rm summary
	case $$(dpkg-architecture -qDEB_HOST_GNU_SYSTEM) in \
	    kfreebsd* | gnu) \
	        :  ;; \
	    *)  \
	        cd python-pkg/tests; \
	        python3 -m unittest discover && rm backend.log \
		;; \
	esac
endif

override_dh_installsystemd:
ifeq ($(DEB_BUILD_ARCH_OS), linux)
	dh_installsystemd -p lirc lircd.socket
	dh_installsystemd -p lirc --no-enable --no-start lircd.service
	dh_installsystemd -p lirc --no-enable --no-start irexec.service
	dh_installsystemd -p lirc --no-enable --no-start lircmd.service
	dh_installsystemd -p lirc --no-enable --no-start lircd-uinput.service
endif

override_dh_install:
	dh_install --fail-missing

override_dh_installinit:
	dh_installinit --package=lirc --name=lircd
	dh_installinit --package=lirc --name=lircmd
	dh_installinit

override_dh_python3:
	dh_python3
	dh_python3 debian/tmp/usr/lib/*/python*/site-packages/lirc
	dh_python3 debian/tmp/usr/lib/*/python*/site-packages/lirc-setup
	dh_python3 debian/tmp/usr/share/lirc/python-pkg

override_dh_fixperms-arch:
	dh_fixperms
	chmod 755 debian/lirc/usr/share/lirc/contrib/irman2lirc