1################################################################################ 2# 3# sg3_utils 4# 5################################################################################ 6 7SG3_UTILS_VERSION = 1.47 8SG3_UTILS_SOURCE = sg3_utils-$(SG3_UTILS_VERSION).tar.xz 9SG3_UTILS_SITE = http://sg.danny.cz/sg/p 10SG3_UTILS_LICENSE = BSD-2-Clause (library) 11# Some utils progs are GPL-2.0+ licensed while others are BSD-3-Clause 12ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y) 13SG3_UTILS_LICENSE += , GPL-2.0+ (programs), BSD-2-Clause (programs) 14endif 15SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE 16# We're patching configure.ac 17SG3_UTILS_AUTORECONF = YES 18 19# install the libsgutils2 library 20SG3_UTILS_INSTALL_STAGING = YES 21 22# Uses __atomic_fetch_add_4 23ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 24SG3_UTILS_CONF_ENV += LIBS="-latomic" 25endif 26 27ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),) 28define SG3_UTILS_REMOVE_PROGS 29 for prog in \ 30 compare_and_write copy_results dd decode_sense \ 31 emc_trespass format get_config \ 32 get_lba_status ident inq logs luns map26 \ 33 map sgm_dd modes opcodes sgp_dd persist prevent \ 34 raw rbuf rdac read readcap read_block_limits \ 35 read_attr read_buffer read_long reassign referrals \ 36 rep_zones requests reset reset_wp rmsn rtpg safte sanitize \ 37 sat_identify sat_phy_event sat_read_gplog sat_set_features \ 38 scan senddiag ses ses_microcode start stpg sync test_rwbuf \ 39 timestamp turs unmap verify vpd write_buffer write_long \ 40 write_same write_verify wr_mode xcopy zone; do \ 41 $(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \ 42 done 43 for prog in \ 44 logging_level mandat readcap ready satl start stop \ 45 temperature; do \ 46 $(RM) $(TARGET_DIR)/usr/bin/scsi_$${prog} ; \ 47 done 48 for prog in \ 49 sginfo sgm_dd sgp_dd; do \ 50 $(RM) $(TARGET_DIR)/usr/bin/$${prog}; \ 51 done 52endef 53 54SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS 55endif 56 57$(eval $(autotools-package)) 58$(eval $(host-autotools-package)) 59