This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: mknetrel: sub-package splitting, 2nd try
- From: Jan Nieuwenhuizen <janneke at gnu dot org>
- To: Charles Wilson <cwilson at ece dot gatech dot edu>
- Cc: cygwin-apps at cygwin dot com
- Date: Wed, 10 Jul 2002 16:56:14 +0200
- Subject: Re: mknetrel: sub-package splitting, 2nd try
- Organization: Jan at Appel
- References: <87k7o3pvls.fsf@peder.flower> <3D2C44DA.4020006@ece.gatech.edu>
Charles Wilson <cwilson@ece.gatech.edu> writes:
> What's the rationale behind moving files into separate trees, and then
> doing a simple 'cd $inst-doc; tar cvjf foo-doc-VER-REL.tar.bz2 *".
> Whhy not leave everything in the same $inst tree, and use filelists?
>
> cd $inst; tar -c -v -j -T $doc-file-list -f foo-doc-VER-REL.tar.bz2
It's a bit arbitrary, but there are two reasons I chose this option
for now. The first is, that if contents of separate packages come
from separate (upstream) install targets, splitting is *very* easy.
Think:
make install prefix=$inst
make install-doc prefix=$inst-doc
make install-info prefix=$inst-doc
Also, it looked easier to me, and esp. less tedious work with
upgrading. There are certain directories, or files with certain
extensions in certain directories, that make them belong in a specific
package (/usr/include, /usr/info, etc). This is not a very good
reason, parts of the file lists could be pre-generated with these
rules.
> It seems to me that moving files (complete with dir structures) into
> separate $inst trees, just to make tha tar command simpler, is less
> than ideal.
Why do you think that?
> How does cross-tools do it? (separate $inst trees, simple tar cmd, I
> think)
Yep.
> How does the existing mknetrel do it? (or does existing mknetrel have
> the ability to split up packages at all?
I didn't think so. Did I overlook something?
Jan.
FYI: here's the package splitting functions from guile's extra; Most
is rather generic, and as such I had placed them in
mknetrel-proper, at first.
Btw: you don't seem to have set a Mail-Followup-To: header, do you
mind (or actually like) getting all messages twice?
sover=14
sub_packages="lib devel doc"
presplit () {
## Cygwin doesn't adhere to FHS (and why should they?)
##docdir=$prefix/share/doc/$name-$version
docdir=$prefix/doc/$name-$ver
cd $src
mkdir -p $inst/$docdir || exit 1
## cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL LICENSE NEWS README SNAPSHOTS THANKS $inst/$docdir
cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL NEWS README SNAPSHOTS THANKS $inst/$docdir
cp -p CYGWIN-PATCHES/README $inst/$docdir/README.Cygwin
cp -p CYGWIN-PATCHES/changelog $inst/$docdir/changelog.Cygwin
mkdir -p $inst/$prefix/doc/Cygwin || exit 1
cp -p CYGWIN-PATCHES/README $inst/$prefix/doc/Cygwin/$package.README
mkdir -p $inst/$prefix/man/man1 || exit 1
cp -p doc/guile.1 $inst/$prefix/man/man1
}
lib_name () {
echo lib$base$sover
}
devel_name () {
echo $base-devel
}
doc_name () {
echo $base-doc
}
lib_split () {
mkdir -p ./$prefix/bin || exit 1
mv $inst/$prefix/bin/*.dll ./$prefix/bin
mkdir -p ./$prefix/share || exit 1
mv $inst/$prefix/share/$base ./$prefix/share
}
devel_split () {
mkdir -p ./$prefix/bin || exit 1
mv $inst/$prefix/bin/guile-* ./$prefix/bin
mv $inst/$prefix/include ./$prefix/include
mkdir -p ./$prefix/lib || exit 1
mv $inst/$prefix/lib/*.a ./$prefix/lib
mv $inst/$prefix/lib/*.la ./$prefix/lib
mkdir -p ./$prefix/share || exit 1
mv $inst/$prefix/share/aclocal ./$prefix/share
}
doc_split () {
mkdir -p ./$prefix || exit 1
mv $inst/$prefix/info ./$prefix
}
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org