-
Notifications
You must be signed in to change notification settings - Fork 1
/
rules
executable file
·33 lines (28 loc) · 1 KB
/
rules
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