b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | include $(TOPDIR)/rules.mk |
| 2 | #Based on adb package from AUR https://aur.archlinux.org/packages/adb/ , reused Makefile |
| 3 | |
| 4 | PKG_NAME:=adb |
| 5 | PKG_SOURCE_VERSION:=6fe92d1a3fb17545d82d020a3c995f32e6b71f9d |
| 6 | PKG_VERSION:=5.0.2~$(call version_abbrev,$(PKG_SOURCE_VERSION)) |
| 7 | PKG_RELEASE:=3 |
| 8 | |
| 9 | PKG_SOURCE_PROTO:=git |
| 10 | PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core |
| 11 | PKG_MIRROR_HASH:=2ff96b4342cd05f475083207a4927635548c6693771c12a24cfa99f175fdb10a |
| 12 | |
| 13 | PKG_MAINTAINER:=Henryk Heisig <hyniu@o2.pl> |
| 14 | PKG_CPE_ID:=cpe:/a:google:android_debug_bridge |
| 15 | |
| 16 | include $(INCLUDE_DIR)/package.mk |
| 17 | |
| 18 | ifeq ($(CONFIG_BIG_ENDIAN),y) |
| 19 | TARGET_CFLAGS+= -DHAVE_BIG_ENDIAN=1 |
| 20 | endif |
| 21 | TARGET_CFLAGS+= -D_GNU_SOURCE |
| 22 | |
| 23 | define Package/adb |
| 24 | SECTION:=utils |
| 25 | CATEGORY:=Utilities |
| 26 | TITLE:=Android Debug Bridge CLI tool |
| 27 | URL:=http://tools.android.com/ |
| 28 | DEPENDS:=+zlib +libopenssl +libpthread |
| 29 | endef |
| 30 | |
| 31 | define Package/adb/description |
| 32 | Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. |
| 33 | endef |
| 34 | |
| 35 | # Nothing just to be sure |
| 36 | #define Build/Configure |
| 37 | #endef |
| 38 | |
| 39 | define Build/Compile |
| 40 | $(MAKE) -C $(PKG_BUILD_DIR)/adb/ \ |
| 41 | $(TARGET_CONFIGURE_OPTS) \ |
| 42 | TARGET=Linux \ |
| 43 | CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ |
| 44 | LDFLAGS="$(TARGET_LDFLAGS)" |
| 45 | endef |
| 46 | |
| 47 | define Package/adb/install |
| 48 | $(INSTALL_DIR) $(1)/usr/bin |
| 49 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/adb/adb $(1)/usr/bin/ |
| 50 | endef |
| 51 | |
| 52 | $(eval $(call BuildPackage,adb)) |