1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

THANKO USB AM/FM Radio controller

This commit is contained in:
MIHIRA Sanpei Yoshiro 2009-07-15 15:01:15 +00:00
parent 10da45ef91
commit b2406f0680
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=237885
7 changed files with 86 additions and 0 deletions

View File

@ -12,6 +12,7 @@
SUBDIR += amanda-server
SUBDIR += amanda25-client
SUBDIR += amanda25-server
SUBDIR += amfm
SUBDIR += apparix
SUBDIR += asbutton
SUBDIR += asr-manpages

37
misc/amfm/Makefile Normal file
View File

@ -0,0 +1,37 @@
# New ports collection makefile for: amfm
# Date created: 2009-06-21
# Whom: sanpei@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= amfm
PORTVERSION= 1.0
CATEGORIES= misc
MASTER_SITES= http://github.com/ikegam/amfm/raw/9679aa06eead7ed3571480e892f426828e17e361/ \
${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= sanpei
DISTNAME= amfm
EXTRACT_SUFX= .c
MAINTAINER= sanpei@FreeBSD.org
COMMENT= THANKO USB AM/FM Radio controller
LIB_DEPENDS= hid.0:${PORTSDIR}/devel/libhid
NO_WRKSUBDIR= yes
.include <bsd.port.pre.mk>
EXTRACT_CMD= ${CP}
EXTRACT_BEFORE_ARGS= -p
EXTRACT_AFTER_ARGS= ${WRKDIR}
.if ${OSVERSION} <= 800097
BROKEN= does not build
.endif
do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/amfm ${PREFIX}/bin/amfm
.include <bsd.port.post.mk>

3
misc/amfm/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (amfm.c) = 63d61864c30f6899254a72adccac8c03
SHA256 (amfm.c) = 0dd12ba64466a7c82f7af546c856cc0e1fd65c1a70397dd7c61a2c2d266b762b
SIZE (amfm.c) = 2590

View File

@ -0,0 +1,11 @@
--- ./Makefile.orig 2009-06-28 14:24:15.000000000 +0900
+++ ./Makefile 2009-06-28 14:26:05.000000000 +0900
@@ -0,0 +1,8 @@
+CFLAGS=-I${PREFIX}/include -L${PREFIX}/lib -lhid
+TARGET=amfm
+SRC=amfm.c
+
+all: ${TARGET}
+
+${TARGET}: ${SRC}
+ cc -o amfm ${CFLAGS} amfm.c

View File

@ -0,0 +1,19 @@
--- ./amfm.c.orig 2009-06-28 13:47:21.000000000 +0900
+++ ./amfm.c 2009-06-28 14:24:15.000000000 +0900
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <unistd.h>
#include <hid.h>
@@ -28,7 +29,7 @@
HIDInterface* hid;
HIDInterfaceMatcher matcher = { RADIO_VENDID, RADIO_DEVID, NULL, NULL, 0 };
- unsigned char PACKET[SEND_PACKET_LENGTH] = { 0x28, 0xe2, 0x06, 0x03, 0x29, 0x52, 0x00, 0x10 };
+ unsigned char PACKET[SEND_PACKET_LENGTH] = { 0x28, 0xe2, 0x06, 0x03, 0x29, 0xd2, 0x00, 0x10 };
unsigned char ZERO[0];
unsigned short encodedFreq;
unsigned int freq;

14
misc/amfm/pkg-descr Normal file
View File

@ -0,0 +1,14 @@
THANKO USB AM/FM Radio controller
commands usage:
-fm <freqeuncy> : set FM frequency, e.g. '-fm 77.4'
-stop : stop amfm radio
Limitations:
you need root authority.
currently AM Radio mode is not supported.
THANKO Co. USB AM/FM RADIO
WWW: http://www.thanko.jp/usbamfmradio/
WWW: http://d.hatena.ne.jp/pair/20080620/1213969553#c

1
misc/amfm/pkg-plist Normal file
View File

@ -0,0 +1 @@
bin/amfm