File: rules

package info (click to toggle)
libusb 2:0.1.12-30
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,308 kB
  • ctags: 1,332
  • sloc: sh: 8,374; ansic: 3,271; cpp: 960; makefile: 134
file content (35 lines) | stat: -rwxr-xr-x 1,434 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
#!/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

override_dh_auto_configure-arch:
	dh_auto_configure --builddirectory build-deb -- --enable-build-docs
	CFLAGS="$(CFLAGS) -Os" dh_auto_configure --builddirectory build-udeb -- --libdir=/lib/ --disable-build-docs

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
	mkdir -p $(CURDIR)/debian/tmp-deb/lib/$(DEB_HOST_MULTIARCH)
	mv $(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb-0.1.so.* \
	   $(CURDIR)/debian/tmp-deb/lib/$(DEB_HOST_MULTIARCH)
	rm $(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb.so
	printf "/* GNU ld script.  */\nGROUP ( /lib/%s/libusb-0.1.so.4.4.4 )\n" "$(DEB_HOST_MULTIARCH)" \
		> $(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb.so
	dh_auto_install --builddirectory build-udeb --destdir=$(CURDIR)/debian/tmp-udeb

override_dh_install-arch:
	dh_install -s -Nlibusb-0.1-udeb --list-missing --sourcedir=debian/tmp-deb
	dh_install -plibusb-0.1-udeb --sourcedir=debian/tmp-udeb

override_dh_makeshlibs-arch:
	dh_makeshlibs -plibusb-0.1-4 --add-udeb="libusb-0.1-udeb"