svn commit: r564232 - in head: . comms/usbmuxd comms/usbmuxd/files
Jason E. Hale
jhale at FreeBSD.org
Sat Feb 6 18:04:57 UTC 2021
Author: jhale
Date: Sat Feb 6 18:04:55 2021
New Revision: 564232
URL: https://svnweb.freebsd.org/changeset/ports/564232
Log:
comms/usbmuxd: Add optional devd(8) configuration file to start and stop the
daemon as devices are attached and detached, respectively. (On by default)
Add GIDs/UIDs for usbmuxd to facilitate use with devd(8).
Patch configure.ac instead of configure since we are using autoreconf. Merge
post-patch target into this new patch for a cleaner Makefile.
Added:
head/comms/usbmuxd/files/patch-configure.ac (contents, props changed)
head/comms/usbmuxd/files/usbmuxd.conf.in (contents, props changed)
Deleted:
head/comms/usbmuxd/files/patch-configure
Modified:
head/GIDs
head/UIDs
head/comms/usbmuxd/Makefile
Modified: head/GIDs
==============================================================================
--- head/GIDs Sat Feb 6 18:02:09 2021 (r564231)
+++ head/GIDs Sat Feb 6 18:04:55 2021 (r564232)
@@ -214,7 +214,7 @@ _rpki-client:*:270:
signaling:*:271:
gvm:*:272:
seaweedfs:*:273:
-# free: 274
+usbmuxd:*:274:
haclient:*:275:
frontbase:*:276:
# free: 277
Modified: head/UIDs
==============================================================================
--- head/UIDs Sat Feb 6 18:02:09 2021 (r564231)
+++ head/UIDs Sat Feb 6 18:04:55 2021 (r564232)
@@ -219,7 +219,7 @@ _rpki-client:*:270:270::0:0:rpki-client user:/nonexist
signaling:*:271:271::0:0:Signaling server:/nonexistent:/usr/sbin/nologin
gvm:*:272:272::0:0:Greenbone Vulnerability Management:/nonexistent:/usr/sbin/nologin
seaweedfs:*:273:273::0:0:seaweedfs user:/var/db/seaweedfs:/usr/sbin/nologin
-# free: 274
+usbmuxd:*:274:274::0:0:USB multiplexing daemon:/nonexistent:/usr/sbin/nologin
hacluster:*:275:275::0:0:Heartbeat cluster user:/nonexistent:/usr/sbin/nologin
frontbase:*:276:276::0:0:FrontBase Daemon:/usr/local/FrontBase/Databases:/bin/sh
# free: 277
Modified: head/comms/usbmuxd/Makefile
==============================================================================
--- head/comms/usbmuxd/Makefile Sat Feb 6 18:02:09 2021 (r564231)
+++ head/comms/usbmuxd/Makefile Sat Feb 6 18:04:55 2021 (r564232)
@@ -2,6 +2,7 @@
PORTNAME= usbmuxd
DISTVERSION= 1.1.1
+PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= https://github.com/libimobiledevice/${PORTNAME}/releases/download/${PORTVERSION}/
@@ -18,24 +19,32 @@ LIB_DEPENDS= libplist-2.0.so:devel/libplist \
USES= autoreconf cpe libtool localbase pathfix pkgconfig tar:bzip2
CPE_VENDOR= nikias_bassen
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-systemd
-PLIST_FILES= man/man8/${PORTNAME}.8.gz \
- sbin/${PORTNAME}
+SUB_LIST= USERS=${USERS} \
+ GROUPS=${GROUPS}
+USERS= ${PORTNAME}
+GROUPS= ${PORTNAME}
+
+PLIST_FILES= man/man8/${PORTNAME}.8.gz \
+ "@(${USERS},${GROUPS},) sbin/${PORTNAME}"
PORTDOCS= AUTHORS NEWS README.md
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DEVD DOCS
+OPTIONS_DEFAULT= DEVD
-post-patch:
-# TODO: add devd(8) rule.
- @${REINPLACE_CMD} \
- -e '/darwin*/ s,),|dragonfly*|*bsd*),' \
- ${WRKSRC}/configure.ac
+DEVD_SUB_FILES= ${PORTNAME}.conf
+DEVD_PLIST_FILES= etc/devd/${PORTNAME}.conf
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
+post-install-DEVD-on:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/devd
+ ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/devd
.include <bsd.port.mk>
Added: head/comms/usbmuxd/files/patch-configure.ac
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/comms/usbmuxd/files/patch-configure.ac Sat Feb 6 18:04:55 2021 (r564232)
@@ -0,0 +1,24 @@
+Remove bash-ism from configure script.
+Disable udev/systemd detection for *BSD as the catch-all assumes a Linux
+system. A configuration file for devd(8) is provided by this port instead.
+
+--- configure.ac.orig 2020-06-09 02:57:16 UTC
++++ configure.ac
+@@ -36,7 +36,7 @@ if test "x$have_limd" = "xyes"; then
+ AC_SUBST(libimobiledevice_CFLAGS)
+ AC_SUBST(libimobiledevice_LIBS)
+ CACHED_CFLAGS="$CFLAGS"
+- CFLAGS+=" $libimobiledevice_CFLAGS"
++ CFLAGS="$CFLAGS $libimobiledevice_CFLAGS"
+ AC_CACHE_CHECK(for enum idevice_connection_type, ac_cv_enum_idevice_connection_type,
+ AC_TRY_COMPILE([
+ #include <libimobiledevice/libimobiledevice.h>
+@@ -125,7 +125,7 @@ case ${host_os} in
+ AC_SUBST(WINDRES)
+ activation_method="manual"
+ ;;
+- darwin*)
++ darwin*|dragonfly*|*bsd*)
+ win32=false
+ AC_MSG_RESULT([no])
+ # No support for launchd yet
Added: head/comms/usbmuxd/files/usbmuxd.conf.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/comms/usbmuxd/files/usbmuxd.conf.in Sat Feb 6 18:04:55 2021 (r564232)
@@ -0,0 +1,28 @@
+# $FreeBSD$
+#
+# This entry starts the Apple mobile device muxer 'usbmuxd' upon device attach
+# of a matching Apple product including iPhone, iPad, and iPod. It also allows
+# members of the '%%GROUPS%%' group to access the devices.
+#
+# Multiple devices may be attached simultaneously. The muxer will stop upon
+# detach of the last matching device.
+
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x05ac";
+ match "product" "(0x12[9a][0-9a-f]|0x8600)";
+ action "chgrp %%GROUPS%% /dev/$cdev; chmod g+rw /dev/$cdev";
+ action "%%PREFIX%%/sbin/usbmuxd -U %%USERS%% -z";
+};
+
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "DETACH";
+ match "vendor" "0x05ac";
+ match "product" "(0x12[9a][0-9a-f]|0x8600)";
+ action "%%PREFIX%%/sbin/usbmuxd -x";
+};
+
More information about the svn-ports-all
mailing list