Initial commit

This commit is contained in:
2025-10-11 18:39:04 +03:00
commit 9204361517
7 changed files with 134 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# Github repository
REPO="libimobiledevice/usbmuxd"
# Get tag name using Github Rest API
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
echo "$TAG_NAME"
+21
View File
@@ -0,0 +1,21 @@
name: usbmuxd
description: A socket daemon to multiplex connections from and to iOS devices
version: 1.1.1
revision: 1
url: https://github.com/libimobiledevice/usbmuxd
license: GPL3-or-later
architecture: any
type: source
depends:
- libimobiledevice
- libplist
- libusb
- sysusers
make_depends:
- git
downloads:
- url: https://github.com/libimobiledevice/usbmuxd.git
type: git
clone_to: ${BPM_SOURCE}
git_branch: ${BPM_PKG_VERSION}
checksum: 79c8b38d1488a6b07e1e68f39d8caec3f1a45622
+25
View File
@@ -0,0 +1,25 @@
From dedbd15300fb46519166ef953c7e032fd905b594 Mon Sep 17 00:00:00 2001
From: Nathan <[email protected]>
Date: Sun, 7 May 2023 23:59:11 -0500
Subject: [PATCH] iDevices
---
udev/39-usbmuxd.rules.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in
index 11d33c6..f26b7ff 100644
--- a/udev/39-usbmuxd.rules.in
+++ b/udev/39-usbmuxd.rules.in
@@ -4,7 +4,7 @@
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", TAG+="systemd"
# Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", @udev_activation_rule@
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux"
# Make sure properties don't get lost when bind action is called
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="bind", ENV{USBMUX_SUPPORTED}="1", OWNER="usbmux", @udev_activation_rule@
--
2.40.1
+32
View File
@@ -0,0 +1,32 @@
diff --git i/src/utils.c w/src/utils.c
index 206c684..a91faea 100644
--- i/src/utils.c
+++ w/src/utils.c
@@ -302,7 +302,7 @@ int plist_read_from_filename(plist_t *plist, const char *filename)
return 1;
}
-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format)
+int plist_write_to_filename(plist_t plist, const char *filename, plist_format_t format)
{
char *buffer = NULL;
uint32_t length;
diff --git i/src/utils.h w/src/utils.h
index b5cab3f..3e9eb41 100644
--- i/src/utils.h
+++ w/src/utils.h
@@ -78,13 +78,8 @@ char *string_concat(const char *str, ...);
int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length);
int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length);
-enum plist_format_t {
- PLIST_FORMAT_XML,
- PLIST_FORMAT_BINARY
-};
-
int plist_read_from_filename(plist_t *plist, const char *filename);
-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format);
+int plist_write_to_filename(plist_t plist, const char *filename, plist_format_t format);
uint64_t mstime64(void);
void get_tick_count(struct timeval * tv);
+1
View File
@@ -0,0 +1 @@
u usbmux 140 "usbmux user"
+44
View File
@@ -0,0 +1,44 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
cd "$BPM_SOURCE"
# Fix compatibility with libplist 2.3.0+
git apply -3 "$BPM_WORKDIR"/libplist-2.3.0.patch
git apply -3 "$BPM_WORKDIR"/iDevices.patch
NOCONFIGURE=1 ./autogen.sh
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# Prevent overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
make check
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make DESTDIR="$BPM_OUTPUT" install
# Install sysusers file
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/usbmuxd.conf
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING.GPLv3 "$BPM_OUTPUT"/usr/share/licenses/usbmuxd/COPYING
}