Attached an updated patch.  pmichaud has stated that he will not accept
multiple make files, which this contains.  He's planning on updating the
makefiles himself.  In the meantime, this patch is something which
works, but which I will update when pmichaud has updated the makefile.  
diff --git a/Configure.pl b/Configure.pl
index 07bbf0d..9b74269 100644
--- a/Configure.pl
+++ b/Configure.pl
@@ -7,8 +7,10 @@ use warnings;
 use Getopt::Long;
 
 MAIN: {
-    my %options;
-    GetOptions(\%options, 'help!', 'parrot-config=s',
+    my %options = (
+        'rakudo-version' => 'build14',
+    );
+    GetOptions(\%options, 'help!', 'parrot-config=s', 'rakudo-version=s',
                'gen-parrot!', 'gen-parrot-option=s@');
 
     # Print help if it's requested
@@ -52,7 +54,14 @@ MAIN: {
         $parrot_errors .= "Unable to locate parrot_config\n"; 
     }
     elsif ($required > $config{'revision'}) {
-        $parrot_errors .= "Parrot revision r$required required (currently r$config{'revision'})\n";
+        # If Parrot was built from a tarball or package, the revision number 
+        # is 0, so we'd need to use the Parrot version instead.  But even 
+        # that is unreliable, as someone may have built their own package 
+        # from SVN.  So just let them do their thing, and worry about it
+        # some other time.  
+        if($config{'revision'} != 0) {
+            $parrot_errors .= "Parrot revision r$required required (currently r$config{'revision'})\n";
+        }
     }
 
     if ($parrot_errors) {
@@ -65,8 +74,16 @@ the location of parrot_config to be used to build Rakudo Perl.
 END
     }
 
+    my($short);
+    my(%rakudo_config) = ();
+    foreach(qw(rakudo-version)) {
+        $short = $_;
+	$short =~ s/-//g;
+        $rakudo_config{$short} = $options{$_};
+    }
+
 #  Create the Makefile using the information we just got
-    create_makefile(%config);
+    create_makefiles(\%config, \%rakudo_config);
     my $make = $config{'make'};
 
     {
@@ -110,26 +127,44 @@ sub read_parrot_config {
 
 
 #  Generate a Makefile from a configuration
-sub create_makefile {
-    my %config = @_;
-
-    my $maketext = slurp( 'build/Makefile.in' );
+sub create_makefiles {
+    my($config, $rakudo_config) = @_;
+    my %makefiles = (
+        "build/Makefile.in" => "Makefile",
+        "build/pmc_makefile.in" => "src/pmc/Makefile",
+        "build/ops_makefile.in" => "src/ops/Makefile",
+    );
+    my $build_tool = $config->{perl} . " " 
+        . $config->{libdir}
+        . $config->{versiondir}
+        . $config->{slash}
+        . "tools"
+        . $config->{slash}
+        . "dev"
+        . $config->{slash}
+        . "gen_makefile.pl";
+
+    my($text);
+    foreach my $template (keys %makefiles) {
+        my $makefile = $makefiles{$template};
+        print "Creating $makefile\n";
+        $text = slurp($template);
+        $config->{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(BUILD_DIR)\libparrot.dll .' : '';
+        $text =~ s{\@(\w+)\...@}{
+              defined($rakudo_config->{$1}) ? $rakudo_config->{$1} : $&
+        }eg;
+        if ($^O eq 'MSWin32') {
+            $text =~ s{/}{\\}g;
+            $text =~ s{\\\*}{\\\\*}g;
+            $text =~ s{http:\S+}{ do {my $t = $&; $t =~ s'\\'/'g; $t} }eg;
+        }
 
-    $config{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(BUILD_DIR)\libparrot.dll .' : '';
-    $maketext =~ s/@(\w+)@/$config{$1}/g;
-    if ($^O eq 'MSWin32') {
-        $maketext =~ s{/}{\\}g;
-        $maketext =~ s{\\\*}{\\\\*}g;
-        $maketext =~ s{http:\S+}{ do {my $t = $&; $t =~ s'\\'/'g; $t} }eg;
+        open(FILE, ">$template.tmp") or die "Error opening file '$template.tmp' for writing: $!";
+        print FILE $text;
+        close(FILE);
+        system("$build_tool $template.tmp $makefile");
     }
 
-    my $outfile = 'Makefile';
-    print "\nCreating $outfile ...\n";
-    open(my $MAKEOUT, '>', $outfile) ||
-        die "Unable to write $outfile\n";
-    print {$MAKEOUT} $maketext;
-    close $MAKEOUT or die $!;
-
     return;
 }
 
@@ -157,6 +192,8 @@ General Options:
                        Set parrot config option when using --gen-parrot
     --parrot-config=(config)
                        Use configuration information from config
+    --rakudo-version=(version)
+                       Version of Rakudo to call this build
 END
 
     return;
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..8ef4a34
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,28 @@
+# Copied in a monkey-see-monkey-do fashion from Parrot.  I (Tim Nelson)
+# don't have a real grip on what's going on here; I just want it to work :)
+perl6                                                     [main]bin
+src/pmc/perl6_group.so                                    [main]runtime
+src/ops/perl6_ops.so                                      [main]runtime
+src/ops/perl6_ops_cg.so                                   [main]runtime
+src/ops/perl6_ops_cgp.so                                  [main]runtime
+src/ops/perl6_ops_switch.so                               [main]runtime
+Test.pm							[library]lib
+#src/utils/perl6doc/actions.pm				[library]lib
+#src/parser/actions.pm					[library]lib
+src/setting/IO.pm					[library]lib
+src/setting/Any-list.pm					[library]lib
+src/setting/Hash.pm					[library]lib
+src/setting/Array.pm					[library]lib
+src/setting/IO/Socket.pm				[library]lib
+src/setting/IO/Socket/INET.pm				[library]lib
+src/setting/Range.pm					[library]lib
+src/setting/Num.pm					[library]lib
+src/setting/List.pm					[library]lib
+src/setting/Match.pm					[library]lib
+src/setting/Bool.pm					[library]lib
+src/setting/Object.pm					[library]lib
+src/setting/Pair.pm					[library]lib
+src/setting/Any-num.pm					[library]lib
+src/setting/Any-str.pm					[library]lib
+src/setting/Whatever.pm					[library]lib
+
diff --git a/build/Makefile.in b/build/Makefile.in
index 954e204..fd81522 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -1,11 +1,14 @@
 # Copyright (C) 2006-2009, The Perl Foundation.
 # $Id$
 
-# arguments we want to run parrot with
-PARROT_ARGS =
+# Overridden from outside
+DESTDIR         :=
 
 # values from parrot_config
-BUILD_DIR     = @build_dir@
+VERSION_DIR   = @versiondir@
+LIB_DIR       = @lib...@$(VERSION_DIR)
+BIN_DIR       = @bindir@
+TOOLS_DIR     = @lib...@$(VERSION_DIR)@sl...@tools@sl...@lib
 LOAD_EXT      = @load_ext@
 O             = @o@
 EXE           = @exe@
@@ -14,22 +17,24 @@ RM_F          = @rm_f@
 HAS_ICU       = @has_icu@
 
 # Various paths
-PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PERL6GRAMMAR  = $(BUILD_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc
-NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
+PARROT_DYNEXT = $(LIB_DIR)/dynext
+RAKUDO_DYNEXT = $(DESTDIR)@sl...@usr@sl...@lib@sl...@rakudo@slash@@rakudoversion@@sl...@dynext
+PERL6GRAMMAR  = $(LIB_DIR)/library/PGE/Perl6Grammar.pbc
+PERL6LIBDIR   = @libdir@/perl6
+NQP           = $(LIB_DIR)/languages/nqp/nqp.pbc
+PCT           = $(LIB_DIR)/library/PCT.pbc
 PMC_DIR       = src/pmc
-OPSDIR        = src/ops
+OPS_DIR       = src/ops
 OPSLIB        = perl6
-OPS_FILE      = src/ops/perl6.ops
+OPS_FILE      = $(OPS_DIR)/perl6.ops
+
+# arguments we want to run parrot with
+PARROT_ARGS   = -X$(RAKUDO_DYNEXT)
 
 # Setup some commands
-PARROT        = $(BUILD_DIR)/parrot$(EXE)
+PARROT        = $(BIN_DIR)/parrot$(EXE)
 CAT           = $(PERL) -MExtUtils::Command -e cat
-BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
-BUILD_DYNOPS  = $(PERL) $(BUILD_DIR)/tools/build/dynoplibs.pl
-RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe$(EXE)
+PBC_TO_EXE    = $(BIN_DIR)/pbc_to_exe$(EXE)
 
 SOURCES = perl6.pir \
   src/gen_grammar.pir \
@@ -48,7 +53,7 @@ SOURCES = perl6.pir \
   src/parrot/state.pir \
   src/gen_uprop.pir \
   $(PERL6_GROUP) \
-  src/ops/perl6_ops$(LOAD_EXT)
+  $(OPS_DIR)/perl6_ops$(LOAD_EXT)
 
 BUILTINS_PIR = \
   src/classes/Object.pir \
@@ -124,8 +129,6 @@ SETTING = \
   src/setting/Range.pm \
   src/setting/Whatever.pm \
 
-PMCS        = perl6str objectref perl6scalar mutablevar perl6multisub p6invocation
-
 PMC_SOURCES = $(PMC_DIR)/perl6str.pmc $(PMC_DIR)/objectref.pmc $(PMC_DIR)/perl6scalar.pmc \
               $(PMC_DIR)/mutablevar.pmc $(PMC_DIR)/perl6multisub.pmc $(PMC_DIR)/p6invocation.pmc
 
@@ -153,14 +156,14 @@ CLEANUPS = \
   $(PMC_DIR)/*.pdb \
   $(PMC_DIR)/*.lib \
   $(PMC_DIR)/objectref.pmc \
-  $(OPSDIR)/*.h \
-  $(OPSDIR)/*.c \
-  $(OPSDIR)/*$(O) \
-  $(OPSDIR)/*$(LOAD_EXT) \
+  $(OPS_DIR)/*.h \
+  $(OPS_DIR)/*.c \
+  $(OPS_DIR)/*$(O) \
+  $(OPS_DIR)/*$(LOAD_EXT) \
 
 # NOTE: eventually, we should remove --keep-exit-code and --fudge
 #       as the goal is that all tests must pass without fudge
-HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code --icu=$(HAS_ICU)
+HARNESS_WITH_FUDGE = $(PERL) -I$(TOOLS_DIR) t/harness --bindir=$(BIN_DIR) --fudge --keep-exit-code --icu=$(HAS_ICU)
 HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
 
 
@@ -172,7 +175,7 @@ xmas: perl6$(EXE)
 ##  targets for building a standalone perl6.
 perl6$(EXE): perl6.pbc
 	$(PBC_TO_EXE) perl6.pbc
-	@win32_libparrot_copy@
+#IF(win32):	copy $(LIB_DIR)\libparrot.dll .
 
 # the Perl 6 compiler
 perl6.pbc: perl6_s1.pbc src/gen_setting.pm
@@ -211,20 +214,15 @@ src/gen_uprop.pir: build/gen_uprop_pir.pl
 src/gen_setting.pm: build/gen_setting_pm.pl $(SETTING)
 	$(PERL) build/gen_setting_pm.pl $(SETTING) > src/gen_setting.pm
 
-$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES) $(PMC_DIR)/Makefile
+	$(MAKE) -C $(PMC_DIR)
+
+$(OPS_DIR)/perl6_ops$(LOAD_EXT) : $(OPS_FILE) $(OPS_DIR)/Makefile
+	$(MAKE) -C $(OPS_DIR)
 
-src/ops/perl6_ops$(LOAD_EXT) : $(PARROT) $(OPS_FILE)
-	@cd $(OPSDIR) && $(BUILD_DYNOPS) generate $(OPSLIB)
-	@cd $(OPSDIR) && $(BUILD_DYNOPS) compile $(OPSLIB)
-	@cd $(OPSDIR) && $(BUILD_DYNOPS) linklibs $(OPSLIB)
-	@cd $(OPSDIR) && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
 $(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
-	$(PERL) -I$(BUILD_DIR)/lib build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
+	$(PERL) -I$(TOOLS_DIR) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
 		$(PMC_DIR)/objectref.pmc
 
 
@@ -237,7 +235,7 @@ test    : coretest
 fulltest: coretest spectest
 
 coretest: perl6$(EXE)
-	$(PERL) t/harness t/00-parrot t/01-sanity
+	$(PERL) -I$(TOOLS_DIR) t/harness --bindir=$(BIN_DIR) t/00-parrot t/01-sanity
 
 # Run the spectests that we know work.
 spectest_regression: spectest
@@ -338,7 +336,8 @@ parrot: build/PARROT_REVISION build/gen_parrot.pl
 $(PARROT): 
 
 
-CRITIC_FILES=Configure.pl t/harness build/ tools/
+# Next line must not end with a slash; I added a space
+CRITIC_FILES=Configure.pl t/harness build/ tools/ 
 
 perlcritic:
 	perlcritic -1 --profile tools/util/perlcritic.conf $(CRITIC_FILES)
@@ -357,3 +356,21 @@ release: manifest
 	$(PERL) -ne 'print "rakudo-$(VERSION)/$$_"' MANIFEST | \
 	    tar -zcv -T - -f rakudo-$(VERSION).tar.gz
 	rm rakudo-$(VERSION)
+
+install:
+	$(PERL) -I/usr/lib/parrot/1.2.0-devel/tools/lib/ tools/build/install_files.pl \
+    --buildprefix=$(BUILDPREFIX) \
+    --prefix=$(PREFIX) \
+    --exec-prefix=$(EXEC_PREFIX) \
+    --bindir=$(BIN_DIR) \
+    --libdir=$(LIB_DIR) \
+    --includedir=$(INCLUDE_DIR) \
+    --destdir=$(DESTDIR) \
+    --docdir=$(DOC_DIR) \
+    --datadir=$(DATA_DIR) \
+    --srcd...@srcdir@ \
+    --versiondir=$(VERSION_DIR) \
+    --perl6libdir=$(PERL6LIBDIR) \
+    MANIFEST
+
+#
diff --git a/build/ops_makefile.in b/build/ops_makefile.in
new file mode 100644
index 0000000..ff48df7
--- /dev/null
+++ b/build/ops_makefile.in
@@ -0,0 +1,64 @@
+# Copyright (C) 2009, The Perl Foundation.
+# $Id: $
+
+# Common values from parrot_config
+VERSION_DIR   = @versiondir@
+LIB_DIR       = @lib...@$(VERSION_DIR)
+LOAD_EXT      = @load_ext@
+O             = @o@
+PERL          = @perl@
+RM_F          = @rm_f@
+
+# Other values from parrot_config
+CHMOD         = @chmod@
+CP            = @cp@
+INCLUDE_DIR   = @include...@$(VERSION_DIR)
+INSTALL_DIR   = @buildroot@@sl...@usr@sl...@lib@sl...@rakudo@slash@@rakudoversion@@sl...@dynext
+CC            = @cc@ -c
+LD            = @ld@
+LDFLAGS       = @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+CC_OUT        = @cc_o_out@
+LD_OUT        = @ld_out@
+#IF(parrot_is_shared):LIBPARROT = @libparrot_ldflags@
+#ELSE:LIBPARROT =
+
+MKPATH         = @mkpath@
+
+BUILD_TOOLS_DIR = $(LIB_DIR)@sl...@tools@sl...@build
+OPS2C           = $(PERL) $(BUILD_TOOLS_DIR)@sl...@ops2c.pl
+
+INCLUDES        = -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)@sl...@pmc
+LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT)
+
+OPS_FILE = perl6.ops
+
+
+all : install
+
+generate : $(OPS_FILE)
+	$(OPS2C) C --dynamic $(OPS_FILE)
+	$(OPS2C) CSwitch --dynamic $(OPS_FILE)
+#IF(cg_flag):	$(OPS2C) CGoto --dynamic $(OPS_FILE)
+#IF(cg_flag):	$(OPS2C) CGP --dynamic $(OPS_FILE)
+
+compile : generate
+	$(CC) $(CC_OUT) perl6_ops$(O) $(INCLUDES) $(CFLAGS) perl6_ops.c
+	$(CC) $(CC_OUT) perl6_ops_switch$(O) $(INCLUDES) $(CFLAGS) perl6_ops_switch.c
+#IF(cg_flag):	$(CC) $(CC_OUT) perl6_ops_cg$(O) $(INCLUDES) $(CFLAGS) perl6_ops_cg.c
+#IF(cg_flag):	$(CC) $(CC_OUT) perl6_ops_cgp$(O) $(INCLUDES) $(CFLAGS) perl6_ops_cgp.c
+
+linklibs : compile
+	$(LD) $(LD_OUT) perl6_ops$(LOAD_EXT) perl6_ops$(O) $(LINKARGS)
+	$(LD) $(LD_OUT) perl6_ops_switch$(LOAD_EXT) perl6_ops_switch$(O) $(LINKARGS)
+#IF(cg_flag):	$(LD) $(LD_OUT) perl6_ops_cg$(LOAD_EXT) perl6_ops_cg$(O) $(LINKARGS)
+#IF(cg_flag):	$(LD) $(LD_OUT) perl6_ops_cgp$(LOAD_EXT) perl6_ops_cgp$(O) $(LINKARGS)
+
+install_dir_exists :
+	$(MKPATH) $(INSTALL_DIR)
+
+install : linklibs install_dir_exists
+#IF(cygwin or hpux):	CHMOD 0775 "*$(LOAD_EXT)"
+	$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR)
+
diff --git a/build/pmc_makefile.in b/build/pmc_makefile.in
new file mode 100644
index 0000000..d4ff40a
--- /dev/null
+++ b/build/pmc_makefile.in
@@ -0,0 +1,81 @@
+# Copyright (C) 2009, The Perl Foundation.
+# $Id: $
+
+# Common values from parrot_config
+VERSION_DIR   = @versiondir@
+LIB_DIR       = @lib...@$(VERSION_DIR)
+LOAD_EXT      = @load_ext@
+O             = @o@
+PERL          = @perl@
+RM_F          = @rm_f@
+
+# Other values from parrot_config
+CHMOD         = @chmod@
+CP            = @cp@
+INCLUDE_DIR   = @include...@$(VERSION_DIR)
+SRC_DIR       = @src...@$(VERSION_DIR)
+INSTALL_DIR   = @buildroot@@sl...@usr@sl...@lib@sl...@rakudo@slash@@rakudoversion@@sl...@dynext
+CC            = @cc@ -c
+LD            = @ld@
+LDFLAGS       = @ldflags@ @ld_debug@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+CC_OUT        = @cc_o_out@
+LD_OUT        = @ld_out@
+#IF(parrot_is_shared):LIBPARROT = @libparrot_ldflags@
+#ELSE:LIBPARROT =
+
+MKPATH         = @mkpath@
+
+BUILD_TOOLS_DIR = $(LIB_DIR)@sl...@tools@sl...@build
+PMC2C_INCLUDES  = --include $(SRC_DIR) --include $(SRC_DIR)@sl...@pmc
+PMC2C           = $(PERL) $(BUILD_TOOLS_DIR)@sl...@pmc2c.pl
+PMC2CD = $(PMC2C) --dump $(PMC2C_INCLUDES)
+PMC2CC = $(PMC2C) --c $(PMC2C_INCLUDES)
+
+INCLUDES        = -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)@sl...@pmc
+LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT)
+
+PMC_SOURCES = \
+  perl6str.pmc \
+  objectref.pmc \
+  perl6scalar.pmc \
+  mutablevar.pmc \
+  perl6multisub.pmc
+
+PERL6_GROUP = perl6_group
+
+
+all : install
+
+generate : $(PMC_SOURCES)
+	$(PMC2CD) perl6str.pmc
+	$(PMC2CD) objectref.pmc
+	$(PMC2CD) perl6scalar.pmc
+	$(PMC2CD) mutablevar.pmc
+	$(PMC2CD) perl6multisub.pmc
+	$(PMC2CC) perl6str.pmc
+	$(PMC2CC) objectref.pmc
+	$(PMC2CC) perl6scalar.pmc
+	$(PMC2CC) mutablevar.pmc
+	$(PMC2CC) perl6multisub.pmc
+	$(PMC2C) --library $(PERL6_GROUP) --c $(PMC_SOURCES)
+
+compile : generate
+	$(CC) $(CC_OUT) perl6str$(O) $(INCLUDES) $(CFLAGS) perl6str.c
+	$(CC) $(CC_OUT) objectref$(O) $(INCLUDES) $(CFLAGS) objectref.c
+	$(CC) $(CC_OUT) perl6scalar$(O) $(INCLUDES) $(CFLAGS) perl6scalar.c
+	$(CC) $(CC_OUT) mutablevar$(O) $(INCLUDES) $(CFLAGS) mutablevar.c
+	$(CC) $(CC_OUT) perl6multisub$(O) $(INCLUDES) $(CFLAGS) perl6multisub.c
+	$(CC) $(CC_OUT) lib-$(PERL6_GROUP)$(O) $(INCLUDES) $(CFLAGS) $(PERL6_GROUP).c
+
+linklibs : compile
+	$(LD) $(LD_OUT) $(PERL6_GROUP)$(LOAD_EXT) lib-$(PERL6_GROUP)$(O) perl6str$(O) objectref$(O) perl6scalar$(O) mutablevar$(O) perl6multisub$(O) $(LINKARGS)
+
+install_dir_exists :
+	$(MKPATH) $(INSTALL_DIR)
+
+install : linklibs install_dir_exists
+#IF(cygwin or hpux):	CHMOD 0775 "*$(LOAD_EXT)"
+	$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR)
+
diff --git a/build/rakudo.spec b/build/rakudo.spec
new file mode 100644
index 0000000..f04da3c
--- /dev/null
+++ b/build/rakudo.spec
@@ -0,0 +1,97 @@
+Name:           rakudo
+Version:        build17
+Release:        1
+Summary:        Rakudo Perl 6
+License:        Artistic 2.0
+Group:          Development/Libraries
+URL:            http://www.rakudo.org/
+Source0:        http://www.pmichaud.com/perl6/rakudo-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  parrot           >= 1.2.0
+BuildRequires:  parrot-devel     >= 1.2.0
+
+%define parrot_versiondir 1.2.0-devel
+
+%define parrot_dynext %{_libdir}/parrot/%{parrot_versiondir}/dynext
+
+%define rakudo_libs %{_libdir}/perl6/rakudo
+
+# Versions don't go easily in install_files.pl yet
+#%define dynext %{parrot_dynext}/%{name}/%{version}
+%define rakudo_dynext %{parrot_dynext}/%{name}
+
+%description
+Rakudo Perl 6 is an implementation of the Perl 6 specification which
+runs on the Parrot virtual machine.  Perl 6 is a programming language
+which supersedes earlier versions of Perl.  
+
+%prep
+%setup -q
+
+%build
+echo Building with root $RPM_BUILD_ROOT
+%{__perl} Configure.pl
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install DESTDIR=$RPM_BUILD_ROOT
+
+pushd $RPM_BUILD_ROOT/%{parrot_dynext}
+for i in %{name}/*.so; do 
+	ln -s $i
+done
+popd
+
+%check
+# make test < /dev/null
+# %{?_with_fulltest:make fulltest < /dev/null}
+# make test || :
+# %{?_with_fulltest:make fulltest || :}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CREDITS README
+%doc docs
+%{parrot_dynext}/perl6_group.so
+%{parrot_dynext}/perl6_ops.so
+%{parrot_dynext}/perl6_ops_cg.so
+%{parrot_dynext}/perl6_ops_cgp.so
+%{parrot_dynext}/perl6_ops_switch.so
+%{rakudo_dynext}/perl6_group.so
+%{rakudo_dynext}/perl6_ops.so
+%{rakudo_dynext}/perl6_ops_cg.so
+%{rakudo_dynext}/perl6_ops_cgp.so
+%{rakudo_dynext}/perl6_ops_switch.so
+%{_bindir}/perl6
+%{rakudo_libs}/Test.pm
+%{rakudo_libs}/IO.pm
+%{rakudo_libs}/Any-list.pm
+%{rakudo_libs}/Hash.pm
+%{rakudo_libs}/Array.pm
+%{rakudo_libs}/IO/Socket.pm
+%{rakudo_libs}/IO/Socket/INET.pm
+%{rakudo_libs}/Range.pm
+%{rakudo_libs}/Num.pm
+%{rakudo_libs}/List.pm
+%{rakudo_libs}/Match.pm
+%{rakudo_libs}/Bool.pm
+%{rakudo_libs}/Object.pm
+%{rakudo_libs}/Pair.pm
+%{rakudo_libs}/Any-num.pm
+%{rakudo_libs}/Any-str.pm
+%{rakudo_libs}/Whatever.pm
+
+%changelog
+* Fri Mar  6 2009 wayland <wayl...@wayland.id.au> 0.17
+- created from parrot.spec
+- Didn't redo any of the files stuff
+- Played with things 'til it worked
diff --git a/tools/build/install_files.pl b/tools/build/install_files.pl
new file mode 100644
index 0000000..8f4d1e7
--- /dev/null
+++ b/tools/build/install_files.pl
@@ -0,0 +1,284 @@
+#! perl
+
+# Note this is a direct copy of the parrot file tools/dev/install_files.pl
+# with just a few changes.  As that file in the Parrot distribution continues
+# to evolve into something shorter, hopefully this file will also be replaced
+# with something much shorter.  
+
+################################################################################
+# Copyright (C) 2001-2009, Parrot Foundation.
+# $Id: install_files.pl 39165 2009-05-25 01:15:28Z jkeenan $
+################################################################################
+
+=head1 TITLE
+
+tools/dev/install_files.pl - Copy files to their correct locations
+
+=head1 SYNOPSIS
+
+    % perl tools/dev/install_files.pl [options]
+
+=head1 DESCRIPTION
+
+Use a detailed MANIFEST to install a set of files.
+
+=head2 Options
+
+=over 4
+
+=item C<buildprefix>
+
+The build prefix. Defaults to ''.
+
+=item C<prefix>
+
+The install prefix. Defaults to '/usr'.
+
+=item C<exec_prefix>
+
+The exec prefix. Defaults to '/usr'.
+
+=item C<bindir>
+
+The executables directory. Defaults to '/usr/bin'.
+
+=item C<libdir>
+
+The library directory. Defaults to '/usr/lib'.
+
+=item C<includedir>
+
+The header directory. Defaults to '/usr/include'.
+
+=back
+
+=head2 MANIFEST Format
+
+The format of the MANIFEST (currently MANIFEST and MANIFEST.generated
+are used) is:
+
+    source_path <whitespace> [package]meta1,meta2,...
+
+or you may optionally specify a different destination path:
+
+    source_path <whitespace> [package]meta1,meta2,... <whitespace> destination
+
+Additionally, there may be a * in front of the whole line to designate
+a generated file:
+
+    source_path <whitespace> *[package]meta1,meta2,... <whitespace> destination
+
+The square brackets around C<package> are literal. C<package> gives
+the name of the RPM that the given file will be installed for, and is
+only used by this script to skip files that are not members of any
+package.
+
+The various meta flags recognized are:
+
+=over 4
+
+=item C<doc>
+
+Tag this file with %doc in the RPM, and omit the leading path (because
+rpm will put it into a directory of its choosing)
+
+=item C<include>
+
+Write this file to the location given by the C<--includedir> option
+
+=item C<lib>
+
+Write this file to the location given by the C<--libdir> option
+
+=item C<bin>
+
+Write this file to the location given by the C<--bindir> option
+
+=back
+
+The optional C<destination> field provides a general way to change
+where a file will be written to. It will be applied before any
+metadata tags.
+
+Example: if this line is in the MANIFEST.generated file
+
+  languages/snorkfest/snork-compile        [main]bin
+
+and the --bindir=/usr/parroty/bin, then the generated
+parrot-<VERSION>-1.<arch>.rpm file will contain the file
+/usr/parroty/bin/snork-compile.
+
+=head1 SEE ALSO
+
+F<tools/dev/mk_manifests.pl>
+
+=cut
+
+################################################################################
+
+use strict;
+use warnings;
+use File::Basename qw(basename);
+use lib qw( lib );
+use Parrot::Install qw(
+    install_files
+    create_directories
+    lines_to_files
+);
+
+# When run from the makefile, which is probably the only time this
+# script will ever be used, all of these defaults will get overridden.
+my %options = (
+    buildprefix => '',
+    prefix      => '/usr',
+    destdir     => '',
+    exec_prefix => '/usr',
+    bindir      => '/usr/bin',
+    libdir      => '/usr/lib',       # parrot/ subdir added below
+    includedir  => '/usr/include',   # parrot/ subdir added below
+    docdir      => '/usr/share/doc', # parrot/ subdir added below
+    perl6libdir => '/usr/lib/perl6',
+    versiondir  => '',
+    'dry-run'   => 0,
+    packages    => 'main|library|pge',
+);
+
+my @manifests;
+foreach (@ARGV) {
+    if (/^--([^=]+)=(.*)/) {
+        $options{$1} = $2;
+    }
+    else {
+        push @manifests, $_;
+    }
+}
+
+my $parrotdir = $options{versiondir};
+
+# Set up transforms on filenames
+my(@transformorder) = qw(runtime lib bin include doc pkgconfig ^compilers);
+my(%metatransforms) = (
+    runtime => {
+        ismeta => 1,
+        optiondir => 'lib',
+        transform => sub {
+            my($filehash) = @_;
+            $filehash->{Dest} =~ s#^src/(pmc|ops)##;
+            $filehash->{DestDirs} = [qw(dynext rakudo)];
+            return($filehash);
+        },
+    },
+    lib => {
+        ismeta => 1,
+        optiondir => 'perl6lib',
+        transform => sub {
+            my($filehash) = @_;
+            local($_) = $filehash->{Dest};
+            s#^src/setting/##;
+            $filehash->{Dest} = $_;
+            $filehash->{DestDirs} = [qw(rakudo)];
+            return($filehash);
+        },
+    },
+    bin => {
+        ismeta => 1,
+        optiondir => 'bin',
+        transform => sub {
+            my($filehash) = @_;
+            # parrot with different config
+            $filehash->{Installable} = $filehash->{Dest} =~ s/^installable_//;
+            return($filehash);
+        },
+        isbin => 1,
+    },
+    include => {
+        ismeta => 1,
+        optiondir => 'include',
+        transform => sub {
+            my($filehash) = @_;
+            $filehash->{Dest} =~ s/^include//;
+            $filehash->{DestDirs} = [$parrotdir];
+            return($filehash);
+        },
+    },
+    doc => {
+        ismeta => 1,
+        optiondir => 'doc',
+        transform => sub {
+            my($filehash) = @_;
+            $filehash->{Dest} =~ s#^docs/resources#resources#; # resources go in the top level of docs
+            $filehash->{Dest} =~ s/^docs/pod/; # other docs are actually raw Pod
+            $filehash->{DestDirs} = [$parrotdir];
+            return($filehash);
+        },
+    },
+    pkgconfig => {
+        ismeta => 1,
+        optiondir => 'lib',
+        transform => sub {
+            my($filehash) = @_;
+            # For the time being this is hardcoded as being installed under
+            # libdir as it is typically done with automake installed packages.
+            # If there is a use case to make this configurable we'll add a
+            # seperate --pkgconfigdir option.
+            $filehash->{DestDirs} = ['pkgconfig', $parrotdir];
+            return($filehash);
+        },
+    },
+    '^compilers' => {
+        optiondir => 'lib',
+        transform => sub {
+            my($filehash) = @_;
+            $filehash->{Dest} =~ s/^compilers/languages/;
+            $filehash->{DestDirs} = [$parrotdir];
+            return($filehash);
+        },
+    },
+);
+
+my($filehashes, $directories) = lines_to_files(
+    \%metatransforms, \...@transformorder, \...@manifests, \%options, $parrotdir
+);
+
+unless ( $options{'dry-run'} ) {
+    create_directories($options{destdir}, $directories);
+}
+
+# TT #347
+# 1. skip build_dir-only binaries for files marked Installable
+my($filehash, @removes, $removes);
+foreach $filehash (grep { $_->{Installable} } @$filehashes) {
+    my( $src, $dest ) = map { $filehash->{$_} } qw(Source Dest);
+    my ($file) = $src =~ /installable_(.+)$/;
+    next unless $file;
+    if((grep { $_->{Source} =~ /^$file$/ } @$filehashes) and -e $file) {
+        print "skipping $file, using installable_$file instead\n";
+        push @removes, $file;
+    }
+}
+$removes = join '|', @removes;
+...@$filehashes = grep { $_->{Source} !~ /^($removes)$/ } @$filehashes;
+
+# 2. for every .exe check if there's an installable. Fail if not
+my $i;
+foreach $filehash (grep { ! $_->{Installable} } @$filehashes ) {
+    my( $src, $dest ) = map { $filehash->{$_} } qw(Source Dest);
+    next unless $src =~ /\.exe$/;
+    # This logic will fail on non-win32 if the generated files are really
+    # generated as with rt #40817. We don't have [main]bin here.
+    $i = "installable_$src";
+    unless (map {$_->{Source} =~ /^$i$/} grep { $_->{Installable} } @$filehashes) {
+        die "$i is missing in MANIFEST or MANIFEST.generated\n";
+    }
+}
+
+install_files($options{destdir}, $options{'dry-run'}, $filehashes);
+
+print "Finished install_files.pl\n";
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Reply via email to