Date: Sun, 21 Jan 2007 22:07:23 +0900 (JST) From: mistral@imasy.or.jp To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/108177: New port: japanese/edyvalue: Utility to print a statement of Edy card Message-ID: <200701211307.l0LD7N3d001116@sachiko.yamayuri.org> Resent-Message-ID: <200701211310.l0LDALqf011793@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 108177 >Category: ports >Synopsis: New port: japanese/edyvalue: Utility to print a statement of Edy card >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jan 21 13:10:20 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Yoshihiko Sarumaru >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD sachiko.yamayuri.org 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #2: Tue Jan 16 02:03:05 JST 2007 root@sachiko.yamayuri.org:/usr/obj/usr/src/sys/VGN-TX92S i386 >Description: This PR introduces EdyValue program. Edy is a prepaid style digital cash card operated in Japan. Edy card can be read by this utility with PaSoRi reader via USB. This utility depends on the libpasori that was send-pr'ed as ports/108173. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # japanese/edyvalue/ # japanese/edyvalue/Makefile # japanese/edyvalue/distinfo # japanese/edyvalue/files # japanese/edyvalue/files/Makefile # japanese/edyvalue/files/patch-EdyValue.c # japanese/edyvalue/pkg-descr # japanese/edyvalue/pkg-message # echo c - japanese/edyvalue/ mkdir -p japanese/edyvalue/ > /dev/null 2>&1 echo x - japanese/edyvalue/Makefile sed 's/^X//' >japanese/edyvalue/Makefile << 'END-of-japanese/edyvalue/Makefile' X# New ports collection makefile for: edyvalue X# Date created: 18 January 2007 X# Whom: Yoshihiko Sarumaru <mistral@imasy.or.jp> X# X# $FreeBSD$ X XPORTNAME= edyvalue XPORTVERSION= 1.0 XCATEGORIES= japanese XMASTER_SITES= http://www.imfj.net/people/nomura/soft/PaSoRi/ XDISTNAME= EdyValue XEXTRACT_SUFX= .c XEXTRACT_ONLY= X XMAINTAINER= mistral@imasy.or.jp XCOMMENT= Utility to print a statement of Edy card X XBUILD_DEPENDS= ${LOCALBASE}/lib/libpasori.a:${PORTSDIR}/devel/libpasori X XPLIST_FILES= bin/EdyValue X Xpost-extract: X @${MKDIR} ${WRKSRC} X @${CP} -f ${DISTDIR}/${DISTFILES} ${WRKSRC} X @${CP} -f ${FILESDIR}/Makefile ${WRKSRC} X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-japanese/edyvalue/Makefile echo x - japanese/edyvalue/distinfo sed 's/^X//' >japanese/edyvalue/distinfo << 'END-of-japanese/edyvalue/distinfo' XMD5 (EdyValue.c) = 1b6cb4f287d9a225913dd4077973211a XSHA256 (EdyValue.c) = 71005c7bc3f0378f8b76da4f6f908cf61b1791fb04b1a82ef8b3d66019156688 XSIZE (EdyValue.c) = 1675 END-of-japanese/edyvalue/distinfo echo c - japanese/edyvalue/files mkdir -p japanese/edyvalue/files > /dev/null 2>&1 echo x - japanese/edyvalue/files/Makefile sed 's/^X//' >japanese/edyvalue/files/Makefile << 'END-of-japanese/edyvalue/files/Makefile' XPROG= EdyValue XDPADD= ${LOCALBASE}/lib/libpasori.a XLDADD= -L${LOCALBASE}/lib -lpasori X XBINDIR= ${LOCALBASE}/bin XNO_MAN= true X XCFLAGS+= -I${LOCALBASE}/include XCFLAGS+= -Wall -W X X.include <bsd.prog.mk> END-of-japanese/edyvalue/files/Makefile echo x - japanese/edyvalue/files/patch-EdyValue.c sed 's/^X//' >japanese/edyvalue/files/patch-EdyValue.c << 'END-of-japanese/edyvalue/files/patch-EdyValue.c' X--- EdyValue.c.orig Sat Jan 6 16:36:29 2007 X+++ EdyValue.c Sun Jan 21 02:36:09 2007 X@@ -1,6 +1,7 @@ X #include <stdio.h> X #include <stdlib.h> X #include "libpasori.h" X+#include "libpasori_command.h" X #define TRUE 1 X #define FALSE 0 X X@@ -19,21 +20,25 @@ X return (FALSE); X } X X-int main(void){ X+int main(int argc, char **argv){ X pasori* p; X felica* f; X int i; X- int m; X- int year, month, day; X+ unsigned int month, day; X uint8 b[16]; X X- p = pasori_open(NULL); X+ char* devpath = NULL; X+ if (argc == 2) { X+ devpath = argv[1]; X+ } X+ p = pasori_open(devpath); X if(!p){ X printf("error\n"); X exit(-1); X } X pasori_init(p); X f = felica_polling(p,0xFE00,0,0); X+ if (f) { X printf("*** Edy Value ***\n"); X i=0; X while(!felica_read_without_encryption02(f,0x170F,0,i,b)){ X@@ -79,6 +84,8 @@ X printf(" --> % 5d Yen (rest) ",b[14]*256+b[15]); X printf("%02X%02X%02X\n",b[1],b[2],b[3]); X i++; X+ } X+ free(f); X } X pasori_close(p); X return 0; END-of-japanese/edyvalue/files/patch-EdyValue.c echo x - japanese/edyvalue/pkg-descr sed 's/^X//' >japanese/edyvalue/pkg-descr << 'END-of-japanese/edyvalue/pkg-descr' XEdyValue prints statements from an Edy card. XYou need a Sony RC-S320 or VAIO with FeliCa port to use this program. X XWWW: http://www.imfj.net/people/nomura/soft/PaSoRi/EdyValue.html END-of-japanese/edyvalue/pkg-descr echo x - japanese/edyvalue/pkg-message sed 's/^X//' >japanese/edyvalue/pkg-message << 'END-of-japanese/edyvalue/pkg-message' X****************************************************************************** XPlace your Edy card on PaSoRi before executing EdyValue. X****************************************************************************** END-of-japanese/edyvalue/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701211307.l0LD7N3d001116>