3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=05276dc307a0297904bc892e9998bf59
10 PKG_SOURCE_URL
:=@SF
/linux-usb
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 IPKG_LSUSB
:=$(PACKAGE_DIR
)/lsusb_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 IDIR_LSUSB
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
18 INFO_LSUSB
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
20 $(DL_DIR
)/$(PKG_SOURCE
):
21 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
23 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
24 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
25 touch
$(PKG_BUILD_DIR
)/.prepared
27 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
28 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS)" \
31 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
32 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
33 ac_cv_func_malloc_0_nonnull
=yes \
35 --target
=$(GNU_TARGET_NAME
) \
36 --host
=$(GNU_TARGET_NAME
) \
37 --build
=$(GNU_HOST_NAME
) \
43 --datadir=/usr
/share \
44 --includedir=/usr
/include \
45 --infodir=/usr
/share
/info \
47 --libexecdir
=/usr
/lib \
48 --localstatedir
=/var \
49 --mandir=/usr
/share
/man \
53 $(DISABLE_LARGEFILE
) \
55 touch
$(PKG_BUILD_DIR
)/.configured
57 $(PKG_BUILD_DIR
)/$(PKG_NAME
): $(PKG_BUILD_DIR
)/.configured
58 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
61 $(IPKG_LSUSB
): $(PKG_BUILD_DIR
)/$(PKG_NAME
)
62 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LSUSB
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
63 mkdir
-p
$(IDIR_LSUSB
)/usr
/share
64 cp
$(PKG_BUILD_DIR
)/usb.ids
$(IDIR_LSUSB
)/usr
/share
/
65 mkdir
-p
$(IDIR_LSUSB
)/usr
/sbin
66 cp
$(PKG_BUILD_DIR
)/lsusb
$(IDIR_LSUSB
)/usr
/sbin
/
67 $(STRIP
) $(IDIR_LSUSB
)/usr
/sbin
/*
68 mkdir
-p
$(PACKAGE_DIR
)
69 $(IPKG_BUILD
) $(IDIR_LSUSB
) $(PACKAGE_DIR
)
71 $(INFO_LSUSB
): $(IPKG_LSUSB
)
72 $(IPKG
) install $(IPKG_LSUSB
)
74 source
: $(DL_DIR
)/$(PKG_SOURCE
)
75 prepare
: $(PKG_BUILD_DIR
)/.prepared
76 compile
: $(IPKG_LSUSB
)
77 install: $(INFO_LSUSB
)
80 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LSUSB
)