Update of /cvsroot/fink/scripts/bindist
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6564

Modified Files:
        HOWTO bdadd bdnewrel 
Log Message:
handle architecture choice with a new environment variable BDARCH
VS: ----------------------------------------------------------------------


Index: bdadd
===================================================================
RCS file: /cvsroot/fink/scripts/bindist/bdadd,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- bdadd       30 Aug 2004 00:43:43 -0000      1.11
+++ bdadd       27 Mar 2006 00:43:24 -0000      1.12
@@ -15,6 +15,8 @@
 }
 my $dest = "dists/fink-$currel/main";
 my $dest_crypto = "dists/fink-$currel/crypto";
+my $arch = $ENV{BDARCH};
+die "the environment variable BDARCH must be set" unless defined $ENV{BDARCH};
 
 ### now load the useful modules
 
@@ -50,9 +52,9 @@
   }
   $section = $po->get_section();
   if ($section eq "crypto") {
-    $todir = $dest_crypto."/binary-darwin-powerpc";
+    $todir = $dest_crypto."/binary-darwin-$arch";
   } else {
-    $todir = $dest."/binary-darwin-powerpc/".$section;
+    $todir = $dest."/binary-darwin-$arch/".$section;
   }
   $tofn = $todir."/".&filename($fn);
   if (not -d $todir) {

Index: HOWTO
===================================================================
RCS file: /cvsroot/fink/scripts/bindist/HOWTO,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- HOWTO       26 Mar 2006 23:51:23 -0000      1.5
+++ HOWTO       27 Mar 2006 00:43:24 -0000      1.6
@@ -1,4 +1,4 @@
-(Originally written circa 2002 by Max Horn; revised in 2005 by Dave Morrison.)
+(Originally written circa 2002 by Max Horn; revised in 2005 and 2006 by Dave 
Morrison.)
 
 This is an attempt to explain how to use the binary distro related scripts in
 this directory. I had to discover this on my own, so it might not always be
@@ -46,6 +46,9 @@
   Example:
     0.4.0 (will make a dists/fink-0.4.0/ directory)
 
+BDARCH
+  Description:
+    The architecture for this release.  (Possible values are powerpc and i386.)
 
---------------------------------------------------------------------------------
 
 bdadd
@@ -74,11 +77,10 @@
 
 bdnewrel
   Prepares a new Fink binary release, by creating the appropriate file
-  structure. You call it with three parameters: the name of the new release,
-  the name of the previous release (this is used to shared old .debs
-  without the need to recreate them), and the current architecture (powerpc
-  or i386). A typical invocation would be:
-    ./bdnewrel 0.4.0 0.3.2a powerpc
+  structure. You call it with two parameters: the name of the new release,
+  and the name of the previous release (this is used to shared old .debs
+  without the need to recreate them).  A typical invocation would be:
+    ./bdnewrel 0.4.0 0.3.2a
 
   After running this command, verify that all went right and that the tree
   it generated looks OK. You may also run the "bdindex" command just after

Index: bdnewrel
===================================================================
RCS file: /cvsroot/fink/scripts/bindist/bdnewrel,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- bdnewrel    26 Mar 2006 23:51:23 -0000      1.3
+++ bdnewrel    27 Mar 2006 00:43:24 -0000      1.4
@@ -18,40 +18,35 @@
   echo "No previous release given."
   exit 1
 fi
-arch=$3
-if [ \z "$arch" ]; then
-  echo "No architecture specified."
-  exit 1
-fi
 
 # create directories and Release files
 for dist in fink-$release fink-$release-updates ; do
   mkdir -p dists/$dist
   for tree in main crypto ; do
     mkdir -p "dists/$dist/$tree/finkinfo"
-    mkdir -p "dists/$dist/$tree/binary-darwin-$arch"
+    mkdir -p "dists/$dist/$tree/binary-darwin-$BDARCH"
     mkdir -p "dists/$dist/$tree/source"
     ( echo "Archive: $dist"
       echo "Component: $tree"
       echo "Origin: Fink"
       echo "Label: Fink"
-      echo "Architecture: darwin-$arch"
-    ) | sed 's/fink-//' > "dists/$dist/$tree/binary-darwin-$arch/Release"
+      echo "Architecture: darwin-$BDARCH"
+    ) | sed 's/fink-//' > "dists/$dist/$tree/binary-darwin-$BDARCH/Release"
   done
 done
 
 # symlink old packages in the main tree (not updates, not crypto)
 from="fink-$prevrel/main"
 to="fink-$release/main"
-cd "$BDBASE/dists/$from/binary-darwin-$arch"
+cd "$BDBASE/dists/$from/binary-darwin-$BDARCH"
 
 for file in * ; do
   if [ -d "$file" ]; then
-    mkdir -p "$BDBASE/dists/$to/binary-darwin-$arch/$file"
+    mkdir -p "$BDBASE/dists/$to/binary-darwin-$BDARCH/$file"
   fi
 done
 for file in */*.deb ; do
-  ln -s "../../../../$from/binary-darwin-$arch/$file" 
"../../../$to/binary-darwin-$arch/$file"
+  ln -s "../../../../$from/binary-darwin-$BDARCH/$file" 
"../../../$to/binary-darwin-$BDARCH/$file"
 done
 
 # Update "current" with the new version



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to