| 1 | package=libusb |
| 2 | $(package)_version=1.0.26 |
| 3 | $(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version) |
| 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 |
| 5 | $(package)_sha256_hash=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5 |
| 6 | |
| 7 | define $(package)_preprocess_cmds |
| 8 | autoreconf -i |
| 9 | endef |
| 10 | |
| 11 | define $(package)_set_vars |
| 12 | $(package)_config_opts=--disable-shared |
| 13 | $(package)_config_opts_linux=--with-pic --disable-udev |
| 14 | $(package)_config_opts_mingw32=--disable-udev |
| 15 | $(package)_config_opts_darwin=--disable-udev |
| 16 | endef |
| 17 | |
| 18 | ifneq ($(host_os),darwin) |
| 19 | define $(package)_config_cmds |
| 20 | cp -f $(BASEDIR)/config.guess config.guess &&\ |
| 21 | cp -f $(BASEDIR)/config.sub config.sub &&\ |
| 22 | $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) |
| 23 | endef |
| 24 | else |
| 25 | define $(package)_config_cmds |
| 26 | $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) |
| 27 | endef |
| 28 | endif |
| 29 | |
| 30 | define $(package)_build_cmd |
| 31 | $(MAKE) |
| 32 | endef |
| 33 | |
| 34 | define $(package)_stage_cmds |
| 35 | $(MAKE) DESTDIR=$($(package)_staging_dir) install |
| 36 | endef |
| 37 | |
| 38 | define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a |
| 39 | endef |