File: rules

package info (click to toggle)
mfgtools 1.5.243-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,296 kB
  • sloc: cpp: 10,100; javascript: 546; python: 335; sh: 85; xml: 53; makefile: 18
file content (29 lines) | stat: -rwxr-xr-x 996 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+fixfilepath,+fixdebugpath
include /usr/share/dpkg/pkg-info.mk

ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mipsel powerpc sh4))
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

deb_udevdir = $(shell pkg-config --variable=udevdir udev)

%:
	dh $@

execute_before_dh_auto_configure:
	echo "$(DEB_VERSION_UPSTREAM)" > .tarball-version

# generate the manpages from the scripts using help2man
execute_before_dh_installman:
	help2man --version-option='-h' --help-option='-h' --no-info --name="Freescale/NXP I.MX Chip image deploy tools" \
		debian/uuu/usr/bin/uuu | sed 's/\x1b\[[0-9;]*m//g' > debian/uuu.1

execute_after_dh_clean:
	rm -f debian/uuu.1 .tarball-version

# generate udev rules
execute_after_dh_auto_install:
	test -e debian/uuu && mkdir -p debian/uuu/$(deb_udevdir)/rules.d
	debian/uuu/usr/bin/uuu -udev > debian/uuu/$(deb_udevdir)/rules.d/70-uuu.rules 2>/dev/null