Skip to content

Commit 40fa510

Browse files
committed
aoa-proxy: add aoa-proxy package
Signed-off-by: Jó Ágila Bitsch <jgilab@gmail.com>
1 parent baa0d51 commit 40fa510

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

utils/aoa-proxy/Makefile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#
2+
# Copyright (C) 2023 Jó Ágila Bitsch
3+
#
4+
# This is free software, licensed under the GNU General Public License v2.
5+
# See /LICENSE for more information.
6+
#
7+
8+
include $(TOPDIR)/rules.mk
9+
10+
PKG_NAME:=aoa-proxy
11+
PKG_VERSION:=0.2
12+
PKG_RELEASE:=1
13+
14+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15+
PKG_SOURCE_URL:=https://github.com/jo-bitsch/$(PKG_NAME)/archive/refs/tags/v$(PKG_VERSION).tar.gz?
16+
PKG_HASH:=3a9dc94a3cd1b0cba1ae80396b21a6a63289f20dc426be7836834e5a3fc23a68
17+
18+
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
19+
20+
PKG_MAINTAINER:=Jó Ágila Bitsch <jgilab@gmail.com>
21+
PKG_LICENSE:=BSD-3-Clause
22+
PKG_LICENSE_FILES:=LICENSE
23+
24+
include $(INCLUDE_DIR)/package.mk
25+
26+
TARGET_CFLAGS += -DNO_HID=1
27+
28+
define Package/aoa-proxy
29+
SECTION:=utils
30+
CATEGORY:=Network
31+
TITLE:=Interact with Android devices using the Android Open Accessory Protocol
32+
URL:=https://github.com/jo-bitsch/aoa-proxy
33+
DEPENDS:=+libusb-1.0
34+
endef
35+
36+
define Package/aoa-proxy/description
37+
This program aims to make working with Android Open Accessory (in
38+
particular v1) as easy as possible.
39+
It has 2 modes, depending on the state of the attached Android device.
40+
(1) Announce mode: When the Android device is not yet in AOA mode, this
41+
program announces its identity to the Android device and tries to
42+
put it into AOA mode.
43+
(2) Forwarding mode: Forward all input from stdin to the AOA device and
44+
all output from AOA to stdout.
45+
For OpenWrt, it includes a hotplug script and a service to automatically
46+
announce itself and forward AOA traffic to SSH/dropbear.
47+
endef
48+
49+
define Build/Compile
50+
$(call Build/Compile/Default,aoa-proxy OPENWRT=1)
51+
endef
52+
53+
define Package/aoa-proxy/install
54+
$(INSTALL_DIR) $(1)/usr/sbin
55+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aoa-proxy $(1)/usr/sbin/
56+
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
57+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/hotplug.d/usb/99-aoa-proxy $(1)/etc/hotplug.d/usb/
58+
$(INSTALL_DIR) $(1)/etc/init.d/
59+
$(INSTALL_DATA $(PKG_BUILD_DIR)/openwrt/etc/init.d/aoa-proxy-forward $(1)/etc/init.d/
60+
endef
61+
62+
$(eval $(call BuildPackage,aoa-proxy))

0 commit comments

Comments
 (0)