File: rules

package info (click to toggle)
hidapi 0.8.0~rc1%2Bgit20140818.d17db57%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 656 kB
  • ctags: 362
  • sloc: ansic: 3,099; cpp: 536; makefile: 184; objc: 65; sh: 57
file content (33 lines) | stat: -rwxr-xr-x 1,029 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
#!/usr/bin/make -f

%:
	dh $@ --parallel --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules

override_dh_strip:
ifeq ($(DEB_HOST_ARCH_OS), linux)
	dh_strip -plibhidapi-libusb0 --dbg-package=libhidapi-libusb0-dbg
	dh_strip -plibhidapi-hidraw0 --dbg-package=libhidapi-hidraw0-dbg
endif
ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
	dh_strip -plibhidapi0 --dbg-package=libhidapi0-dbg
endif

COMMIT := d17db57b9d4354752e0af42f5f33007a42ef2906
TMPTAR := hidapi.tar.gz
DEBVER := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
	| cut -d- -f1)

# Download source from GitHub, remove non-free files, and repack in Deb format
get-orig-source:
	wget -q https://github.com/signal11/hidapi/archive/$(COMMIT)/$(TMPTAR)
	tar zxf $(TMPTAR)
	rm $(TMPTAR)
	rm hidapi-$(COMMIT)/windows/ddk_build/makefile
	rm hidapi-$(COMMIT)/testgui/mac_support.cpp
	mv hidapi-$(COMMIT) hidapi-$(DEBVER)
	tar cf hidapi_$(DEBVER).orig.tar hidapi-$(DEBVER)
	rm -r hidapi-$(DEBVER)
	bzip2 -9 hidapi_$(DEBVER).orig.tar