Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usbfluxd #3065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions archlinuxcn/usbfluxd-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Maintainer: taotieren <[email protected]>

pkgname=usbfluxd-git
pkgver=1.0.r9.g0723a9a
pkgrel=5
epoch=
pkgdesc="Redirects the standard usbmuxd socket to allow connections to local and remote usbmuxd instances so remote devices appear connected locally."
arch=('x86_64' 'aarch64' 'riscv64')
url="https://github.com/corellium/usbfluxd"
license=(GPL-2.0 GPL-3.0)
groups=()
depends=(libplist avahi)
makedepends=(git autoconf automake gcc)
checkdepends=()
optdepends=('usbmuxd: USB Multiplex Daemon'
'socat: Multipurpose relay')
provides=(${pkgname%-git})
conflicts=()
replaces=(${pkgname%-git})
backup=()
options=()
install=
changelog=
source=("${pkgname%-git}::git+${url}.git"
"fix.patch")
noextract=()
sha256sums=('SKIP'
'43191a2062ed366bde68da8397c9331164a942eeadff2a39056f2907d5bb52cf')
#validpgpkeys=()

pkgver() {
cd "${srcdir}/${pkgname%-git}"

git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
cd "${srcdir}/${pkgname%-git}"

sed -i 's|sbin|bin|g' usbfluxd/Makefile.am
patch -p1 < ../fix.patch
autoreconf -i
}
Comment on lines +37 to +43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==> Starting prepare()...
patching file configure.ac
Hunk #1 FAILED at 72.
1 out of 1 hunk FAILED -- saving rejects to file configure.ac.rej
==> ERROR: A failure occurred in prepare().


build() {
cd "${srcdir}/${pkgname%-git}"

./autogen.sh
./configure --prefix=/usr \
--enable-shared=yes \
--enable-static=no

make
}

package() {
cd "${srcdir}/${pkgname%-git}"

make DESTDIR=${pkgdir} install
}
41 changes: 41 additions & 0 deletions archlinuxcn/usbfluxd-git/fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 701768e53edb892ed402681a34b0494ac67f1712 Mon Sep 17 00:00:00 2001
From: taotieren <[email protected]>
Date: Fri, 9 Dec 2022 18:18:46 +0800
Subject: [PATCH] Compile using system libraries

---
configure.ac | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 337d427..499bfb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,17 +72,13 @@ AC_ARG_WITH([static-libplist],
[AS_HELP_STRING(["--with-static-libplist[=/path/to/static/libplist"]],
[link against a static libplist])],
[with_static_libplist=$withval],
- [with_static_libplist=yes])
-if test "x$with_static_libplist" != "xno"; then
- if test "x$with_static_libplist" = "xyes"; then
- STATIC_LIBPLIST="`pkg-config --libs-only-L libplist-2.0 |sed 's/^..//; s/[ ]*$/\/libplist-2.0.a/'`"
- else
- STATIC_LIBPLIST="$with_static_libplist"
- fi
- if ! test -f "$STATIC_LIBPLIST"; then
- AC_MSG_ERROR([The file ${STATIC_LIBPLIST} passed to --with-static-libplist does not exist])
- fi
- AC_SUBST(libplist_LIBS, [$STATIC_LIBPLIST])
+ [with_static_libplist=no])
+if test "x$with_static_libplist" = xno; then
+ PKG_CHECK_MODULES(libplist, libplist-2.0 >= 2.2.0)
+else
+ # Use the static libplist from the specified path
+ AC_SUBST(libplist_CFLAGS, "-I${with_static_libplist}/include")
+ AC_SUBST(libplist_LIBS, "${with_static_libplist}/lib/libplist.a")
fi

AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
--
2.38.1

14 changes: 14 additions & 0 deletions archlinuxcn/usbfluxd-git/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
maintainers:
- github: taotieren

build_prefix: extra-x86_64

pre_build: vcs_update

post_build_script: |
git_pkgbuild_commit()
update_aur_repo()

update_on:
- source: github
github: corellium/usbfluxd