| 1 | package=hidapi |
| 2 | $(package)_version=0.15.0 |
| 3 | $(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags |
| 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz |
| 5 | $(package)_sha256_hash=5d84dec684c27b97b921d2f3b73218cb773cf4ea915caee317ac8fc73cef8136 |
| 6 | $(package)_linux_dependencies=libusb eudev |
| 7 | |
| 8 | define $(package)_set_vars |
| 9 | $(package)_config_opts=--enable-static --disable-shared |
| 10 | $(package)_config_opts+=--prefix=$(host_prefix) |
| 11 | $(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev" |
| 12 | $(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include |
| 13 | $(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0" |
| 14 | $(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0 |
| 15 | $(package)_config_opts_linux+=--with-pic |
| 16 | endef |
| 17 | |
| 18 | define $(package)_preprocess_cmds |
| 19 | ./bootstrap |
| 20 | endef |
| 21 | |
| 22 | define $(package)_config_cmds |
| 23 | $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) |
| 24 | endef |
| 25 | |
| 26 | define $(package)_build_cmds |
| 27 | $(MAKE) |
| 28 | endef |
| 29 | |
| 30 | define $(package)_stage_cmds |
| 31 | $(MAKE) DESTDIR=$($(package)_staging_dir) install |
| 32 | endef |
| 33 | |
| 34 | define $(package)_postprocess_cmds |
| 35 | rm lib/*.la |
| 36 | endef |
| 37 |