Skip to content

Commit e926b5d

Browse files
committed
aoa-proxy: add aoa-proxy package
Signed-off-by: Jó Ágila Bitsch <jgilab@gmail.com> aoa-proxy: simplify Makefile Previously, PKG_BUILD_DIR and Build/Configure were set to what the default would have been anyways. Cleaned this up. aoa-proxy: use non-deprecated PKG_HASH algo
1 parent baa0d51 commit e926b5d

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

utils/aoa-proxy/Makefile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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:=aoa-proxy-$(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_MAINTAINER:=Jó Ágila Bitsch <jgilab@gmail.com>
19+
PKG_LICENSE:=BSD-3-Clause
20+
PKG_LICENSE_FILES:=LICENSE
21+
22+
include $(INCLUDE_DIR)/package.mk
23+
24+
TARGET_CFLAGS += -DNO_HID=1
25+
26+
define Package/aoa-proxy
27+
SECTION:=utils
28+
CATEGORY:=Network
29+
TITLE:=Interact with Android devices using the Android Open Accessory Protocol
30+
URL:=https://github.com/jo-bitsch/aoa-proxy
31+
DEPENDS:=+libusb-1.0
32+
PKG_BUILD_DEPENDS:=+argp-standalone
33+
endef
34+
35+
define Package/aoa-proxy/description
36+
This program aims to make working with Android Open Accessory (in
37+
particular v1) as easy as possible.
38+
It has 2 modes, depending on the state of the attached Android device.
39+
(1) Announce mode: When the Android device is not yet in AOA mode, this
40+
program announces its identity to the Android device and tries to
41+
put it into AOA mode.
42+
(2) Forwarding mode: Forward all input from stdin to the AOA device and
43+
all output from AOA to stdout.
44+
For OpenWrt, it includes a hotplug script and a service to automatically
45+
announce itself and forward AOA traffic to SSH/dropbear.
46+
endef
47+
48+
define Build/Compile
49+
$(call Build/Compile/Default,aoa-proxy OPENWRT=1)
50+
endef
51+
52+
define Package/aoa-proxy/install
53+
$(INSTALL_DIR) $(1)/usr/sbin
54+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aoa-proxy $(1)/usr/sbin/
55+
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
56+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/hotplug.d/usb/99-aoa-proxy $(1)/etc/hotplug.d/usb/
57+
$(INSTALL_DIR) $(1)/etc/init.d/
58+
$(INSTALL_DATA $(PKG_BUILD_DIR)/openwrt/etc/init.d/aoa-proxy-forward $(1)/etc/init.d/
59+
endef
60+
61+
$(eval $(call BuildPackage,aoa-proxy))

0 commit comments

Comments
 (0)