[Pcsclite-cvs-commit] Drivers/ccid/src create_Info_plist.pl,NONE,1.1 Info.plist,1.5,1.6 Makefile.am,1.9,1.10
rousseau@quantz.debian.org
rousseau@quantz.debian.org
Mon, 02 Feb 2004 11:05:36 +0100
Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory quantz:/tmp/cvs-serv14638/src
Modified Files:
Info.plist Makefile.am
Added Files:
create_Info_plist.pl
Log Message:
use create_Info_plist.pl to generate the installed Info.plist from an
Info.plist template and a list of supported readers.
--- NEW FILE: create_Info_plist.pl ---
#!/usr/bin/perl
# create_Info_plist.pl: generate Infor.plist from a template and a
# list of suported readers
#
# Copyright (C) 2004 Ludovic Rousseau <ludovic.rousseau@free.fr>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
use warnings;
use strict;
my (@manuf, @product, @name);
my ($manuf, $product, $name);
if ($#ARGV ne 1)
{
print "usage: $0 supported_readers.txt Info.plist\n";
exit;
}
open IN, "< $ARGV[0]" or die "Can't open $ARGV[0]: $!";
while (<IN>)
{
next if (m/^#/);
next if (m/^$/);
chomp;
($manuf, $product, $name) = split /:/;
# print "m: $manuf, p: $product, n: $name\n";
push @manuf, $manuf;
push @product, $product;
push @name, $name
}
close IN;
map { $_ = "\t\t<string>$_</string>\n" } @manuf;
map { $_ = "\t\t<string>$_</string>\n" } @product;
map { $_ = "\t\t<string>$_</string>\n" } @name;
open IN, "< $ARGV[1]" or die "Can't open $ARGV[1]: $!";
while (<IN>)
{
if (m/VENDOR/)
{
print @manuf;
next;
}
if (m/PRODUCT/)
{
print @product;
next;
}
if (m/FRIENDLYNAME/)
{
print @name;
next;
}
print;
}
close IN;
Index: Info.plist
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/Info.plist,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Info.plist 27 Jan 2004 13:40:29 -0000 1.5
+++ Info.plist 2 Feb 2004 10:05:34 -0000 1.6
@@ -30,59 +30,17 @@
<key>ifdVendorID</key>
<array>
- <string>0x08E6</string> <!-- 1, Gemplus -->
- <string>0x08E6</string> <!-- 2 -->
- <string>0x08E6</string> <!-- 3 -->
-
- <string>0x04E6</string> <!-- 4, SCM Microsystems -->
- <string>0x04E6</string> <!-- 5 -->
- <string>0x04E6</string> <!-- 6 -->
-
- <string>0x076B</string> <!-- 7, OmniKey -->
-
- <string>0x0783</string> <!-- 8, C3PO -->
-
- <string>0x09C3</string> <!-- 9, ActivCard -->
-
- <string>0x047B</string> <!-- 10, Silitek -->
+ VENDOR
</array>
<key>ifdProductID</key>
<array>
- <string>0x3437</string> <!-- 1 -->
- <string>0x3438</string> <!-- 2 -->
- <string>0x4433</string> <!-- 3 -->
-
- <string>0x5115</string> <!-- 4 -->
- <string>0xE001</string> <!-- 5 -->
- <string>0xE003</string> <!-- 6 -->
-
- <string>0x3021</string> <!-- 7 -->
-
- <string>0x0003</string> <!-- 8 -->
-
- <string>0x0008</string> <!-- 9 -->
-
- <string>0x020B</string> <!-- 10 -->
+ PRODUCT
</array>
<key>ifdFriendlyName</key>
<array>
- <string>GemPC Twin</string> <!-- 1 -->
- <string>GemPC Key</string> <!-- 2 -->
- <string>GemPC433 SL</string> <!-- 3 -->
-
- <string>SCR 335</string> <!-- 4 -->
- <string>SCR 331</string> <!-- 5 -->
- <string>SPR 532</string> <!-- 6 -->
-
- <string>CardMan 3121</string> <!-- 7 -->
-
- <string>LTC31</string> <!-- 8 -->
-
- <string>ActivCard</string> <!-- 9 -->
-
- <string>SK-3105</string> <!-- 10 -->
+ FRIENDLYNAME
</array>
<key>Copyright</key>
Index: Makefile.am
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile.am 22 Jan 2004 14:00:38 -0000 1.9
+++ Makefile.am 2 Feb 2004 10:05:34 -0000 1.10
@@ -58,7 +58,7 @@
install_ccid: libccid.la
$(mkinstalldirs) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/
cp .libs/$(CCID_LIB) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/$(CCID_LIB).$(VERSION)
- sed s/VERSION/$(VERSION)/ $(srcdir)/Info.plist | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist
+ ./create_Info_plist.pl ../readers/supported_readers.txt Info.plist | sed s/VERSION/$(VERSION)/ | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist
install_ccidtwin: libccidtwin.la
$(mkinstalldirs) $(DESTDIR)$(ccidtwindir)