File: rules

package info (click to toggle)
libusb-1.0 2:1.0.21-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,328 kB
  • ctags: 3,888
  • sloc: ansic: 22,875; sh: 11,332; cpp: 1,194; makefile: 169
file content (55 lines) | stat: -rwxr-xr-x 1,791 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
#!/usr/bin/make -f
%:
	dh $@ --parallel --with autoreconf

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 -s -Nlibusb-1.0-0-udeb --list-missing --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"


#
# 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