svn commit: r324380 - in head/sysutils/ipad_charge: . files
Kevin Lo
kevlo at FreeBSD.org
Thu Aug 8 08:27:46 UTC 2013
Author: kevlo
Date: Thu Aug 8 08:27:44 2013
New Revision: 324380
URL: http://svnweb.freebsd.org/changeset/ports/324380
Log:
Update to 2.0.4
Submitted by: hselasky
Added:
head/sysutils/ipad_charge/files/ipad_charge.conf.in (contents, props changed)
head/sysutils/ipad_charge/files/ipad_charge.in (contents, props changed)
head/sysutils/ipad_charge/pkg-message (contents, props changed)
Deleted:
head/sysutils/ipad_charge/distinfo
head/sysutils/ipad_charge/files/patch-ipad_charge.c
Modified:
head/sysutils/ipad_charge/Makefile
head/sysutils/ipad_charge/pkg-descr
Modified: head/sysutils/ipad_charge/Makefile
==============================================================================
--- head/sysutils/ipad_charge/Makefile Thu Aug 8 07:55:11 2013 (r324379)
+++ head/sysutils/ipad_charge/Makefile Thu Aug 8 08:27:44 2013 (r324380)
@@ -1,38 +1,31 @@
-# New ports collection makefile for: ipad_charge
-# Date created: 13 January 2012
-# Whom: Kevin Lo <kevlo at FreeBSD.org>
-#
# $FreeBSD$
-#
PORTNAME= ipad_charge
-PORTVERSION= 1.1
+PORTVERSION= 2.0.1
CATEGORIES= sysutils
-MASTER_SITES= http://www.rainbow-software.org/linux_files/
-DISTNAME= ${PORTNAME}_${PORTVERSION}
+DISTFILES= # empty
MAINTAINER= kevlo at FreeBSD.org
-COMMENT= An iPad/iPad2 USB charging utility
+COMMENT= Generic iPad USB charging utility
-LDFLAGS+= -lusb
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+LICENSE= BSD
-LICENSE= GPLv2
-LICENSE_FILE= ${WRKSRC}/COPYING
-
-PLIST_FILES= bin/ipad_charge
+USE_RC_SUBR= ipad_charge
+NO_BUILD= yes
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 800069
-BROKEN= does not compile
+.if ${OSVERSION} < 800000
+IGNORE= requires FreeBSD 8.0-RELEASE or later
.endif
-do-build:
- ${CC} ${CFLAGS} ${LDFLAGS} ${WRKSRC}/${PORTNAME}.c \
- -o ${WRKSRC}/${PORTNAME}
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+
+post-install:
+ @${MKDIR} ${PREFIX}/etc/devd
+ @${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ < ${FILESDIR}/ipad_charge.conf.in > ${WRKDIR}/ipad_charge.conf
+ ${INSTALL_DATA} "${WRKDIR}/ipad_charge.conf" ${PREFIX}/etc/devd
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
Added: head/sysutils/ipad_charge/files/ipad_charge.conf.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/ipad_charge/files/ipad_charge.conf.in Thu Aug 8 08:27:44 2013 (r324380)
@@ -0,0 +1,22 @@
+# The following list of product IDs was obtained from
+# https://github.com/mkorenkov/ipad_charge
+
+# Apple iPad/iPod/iPhone devices
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x05ac";
+ match "product" "0x129[0-9ab]";
+ action "%%PREFIX%%/etc/rc.d/ipad_charge start $cdev";
+};
+
+# Apple iPad/iPod/iPhone devices
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x05ac";
+ match "product" "0x12a[0-9ab]";
+ action "%%PREFIX%%/etc/rc.d/ipad_charge start $cdev";
+};
Added: head/sysutils/ipad_charge/files/ipad_charge.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/ipad_charge/files/ipad_charge.in Thu Aug 8 08:27:44 2013 (r324380)
@@ -0,0 +1,44 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: ipad_charge
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf[.local] to enable ipad_charge:
+#
+# ipad_charge_enable="YES"
+# ipad_charge_action="ON" (default)
+# ipad_charge_action="OFF"
+#
+
+ipad_charge_enable=${ipad_charge_enable-"NO"}
+ipad_charge_action=${ipad_charge_action-"ON"}
+
+. /etc/rc.subr
+
+name=ipad_charge
+rcvar=ipad_charge_enable
+command="/usr/sbin/usbconfig"
+command_args_on="-d $2 do_request 0x40 0x40 0x6400 0x6400 0"
+command_args_off="-d $2 do_request 0x40 0x40 0x6400 0x0000 0"
+start_precmd="${name}_prestart"
+pidfile=""
+
+ipad_charge_prestart()
+{
+ case ${ipad_charge_action} in
+ [Oo][Nn])
+ command_args="${command_args_on}"
+ ;;
+ *)
+ command_args="${command_args_off}"
+ ;;
+ esac
+}
+
+load_rc_config $name
+
+if [ $# -gt 1 ]; then
+ # Only run the rc command if the appropriate arguments are specified:
+ run_rc_command $1
+fi
Modified: head/sysutils/ipad_charge/pkg-descr
==============================================================================
--- head/sysutils/ipad_charge/pkg-descr Thu Aug 8 07:55:11 2013 (r324379)
+++ head/sysutils/ipad_charge/pkg-descr Thu Aug 8 08:27:44 2013 (r324380)
@@ -1,3 +1,3 @@
-ipad_charge is an iPad USB charging control utility.
-
-WWW: http://www.rainbow-software.org/linux/
+The iPad charge port provide some simple devd scripts which can enable
+or disable charging on your iPad/iPod/iPhone when it is connected to the
+USB port on your PC.
Added: head/sysutils/ipad_charge/pkg-message
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/ipad_charge/pkg-message Thu Aug 8 08:27:44 2013 (r324380)
@@ -0,0 +1,11 @@
+*********************************************************************
+1) add ipad_charge_enable="YES" and optionally
+ ipad_charge_action="ON" (default) or "OFF" .
+
+to your /etc/rc.conf
+
+2) Please restart devd as the configuration changed
+
+ # service devd restart
+
+*********************************************************************
More information about the svn-ports-head
mailing list