File: rules

package info (click to toggle)
libusb-1.0 2:1.0.22-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 4,004 kB
  • sloc: ansic: 23,031; sh: 4,133; cpp: 1,197; makefile: 173
file content (61 lines) | stat: -rwxr-xr-x 1,910 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
%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean --builddirectory build-deb
	rm -fr $(CURDIR)/debian/tmp-deb
	dh_auto_clean --builddirectory build-udeb
	rm -fr $(CURDIR)/debian/tmp-udeb
	dh_auto_clean --builddirectory build-doc
	rm -fr $(CURDIR)/debian/tmp-doc


#
# Architecture targets
#
override_dh_auto_configure-arch:
	dh_auto_configure --builddirectory build-deb -- --enable-tests-build
	CFLAGS="$(CFLAGS) -Os" dh_auto_configure --builddirectory build-udeb -- --libdir=\$${prefix}/lib/

override_dh_auto_build-arch:
	dh_auto_build --builddirectory build-deb
	dh_auto_build --builddirectory build-udeb

override_dh_auto_install-arch:
	dh_auto_install --builddirectory build-deb --destdir=$(CURDIR)/debian/tmp-deb
	# Move the library to /lib
	mkdir -p $(CURDIR)/debian/tmp-deb/lib/$(DEB_HOST_MULTIARCH)/
	mv $(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb-1.0.so.* \
	   $(CURDIR)/debian/tmp-deb/lib/$(DEB_HOST_MULTIARCH)/
	ln -sf /lib/$(DEB_HOST_MULTIARCH)/libusb-1.0.so.0.1.0 \
	       $(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb-1.0.so
	dh_auto_install --builddirectory build-udeb --destdir=$(CURDIR)/debian/tmp-udeb

override_dh_install-arch:
	dh_install -Nlibusb-1.0-0-udeb --sourcedir=debian/tmp-deb
	dh_install -plibusb-1.0-0-udeb --sourcedir=debian/tmp-udeb

override_dh_strip-arch:
	dh_strip -plibusb-1.0-0 --dbgsym-migration='libusb-1.0-0-dbg (<< 2:1.0.21~)'
	dh_strip -a --remaining-packages

override_dh_makeshlibs-arch:
	dh_makeshlibs -plibusb-1.0-0 --add-udeb="libusb-1.0-0-udeb"

override_dh_auto_test-arch:
ifeq (linux,$(DEB_HOST_ARCH_OS))
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(CURDIR)/build-deb/tests/stress
endif
endif

#
# Architecture independent targets
#
override_dh_auto_configure-indep:
	dh_auto_configure --builddirectory build-doc

override_dh_auto_build-indep:
	$(MAKE) -C $(CURDIR)/build-doc/doc docs