File: rules

package info (click to toggle)
file 1:5.35-4+deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,320 kB
  • sloc: ansic: 15,598; sh: 11,202; makefile: 497; python: 207
file content (40 lines) | stat: -rwxr-xr-x 975 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# HOWMANY is the number of bytes looked at by file
CFLAGS += -DHOWMANY=0x18000

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--datadir=\$${prefix}/share \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--mandir=\$${prefix}/share/man \
		--enable-fsect-man5 \
		--enable-static \
		--disable-silent-rules CFLAGS="$(CFLAGS)"

override_dh_auto_install:
	dh_auto_install

	mv debian/tmp/usr/share/misc debian/tmp/usr/share/file

	install -D -m 0644 magic/magic.local debian/tmp/etc/magic
	install -D -m 0644 magic/magic.local debian/tmp/etc/magic.mime

	# Install additional headers
	mkdir -p debian/libmagic-dev/usr/include/file
	cp src/file.h debian/libmagic-dev/usr/include/file

	# Remove useless files
	rm -f debian/tmp/usr/lib/*/*.la

override_dh_missing:
	dh_missing --fail-missing

override_dh_shlibdeps:
	dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib