Skip to content

Commit 5b07f8c

Browse files
committed
Add usbfluxd
1 parent cb6ea79 commit 5b07f8c

File tree

3 files changed

+115
-0
lines changed

3 files changed

+115
-0
lines changed

archlinuxcn/usbfluxd-git/PKGBUILD

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Maintainer: taotieren <[email protected]>
2+
3+
pkgname=usbfluxd-git
4+
pkgver=1.0.r9.g0723a9a
5+
pkgrel=5
6+
epoch=
7+
pkgdesc="Redirects the standard usbmuxd socket to allow connections to local and remote usbmuxd instances so remote devices appear connected locally."
8+
arch=('x86_64' 'aarch64' 'riscv64')
9+
url="https://github.com/corellium/usbfluxd"
10+
license=(GPL-2.0 GPL-3.0)
11+
groups=()
12+
depends=(libplist avahi)
13+
makedepends=(git autoconf automake gcc)
14+
checkdepends=()
15+
optdepends=('usbmuxd: USB Multiplex Daemon'
16+
'socat: Multipurpose relay')
17+
provides=(${pkgname%-git})
18+
conflicts=()
19+
replaces=(${pkgname%-git})
20+
backup=()
21+
options=()
22+
install=
23+
changelog=
24+
source=("${pkgname%-git}::git+${url}.git"
25+
"fix.patch")
26+
noextract=()
27+
sha256sums=('SKIP'
28+
'43191a2062ed366bde68da8397c9331164a942eeadff2a39056f2907d5bb52cf')
29+
#validpgpkeys=()
30+
31+
pkgver() {
32+
cd "${srcdir}/${pkgname%-git}"
33+
34+
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
35+
}
36+
37+
prepare() {
38+
cd "${srcdir}/${pkgname%-git}"
39+
40+
sed -i 's|sbin|bin|g' usbfluxd/Makefile.am
41+
patch -p1 < ../fix.patch
42+
autoreconf -i
43+
}
44+
45+
build() {
46+
cd "${srcdir}/${pkgname%-git}"
47+
48+
./autogen.sh
49+
./configure --prefix=/usr \
50+
--enable-shared=yes \
51+
--enable-static=no
52+
53+
make
54+
}
55+
56+
package() {
57+
cd "${srcdir}/${pkgname%-git}"
58+
59+
make DESTDIR=${pkgdir} install
60+
}

archlinuxcn/usbfluxd-git/fix.patch

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 701768e53edb892ed402681a34b0494ac67f1712 Mon Sep 17 00:00:00 2001
2+
From: taotieren <[email protected]>
3+
Date: Fri, 9 Dec 2022 18:18:46 +0800
4+
Subject: [PATCH] Compile using system libraries
5+
6+
---
7+
configure.ac | 18 +++++++-----------
8+
1 file changed, 7 insertions(+), 11 deletions(-)
9+
10+
diff --git a/configure.ac b/configure.ac
11+
index 337d427..499bfb0 100644
12+
--- a/configure.ac
13+
+++ b/configure.ac
14+
@@ -72,17 +72,13 @@ AC_ARG_WITH([static-libplist],
15+
[AS_HELP_STRING(["--with-static-libplist[=/path/to/static/libplist"]],
16+
[link against a static libplist])],
17+
[with_static_libplist=$withval],
18+
- [with_static_libplist=yes])
19+
-if test "x$with_static_libplist" != "xno"; then
20+
- if test "x$with_static_libplist" = "xyes"; then
21+
- STATIC_LIBPLIST="`pkg-config --libs-only-L libplist-2.0 |sed 's/^..//; s/[ ]*$/\/libplist-2.0.a/'`"
22+
- else
23+
- STATIC_LIBPLIST="$with_static_libplist"
24+
- fi
25+
- if ! test -f "$STATIC_LIBPLIST"; then
26+
- AC_MSG_ERROR([The file ${STATIC_LIBPLIST} passed to --with-static-libplist does not exist])
27+
- fi
28+
- AC_SUBST(libplist_LIBS, [$STATIC_LIBPLIST])
29+
+ [with_static_libplist=no])
30+
+if test "x$with_static_libplist" = xno; then
31+
+ PKG_CHECK_MODULES(libplist, libplist-2.0 >= 2.2.0)
32+
+else
33+
+ # Use the static libplist from the specified path
34+
+ AC_SUBST(libplist_CFLAGS, "-I${with_static_libplist}/include")
35+
+ AC_SUBST(libplist_LIBS, "${with_static_libplist}/lib/libplist.a")
36+
fi
37+
38+
AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
39+
--
40+
2.38.1
41+

archlinuxcn/usbfluxd-git/lilac.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
maintainers:
2+
- github: taotieren
3+
4+
build_prefix: extra-x86_64
5+
6+
pre_build: vcs_update
7+
8+
post_build_script: |
9+
git_pkgbuild_commit()
10+
update_aur_repo()
11+
12+
update_on:
13+
- source: github
14+
github: corellium/usbfluxd

0 commit comments

Comments
 (0)