[package] add sg3-utils (#1754)
[openwrt/svn-archive/archive.git] / utils / sg3-utils / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sg3-utils
12 PKG_VERSION:=1.24
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
16 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/s/$(PKG_NAME)
17 PKG_MD5SUM:=9e1b8811b013d8f97d8ea2e0942cebad
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/sg3-utils
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=+kmod-usb-storage
25 TITLE:=sg3 scsi utilities
26 URL:=http://sg.torque.net/sg/sg3_utils.html
27 endef
28
29 define Package/sg3-utils/description
30 The package includes a number of utilities to allow a user
31 to use the sg interface to find out low-level information
32 about any SCSI device.
33 endef
34
35 define Build/Configure
36 endef
37
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) -f no_lib/Makefile.linux_static \
41 DESTDIR=$(STAGING_DIR) \
42 CC="$(TARGET_CC)" \
43 CFLAGS="$(TARGET_CFLAGS) -DSG3_UTILS_LINUX" \
44 sg_start
45 endef
46
47
48 define Package/sg3-utils/install
49 $(INSTALL_DIR) $(1)/usr/bin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sg_start $(1)/usr/bin
51 endef
52
53
54 $(eval $(call BuildPackage,sg3-utils))