diff --git a/archlinuxcn/usbfluxd-git/PKGBUILD b/archlinuxcn/usbfluxd-git/PKGBUILD new file mode 100644 index 000000000000..2d6e59b7ac5c --- /dev/null +++ b/archlinuxcn/usbfluxd-git/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: taotieren + +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 +} + +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 +} diff --git a/archlinuxcn/usbfluxd-git/fix.patch b/archlinuxcn/usbfluxd-git/fix.patch new file mode 100644 index 000000000000..ecd83c86b700 --- /dev/null +++ b/archlinuxcn/usbfluxd-git/fix.patch @@ -0,0 +1,41 @@ +From 701768e53edb892ed402681a34b0494ac67f1712 Mon Sep 17 00:00:00 2001 +From: taotieren +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 + diff --git a/archlinuxcn/usbfluxd-git/lilac.yaml b/archlinuxcn/usbfluxd-git/lilac.yaml new file mode 100644 index 000000000000..39d38b5cf554 --- /dev/null +++ b/archlinuxcn/usbfluxd-git/lilac.yaml @@ -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