mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-07 06:40:06 +00:00
Update to 2.0.4
Submitted by: hselasky
This commit is contained in:
parent
0e44e50f72
commit
5a7c983c5d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324380
@ -1,38 +1,31 @@
|
||||
# New ports collection makefile for: ipad_charge
|
||||
# Date created: 13 January 2012
|
||||
# Whom: Kevin Lo <kevlo@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@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>
|
||||
|
@ -1,2 +0,0 @@
|
||||
SHA256 (ipad_charge_1.1.tar.gz) = 85b73b4deb0a0ef287bf1f34720937c99795f3e55ac1f038fef62a6fea2422c4
|
||||
SIZE (ipad_charge_1.1.tar.gz) = 9170
|
22
sysutils/ipad_charge/files/ipad_charge.conf.in
Normal file
22
sysutils/ipad_charge/files/ipad_charge.conf.in
Normal file
@ -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";
|
||||
};
|
44
sysutils/ipad_charge/files/ipad_charge.in
Normal file
44
sysutils/ipad_charge/files/ipad_charge.in
Normal file
@ -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
|
@ -1,11 +0,0 @@
|
||||
--- ipad_charge.c.orig 2011-05-11 03:59:12.000000000 +0800
|
||||
+++ ipad_charge.c 2012-01-13 14:07:58.000000000 +0800
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
-#include <libusb-1.0/libusb.h>
|
||||
+#include <libusb.h>
|
||||
|
||||
#define VERSION "1.0"
|
||||
|
@ -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.
|
||||
|
11
sysutils/ipad_charge/pkg-message
Normal file
11
sysutils/ipad_charge/pkg-message
Normal file
@ -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
|
||||
|
||||
*********************************************************************
|
Loading…
Reference in New Issue
Block a user