--- ../fink/fink-virtual-pkgs.in	2013-06-20 22:05:35.000000000 -0600
+++ fink-virtual-pkgs.in	2013-06-22 19:34:35.000000000 -0600
@@ -26,6 +26,7 @@
 
 my $standalone = 0;
 my $basepath = '@BASEPATH@';
+my $config;
 
 our $VERSION = 1.28;
 
@@ -70,11 +71,35 @@
 				}
 			}
 		} else {
-			printf "Package: %s\nStatus: %s\nVersion: %s\n", $hash->{package},$hash->{status},$hash->{version};
+			printf "Package: %s\nStatus: %s\nPriority: optional\nArchitecture: ".$config->param('Debarch')."\nVersion: %s\nMaintainer: Fink Devel <fink-devel\@lists.sourceforge.net>\n", $hash->{package},$hash->{status},$hash->{version};
 			foreach $field (keys %$hash)
 			{
-				next if ($field =~ /^(package|status|version|descdetail|compilescript)$/);
-				printf "%s: %s\n",$field,$hash->{$field};
+				next if ($field =~ /^(package|status|version|descdetail|compilescript|homepage)$/);
+				if ($field eq "description") {
+					printf "Description: %s\n",$hash->{$field};
+					if ($hash->{'descdetail'}) {
+						my $descdetail = $hash->{'descdetail'};
+						chomp($descdetail);
+						my @descdetails;
+						foreach my $line (split("\n", $descdetail)) {
+							if ($line eq "" || $line =~ /^[\s|\t]+?$/) {
+								$line = ".";
+							}
+							$line = " ".$line;
+							push @descdetails, $line;
+						}
+						$descdetail = join("\n", @descdetails);
+						printf "%s\n",$descdetail;
+					}
+					if ($hash->{'homepage'}) {
+						printf " .\n";
+						printf " Web site: %s\n",$hash->{'homepage'};
+					}
+					printf " .\n";
+					printf " Maintainer: Fink Devel <fink-devel\@lists.sourceforge.net>\n";
+				} else {
+					printf "%s: %s\n",ucfirst $field,$hash->{$field};
+				}
 			}
 			print "\n";
 		}
@@ -162,7 +187,6 @@
 	if ($standalone != 1)
 	{
 		my $configpath = "$basepath/etc/fink.conf";
-                my $config;
 		if (-f $configpath) {
 			$config = read_config($configpath,
                                               { Basepath => "$basepath" }
