[Pcsclite-cvs-commit] r4306 - in /trunk/Drivers/ccid/src: Info.plist.src Makefile.am create_Info_plist.pl

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Jul 6 14:37:51 UTC 2009


Author: rousseau
Date: Mon Jul  6 14:37:50 2009
New Revision: 4306

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4306
Log:
extend create_Info_plist.pl to use --ifdCapabilities= --target=
--version= --bundle= instead of sed expression in the Makefile

Modified:
    trunk/Drivers/ccid/src/Info.plist.src
    trunk/Drivers/ccid/src/Makefile.am
    trunk/Drivers/ccid/src/create_Info_plist.pl

Modified: trunk/Drivers/ccid/src/Info.plist.src
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/Info.plist.src?rev=4306&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/Info.plist.src (original)
+++ trunk/Drivers/ccid/src/Info.plist.src Mon Jul  6 14:37:50 2009
@@ -5,17 +5,15 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
 	<key>CFBundleExecutable</key>
-	<string>CCID_BUNDLE</string>
+	<string>MAGIC_BUNDLE</string>
 	<key>CFBundleIdentifier</key>
 	<string>org.debian.alioth.pcsclite.smartcardccid</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>CCIDCLASSDRIVER</string>
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>VERSION</string>
+	<string>MAGIC_VERSION</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
@@ -94,7 +92,7 @@
 	-->
 
 	<key>CFBundleExecutable</key>
-	<string>TARGET</string>
+	<string>MAGIC_TARGET</string>
 
 	<key>ifdManufacturerString</key>
 	<string>Ludovic Rousseau (ludovic.rousseau at free.fr)</string>

Modified: trunk/Drivers/ccid/src/Makefile.am
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/Makefile.am?rev=4306&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/Makefile.am (original)
+++ trunk/Drivers/ccid/src/Makefile.am Mon Jul  6 14:37:50 2009
@@ -79,7 +79,7 @@
 endif
 
 Info.plist: Info.plist.src $(srcdir)/../readers/supported_readers.txt
-	$(srcdir)/create_Info_plist.pl $(srcdir)/../readers/supported_readers.txt $(srcdir)/Info.plist.src $(ifdCapabilities) | sed s/TARGET/$(CCID_LIB)/ | sed s/VERSION/$(VERSION)/ | sed s/CCID_BUNDLE/$(CCID_BUNDLE)/ > Info.plist
+	$(srcdir)/create_Info_plist.pl $(srcdir)/../readers/supported_readers.txt $(srcdir)/Info.plist.src --ifdCapabilities=$(ifdCapabilities) --target=$(CCID_LIB) --version=$(VERSION) --bundle=$(CCID_BUNDLE) > Info.plist
 	
 DISTCLEANFILES = tokenparser.c Info.plist
 

Modified: trunk/Drivers/ccid/src/create_Info_plist.pl
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/create_Info_plist.pl?rev=4306&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/create_Info_plist.pl (original)
+++ trunk/Drivers/ccid/src/create_Info_plist.pl Mon Jul  6 14:37:50 2009
@@ -22,16 +22,31 @@
 
 use warnings;
 use strict;
+use Getopt::Long;
 
 my (@manuf, @product, @name);
 my ($manuf, $product, $name);
-my $ifdCapabilities;
+my $ifdCapabilities = "0x00000000";
+my $target = "libccid.so";
+my $version = "1.0.0";
+my $bundle = "ifd-ccid.bundle";
 
-if ($#ARGV ne 2)
+GetOptions("ifdCapabilities=s" => \$ifdCapabilities,
+	"target=s" => \$target,
+	"version=s" => \$version,
+	"bundle=s" => \$bundle);
+
+if ($#ARGV < 1)
 {
-	print "usage: $0 supported_readers.txt Info.plist ifdCapabilities\n";
+	print "usage: $0 supported_readers.txt Info.plist
+	--ifdCapabilities=$ifdCapabilities
+	--target=$target
+	--version=$version
+	--bundle=$bundle\n";
 	exit;
 }
+
+print "$ifdCapabilities";
 
 open IN, "< $ARGV[0]" or die "Can't open $ARGV[0]: $!";
 while (<IN>)
@@ -51,8 +66,6 @@
 map { $_ = "\t\t<string>$_</string>\n" } @manuf;
 map { $_ = "\t\t<string>$_</string>\n" } @product;
 map { $_ = "\t\t<string>$_</string>\n" } @name;
-
-$ifdCapabilities=$ARGV[2];
 
 open IN, "< $ARGV[1]" or die "Can't open $ARGV[1]: $!";
 
@@ -79,6 +92,24 @@
 		print;
 		next;
 	}
+	if (m/MAGIC_TARGET/)
+	{
+		s/MAGIC_TARGET/$target/;
+		print;
+		next;
+	}
+	if (m/MAGIC_VERSION/)
+	{
+		s/MAGIC_VERSION/$version/;
+		print;
+		next;
+	}
+	if (m/MAGIC_BUNDLE/)
+	{
+		s/MAGIC_BUNDLE/$bundle/;
+		print;
+		next;
+	}
 	print;
 }
 




More information about the Pcsclite-cvs-commit mailing list