Hi,

I've added some terse doco in the code, but I feel that this
sub-package splitting could do with some documentation outside the
code, in a new file HACKING or PACKAGING.  Or maybe a dummy example
package?

Using these patches (and the LD workaround), I've now successfully
packaged guile.

Please comment,
Jan.


2002-07-10  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>

        * bin/mknetrel (domkdist): Add support for splitting off and
        packaging sub-packages.  Actual splitting should be handled by a
        package's specific code in extra/.
        (setup): Add empty presplit () implementation.


diff -purNX.cvsignore -xChangeLog.jcn -xpatch -xextra ../mknetrel.fixes/bin/mknetrel 
./bin/mknetrel
--- ../mknetrel.fixes/bin/mknetrel      Wed Jul 10 14:48:03 2002
+++ ./bin/mknetrel      Wed Jul 10 15:09:46 2002
@@ -315,16 +315,57 @@ domkdist() {
     chmod -R a+w .
     cd usr 2>/dev/null && dousrstuff
 
+
+    # Split off any sub-packages.  The actual splitting is handled by
+    # a package's specific code in extra/.
+
+    # To package `foo' in foo, foo-doc and foo-devel, set
+    # sub_packages='doc devel'.
+
+    # Then provide functions doc_name and devel_name, that return the
+    # full name of the sub-package.  Also provide functions doc_split
+    # and devel_split, that mv part of foo's installation in $inst to
+    # the sub-packages' installation roots $inst-doc and $inst-devel.
+
     cd $inst || exit 1
-    prepackage
-    cd $inst || exit 1
+    presplit
 
+    for i in $sub_packages; do
+       subname=$(${i}_name)
+        rm -rf $inst-$i
+       mkdir -p $inst-$i || exit 1
+       cd $inst-$i
+       ${i}_split || exit 1
+    done
+    
     #
     # Make tar balls
     #
+
+    cd $inst || exit 1
+    prepackage
+
+    # The base package
     echo creating $tarstem.tar.bz2
+    cd $inst || exit 1
+
+    f=$src/cygwin/setup.hint && test -r $f && cp $f $uploads
+    f=$src/cygwin/$base.hint && test -r $f && cp $f $uploads/setup.hint
     find * -print | sort | tar -T - --no-recursion -cjf $tarstem.tar.bz2
 
+    # Any sub-packages
+    for i in $sub_packages; do
+       subname=$(${i}_name)
+       subload=$uploads/$subname
+       subtarstem=$subload/$subname-$ver
+       mkdir -p $subload || exit 1
+       echo creating $subtarstem.tar.bz2
+       f=$src/cygwin/$subname.hint && test -r $f && cp $f $subload/setup.hint
+       cd $inst-$i
+       find * -print | sort | tar -T - --no-recursion -cjf $subtarstem.tar.bz2
+    done
+
+    # The source package
     cd $src/.. || exit 1
     echo creating "$tarstem"-src.tar.bz2
     find $package_src/* -print -follow | egrep -v 
'\.cvsignore|\.bak$|\.orig$|\.o$|~$|^.#|CVS|%redact|/tags$' | egrep -v "$src_exclude" 
| sort | tar -T - --no-recursion -cjf "$tarstem"-src.tar.bz2

-- 
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org

Reply via email to