lilypond-1.3.122
[lilypond.git] / buildscripts / make-cygwin-cross.sh
blobfa6a47f450d0208b6f961491d88f2a1b032cade1
1 #!@BASH@
2 # make-cygwin-cross
4 # Build and install cross-development tools for cygwin package
5 # (binutils, compiler, flex, bison).
6 # Using this cross-development enviroment, build and install
7 # native cygwin packages (guile, lilypond).
9 # Besides being a handy script for me, currently this mainly serves
10 # as documentation for cross-building lilypond.
12 # To use this script, you need
14 # * all development tools to build a native LilyPond, see INSTALL.txt
16 # * RPM distribution of the cygwin pre-release sources, from:
18 # http://appel.dyndns.org/lilypond/gnu-windows/redhat/SRPMS/
20 # The tarballs were fetched from:
22 # ftp://sourceware.cygnus.com/pub/cygwin/private/cygwin-net-485/
25 ################
26 # config section
27 ################
29 TARGET_OS=cygwin
30 #TARGET_OS=mingw32
32 if [ $TARGET_OS = cygwin ]; then
33 ROOT=/usr/src/cygwin-net-485
34 TARGET_ARCH=i686
35 TARGET_VENDOR=pc
36 else
37 ROOT=/usr/src/mingw-net-485
38 TARGET_ARCH=i386
39 TARGET_VENDOR=pc
41 TARGET_PLATFORM=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS
43 ARCH=`uname -m`
44 OS=`uname -s | tr '[A-Z]' '[a-z]'`
45 VENDOR=gnu
46 PLATFORM=$ARCH-$VENDOR-$OS
48 #CROSS_TARGET_PLATFORM=$ARCH-x-$TARGET_PLATFORM
49 CROSS_TARGET_PLATFORM=$PLATFORM-x-$TARGET_PLATFORM
50 cto=$OS-x-cygwin
51 tp=i686-cygwin
53 PREFIX=$ROOT/usr
54 NATIVE_ROOT=/Cygnus
55 NATIVE_PREFIX=$NATIVE_ROOT/usr
56 CROSS_ROOT=$NATIVE_ROOT/$cto
57 CROSS_PREFIX=$CROSS_ROOT/usr
59 # urg
60 DEVEL=/home/fred
61 distdir=$DEVEL/WWW/lilypond/gnu-windows/lily-w32
62 #distdir=/tmp
64 CYGWIN_SOURCE=$DEVEL/sourceware.cygnus.com/pub/cygwin/private/cygwin-net-485
65 cygwin_dirs=`/bin/ls -d1 $CYGWIN_SOURCE/*`
66 cygwin_source_path=`echo $CYGWIN_SOURCE $cygwin_dirs | sed s'/\$/:/g'`
67 SOURCE_PATH=$DEVEL/usr/src/releases:$DEVEL/usr/src/redhat/SRPMS:$cygwin_source_path
69 cygwin_binary=cygwin-20000301.tar.gz
70 mingw_binary=bin-crtdll-2000-02-03.tar.gz
72 #CYGWIN_DLL=cygwin1-net-485.dll
73 CYGWIN_DLL=cygwin1.dll
74 MINWG_DLL=mingwc10-net-485.dll
77 ################
78 # cross packages
79 ################
81 cross_rpm="
82 binutils-19990818
83 gcc-2.95.2
84 bison
85 flex
88 # binutils installs ok, but forgets these two
89 binutils_after_rpm='
90 cd $CROSS_PREFIX/$TARGET_PLATFORM/bin \;
91 ln -f ../../bin/$TARGET_PLATFORM-objdump objdump \;
92 ln -f ../../bin/$TARGET_PLATFORM-objcopy objcopy \;
93 mv -f ld ld-in-path-breaks-libtool
95 # burp. gcc doesn't install any of these
96 gcc_after_rpm='
97 cd $CROSS_PREFIX/$TARGET_PLATFORM/bin \;
98 ln -f ../../bin/$TARGET_PLATFORM-gcc cc \;
99 ln -f ../../bin/$TARGET_PLATFORM-gcc gcc \;
100 ln -f ../../bin/$TARGET_PLATFORM-c++ c++ \;
101 ln -f ../../bin/$TARGET_PLATFORM-g++ g++
104 guile_after_rpm='cp -f $NATIVE_PREFIX/bin/*guile-config $CROSS_PREFIX/$TARGET_PLATFORM/bin'
106 lilypond_version=@TOPLEVEL_VERSION@
108 native_rpm="
109 rx-1.5
110 zlib-1.1.3
111 db-2.7.7
112 guile-1.3.4
113 bash-2.03
114 rpm-3.0.4
115 lilypond-$lilypond_version
118 #######################
119 # end of config section
120 #######################
122 ###########
123 # functions
124 ###########
126 expand ()
129 set -
130 string=`eval echo $\`eval echo "${1}${2}"\``
131 eval echo $string
135 find_path ()
137 set -
138 expr=$1
139 source_path=${2:-$SOURCE_PATH}
140 path_list=`echo $source_path | sed 's/:/ /g'`
142 found=
143 for i in $path_list; do
144 found=`/bin/ls -d1 $i/$expr 2>/dev/null | head -1`
145 if [ "$found" != "" ] && [ -e $found ]; then
146 break
148 done
149 echo $found
153 build ()
155 package=$1
156 name=`echo $package | sed 's/-.*//'`
158 if [ $type = "cross" ]; then
159 target_platform=$CROSS_TARGET_PLATFORM
160 a=$cto
161 else
162 target_platform=$TARGET_PLATFORM
163 a=$tp
166 ##rpm_package=`find_path $name*.rpm "$topdir/RPMS/$cto:$topdir/RPMS/$tp"`
167 rpm_package=`find_path $package*.rpm "$topdir/RPMS/$cto:$topdir/RPMS/$tp"`
168 if [ "$rpm_package" != "" ]; then
169 echo "$rpm_package: package exists"
170 #echo "$rpm_package: refreshing installation only"
171 echo "$rpm_package: just updating rpm database"
172 rpm -ivv --justdb --ignoreos --ignorearch --nodeps --force\
173 --dbpath $NATIVE_ROOT/var/lib/rpm \
174 $topdir/RPMS/$a/$name*.rpm
175 exit 0
178 cd $topdir
179 found=`find_path $package*src.rpm`
180 if [ "$found" != "" ]; then
181 rpm --root $NATIVE_ROOT -ivv $found || exit 1
182 rpm --target=$target_platform -ba SPECS/$name*.spec || exit 1
183 else
184 tarball=`/bin/ls -d1 SOURCES/$package*tar.gz 2>/dev/null | head -1`
185 if [ "$name.spec" != "" ] && [ "$tarball" != "" ]; then
186 rpm --target=$target_platform -ba SPECS/$name.spec || exit 1
187 else
188 found=`find_path $package*tar.gz`
189 if [ "$found" != "" ]; then
190 rpm --target=$target_platform -ta $found || exit 1
191 else
192 echo "$package: no such rpm or tarball"
193 exit 1
197 name=`echo $package | sed 's/-.*//'`
199 rpm -ivv --ignoreos --ignorearch --nodeps --force\
200 --dbpath $NATIVE_ROOT/var/lib/rpm \
201 $topdir/RPMS/$a/$name*.rpm
202 #urg
203 name_after_rpm="`expand $name _after_rpm`"
204 `eval $name_after_rpm` || exit 1
208 ##################
209 # end of functions
210 ##################
212 #######
213 # setup
214 #######
216 set -x
217 mkdir -p $ROOT
218 if [ ! -d $PREFIX/bin ]; then
219 mkdir -p $PREFIX
220 cd $PREFIX
222 ## is this still necessary?
223 mkdir -p include lib
224 mkdir -p $TARGET_PLATFORM
225 cd $TARGET_PLATFORM && ln -s ../include .
227 mkdir -p $CROSS_PREFIX/$TARGET_PLATFORM
228 cd $CROSS_PREFIX/$TARGET_PLATFORM
229 ln -s $NATIVE_PREFIX/{include,lib} .
230 #ln -s $NATIVE_PREFIX/{include,lib} .
231 #ln -s $NATIVE_PREFIX/include .
232 #ln -s $CROSS_PREFIX/bin .
234 cd $ROOT
235 found=`find_path $cygwin_binary`
236 if [ "$found" = "" ]; then
237 echo "$cygwin_binary: no such tarball"
238 exit 1
240 tar xzf $found
241 # urg, bug in gcc's cross-make configuration
242 mkdir -p $PREFIX/lib/gcc-lib/$TARGET_PLATFORM/2.95.2
243 mkdir -p $CROSS_PREFIX/lib/gcc-lib/$TARGET_PLATFORM/2.95.2
244 else
245 echo "$PREFIX: already exists"
246 echo "$cygwin_binary: skipping"
249 # mingw
250 if [ ! -d $PREFIX/$TARGET_PLATFORM ]; then
251 cd $PREFIX
252 found=`find_path $mingw_binary`
253 if [ "$found" = "" ]; then
254 echo "$mingw_binary: no such tarball"
255 exit 1
257 tar xzf $found
259 mkdir -p $PREFIX/lib/gcc-lib/$TARGET_PLATFORM/2.95.2
260 rm -f include
261 mkdir -p $PREFIX/i386-mingw32/include
262 ln -s $PREFIX/i386-mingw32 $TARGET_PLATFORM
263 ln -s $PREFIX/$TARGET_PLATFORM/include .
266 rm -f $NATIVE_ROOT
267 if [ ! -e $NATIVE_ROOT ]; then
268 ln -s $ROOT $NATIVE_ROOT || exit 1
271 #mv $PREFIX/bin/cygwin1.dll $PREFIX/bin/$CYGWIN_DLL
272 #mv $PREFIX/bin/mingwc10.dll $PREFIX/bin/$MINGW_DLL
274 mkdir -p $ROOT/var/redhat
275 mkdir -p $PREFIX/src/redhat
277 native_config_site='$PREFIX/share/native-config.site'
279 ncs=`eval echo $native_config_site`
280 rm -f $ncs
281 mkdir -p `dirname $ncs`
282 cat > $ncs <<EOF
283 ac_cv_c_bigendian=no
284 ac_cv_sizeof_char_p=4
285 ac_cv_sizeof_int=4
286 ac_cv_sizeof_long=4
287 ac_cv_sizeof_float=4
288 ac_cv_sizeof_double=8
289 ac_cv_sys_restartable_syscalls=no
290 ac_cv_sprintf_count=yes
291 ac_cv_spinlocks=no
292 db_cv_sprintf_count=yes
293 db_cv_spinlocks=no
294 ac_cv_func_getpgrp_void=yes
295 ac_cv_func_setvbuf_reversed=no
296 ac_cv_lib_intl=no
297 # urg, lots of stuff goes wrong when configuring bash??
298 ac_cv_exeext=.exe
299 ac_cv_header_libintl_h=no
300 ac_cv_header_termcap_h=no
301 ac_cv_func_mkfifo=yes
302 bash_cv_dup2_broken=no
303 bash_cv_opendir_not_robust=no
304 bash_cv_pgrp_pipe=no
305 bash_cv_printf_declared=yes
306 bash_cv_sbrk_declared=yes
307 bash_cv_signal_vintage=posix
308 bash_cv_speed_t_in_sys_types=no
309 bash_cv_struct_timeval=yes
310 bash_cv_struct_winsize_header=ioctl_h
311 bash_cv_sys_errlist=yes
312 bash_cv_sys_named_pipes=missing
313 bash_cv_func_strcoll_broken=no
314 bash_cv_must_reinstall_sighandlers=no
315 bash_cv_getcwd_calls_popen=no
316 bash_cv_func_sigsetjmp=missing
317 bash_cv_job_control_missing=present
318 bash_cv_sys_restartable_syscalls=no
319 bash_cv_getenv_redef=yes
320 bash_cv_sys_siglist=no
321 bash_cv_type_rlimit=long
322 bash_cv_ulimit_maxfds=no
323 bash_cv_decl_under_sys_siglist=no
324 bash_cv_under_sys_siglist=no
327 #URG, stupid RPM
328 rpm_ct=$ARCH-$TARGET_OS
329 cross_rpm_dir=$CROSS_PREFIX/lib/rpm/$rpm_ct
330 cross_rpm_link=/usr/lib/rpm/$rpm_ct
331 mkdir -p $cross_rpm_dir
332 rm -f $cross_rpm_link
333 ln -s $cross_rpm_dir $cross_rpm_link
335 native_rpm_dir=$NATIVE_PREFIX/lib/rpm/$tp
336 native_rpm_link=/usr/lib/rpm/$tp
337 mkdir -p $native_rpm_dir
338 rm -f $native_rpm_link
339 ln -s $native_rpm_dir $native_rpm_link
341 cross_macros=$cross_rpm_dir/macros
342 native_macros=$native_rpm_dir/macros
344 base_macros=$NATIVE_PREFIX/lib/rpm/base-macros
345 rm -f $base_macros
346 cat > $base_macros <<EOF
347 %native_prefix /Cygnus/usr
349 %_topdir %{native_prefix}/src/redhat
350 %_sourcedir %{native_prefix}/src/redhat/SOURCES
351 %_builddir %{native_prefix}/src/redhat/BUILD
352 %_srcrpmdir %{native_prefix}/src/redhat/SRPMS
353 %_rpmdir %{native_prefix}/src/redhat/RPMS
355 #%DocDir %{native_prefix}/doc
356 %DocDir /Cygnus/usr/doc
357 %_docdir /Cygnus/usr/doc
358 %_defaultdocdir /Cygnus/usr/doc
360 %cygwin_dll %{native_prefix}/bin/cygwin1.dll
362 %__install /bin/install
364 %cflags %{optflags}
365 %cppflags %{nil}
367 %sourcedir .
370 cp -f $base_macros $cross_macros
371 cat >> $cross_macros <<EOF
373 %cross_prefix /Cygnus/$cto/usr
374 %root /Cygnus/$cto
375 %_rootbindir /Cygnus/$cto/bin
376 #_usr /Cygnus/$cto/usr
377 %_prefix /Cygnus/$cto/usr
378 %prefix /Cygnus/$cto/usr
380 %_rpmfilename $cto/%%{NAME}-%%{VERSION}-%%{RELEASE}.$cto.rpm
382 %config_site %{nil}
384 %cppflags %{nil}
385 %cflags %{nil}
386 %ldflags %{nil}
387 %_target_platform $TARGET_PLATFORM
389 #% configure \
390 # %{?__libtoolize:[ -f configure.in ] \&\& %{__libtoolize} --copy --force}; \
391 %configure \
392 CPPFLAGS="%{cppflags}" CFLAGS="%{cflags}" LDFLAGS="%{ldflags}" CONFIG_SITE=%{config_site} \
393 %{sourcedir}/configure \
394 --host=%{_host} --target=%{_target_platform} --prefix=%{cross_prefix} -v
397 cp -f $base_macros $native_macros
398 cat >> $native_macros <<EOF
400 %root /Cygnus
401 %_rootbindir /Cygnus/bin
402 #_usr /Cygnus/usr
403 %_prefix /Cygnus/usr
404 %prefix /Cygnus/usr
406 %config_site %{_prefix}/share/native-config.site
407 # won't work: scripts and stuff are .exe too
408 #%program_suffix .exe
409 %program_suffix %{nil}
411 #%_arch i686-cygwin
412 #%_vendor pc
413 #%_os cygwin
415 %_rpmfilename %%{ARCH}-$TARGET_OS/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-$TARGET_OS.rpm
417 %__find_provides %{native_prefix}/lib/rpm/cygwin.prov
418 %__find_requires %{native_prefix}/lib/rpm/cygwin.req
419 %__fix_suffixes %{native_prefix}/bin/fix-suffixes
420 %fix_suffixes %{__fix_suffixes} \$RPM_BUILD_ROOT%{_rootbindir}/* \$RPM_BUILD_ROOT%{native_prefix}/bin/*
422 %cppflags -I%{native_prefix}/include
423 %cflags %{optflags} %{cppflags}
424 %ldflags -L%{native_prefix}/lib %{cygwin_dll}
426 #%configure \
427 # %{?__libtoolize:[ -f configure.in ] \&\& %{__libtoolize} --copy --force}; \
429 %configure \
430 CPPFLAGS="%{cppflags}" CFLAGS="%{cflags}" LDFLAGS="%{ldflags}" CONFIG_SITE=%{config_site} \
431 %{sourcedir}/configure --host=%{_host} --target=%{_target_platform} \
432 --prefix=%{native_prefix} --program-prefix=
433 # --prefix=%{native_prefix} --program-suffix=%{program_suffix}
436 rm -f $NATIVE_PREFIX/lib/rpm/cygwin.prov
437 cat > $NATIVE_PREFIX/lib/rpm/cygwin.prov <<EOF
438 #!/bin/sh
439 while read f ; do
440 f=\`echo \$f | tr '[:upper:]' '[:lower:]'\`
441 case \$f in
442 *.dll) basename \$f
444 esac
445 done | sort -u
447 chmod 755 $NATIVE_PREFIX/lib/rpm/cygwin.prov
449 rm -f $NATIVE_PREFIX/lib/rpm/cygwin.req
450 cat > $NATIVE_PREFIX/lib/rpm/cygwin.req <<EOF
451 #!/bin/sh
453 while read f ; do
454 case \$f in
455 *.dll|*.exe) objdump -p \$f | grep "DLL Name:" | cut -f3 -d" " | tr '[:upper:]' '[:lower:]'
457 esac
458 done | sort -u
461 chmod 755 $NATIVE_PREFIX/lib/rpm/cygwin.req
463 rm -f $NATIVE_PREFIX/bin/fix-suffixes
464 cat > $NATIVE_PREFIX/bin/fix-suffixes <<EOF
465 #!/bin/sh
466 ## duh, rename executables,
467 ## for people that use a dumb shell instead of bash
470 if [ \$# -le 0 ]; then
471 echo "Usage: fix-suffixes [FILE]..."
472 exit 2
475 fix_extension ()
477 path=\$1
478 ext=\$2
479 expr="\$3"
480 dir=\`dirname \$path\`
481 file=\`basename \$path\`
482 base=\`basename \$file \$ext\`
483 if [ \$base\$ext != \$file ]; then
484 type="\`file \$path\`"
485 if expr "\$type" : "\$expr"; then
486 mv -f \$path \$dir/\$base\$ext
491 for i in \`/bin/ls -d1 \$*\`; do
492 fix_extension \$i .exe '.*Windows.*\(executable\).*'
493 fix_extension \$i .py '.*\(python\).*'
494 done
497 chmod 755 $NATIVE_PREFIX/bin/fix-suffixes
498 set -x
499 type=rpm
500 rm -rf $NATIVE_ROOT/var/lib/rpm
501 mkdir -p $NATIVE_ROOT/var/lib/rpm
502 rpm --root $NATIVE_ROOT --initdb
504 topdir=$NATIVE_PREFIX/src/redhat
505 mkdir -p $topdir/{BUILD,RPMS/{$tp,$cto},SOURCES,SPECS,SRPMS}
507 ##############
508 # end of setup
509 ##############
511 OLDPATH=$PATH
512 # building x-gcc requires to have x-ar in path
513 # x-gcc will find $prefix/x/bin/as by itself
514 PATH=$CROSS_PREFIX/bin:$PATH
516 mkdir -p $PREFIX/src
517 cd $PREFIX/src
518 type=cross
519 for i in $cross_rpm; do
520 if build $i; then
521 true
522 else
523 echo "$i: rpm build failed"
524 exit 1
526 done
528 PATH=$CROSS_PREFIX/$TARGET_PLATFORM/bin:$PATH
530 cd $PREFIX/src
531 type=native
532 for i in $native_rpm; do
533 if build $i; then
534 true
535 else
536 echo "$i: rpm build failed"
537 exit 1
539 done
541 ##############
542 # Distribution
543 ##############
545 PATH=$OLDPATH
547 mkdir -p $distdir
549 cat > $distdir/setup.sh <<EOF
550 #!/bin/bash
551 set -x
552 ROOT=/Cygnus
553 PREFIX=\$ROOT/usr
554 # gunzip rpm.gz || exit 1
555 #dll=\$ROOT/net-485
556 #mkdir -p \$dll
557 #gzip -dc cygwin.dll.gz > \$dll/cygwin1.dll
558 ## this won't work: must be done outside of cygwin
559 #old_dll=\`which cygwin1.dll\`
560 #mv -f \$old_dll \$old_dll.orig\$\$
561 #gunzip cygwin1.dll.gz
562 #cp -f cygwin1.dll \$old_dll
563 echo > rpmrc
564 # mkdir -p \$ROOT/var/lib
565 # mkdir -p \$ROOT/bin
566 rem # touch \$ROOT/bin/rpm \$ROOT/bin/rpm.exe
567 echo > \$ROOT/bin/rpm; echo > \$ROOT/bin/rpm.exe
568 ./rpm --root \$ROOT --rcfile rpmrc --initdb
569 ./rpm --root \$ROOT --rcfile rpmrc --nodeps --ignorearch --ignoreos -Uhv \\
570 RPMS/$tp/rpm-*.$tp.rpm \\
571 RPMS/$tp/*.$tp.rpm
572 done
575 cat > $distdir/setup.bat <<EOF
576 del dll olddll
577 rem # old_dll=\`which cygwin1.dll\`
578 rem # urg, should dist bash too, then we don't need usertools!
579 rem # but this gets ugly, we could really use:
580 rem #
581 rem # cp, cygpath, gunzip, mv, mkdir, touch
582 rem #
583 rem # ie, fileutils, gzip, (cygpath?)
584 rem #
585 rem # cp -f \`which bash\` /bin;
586 rem # mkdir -p /bin;
587 rem # cp -f bash /bin/bash.exe;
588 rem # cp -f /bin/bash /bin/sh.exe;
589 mkdir \\bin
590 copy bash \\bin\\bash.exe
591 copy bash \\bin\\sh.exe
592 mkdir \\Cygnus
593 mkdir \\Cygnus\\bin
594 mkdir \\Cygnus\\var
595 mkdir \\Cygnus\\var\\lib
596 bash -c '
597 dll=\`type -p cygwin1.dll\`;
598 wdll=\`./cygpath -w \$dll\`;
599 wdll=\${wdll:-\\Cygnus\\bin};
600 echo cygwin1.dll \$wdll > newdll; echo \$wdll \$wdll.orig\$\$ > olddll'
601 if not errorlevel 0 goto nobash
602 rem # mv -f \$old_dll \$old_dll.orig\$\$
603 rem # gunzip cygwin1.dll.gz
604 rem # cp -f cygwin1.dll \$old_dll
605 copy < olddll
606 copy < newdll
607 bash setup.sh
608 if not errorlevel 0 goto nobash
609 attrib +s \\Cygnus\\usr\\share\\lilypond\\cmtfm
610 goto :exit
611 :nobash
612 @echo "setup.bat: can't find bash"
613 rem # @echo "setup.bat: please install usertools from"
614 rem # @echo "setup.bat: http://sourceware.cygnus.com/cygwin/"
615 :exit
618 cat > $distdir/lilypond.sh <<EOF
619 #!/bin/bash
620 ROOT=/Cygnus
621 PREFIX=\$ROOT/usr
622 \$ROOT/bin/lilypond \$*
625 cat > $distdir/midi2ly.sh <<EOF
626 #!/bin/bash
627 ROOT=/Cygnus
628 PREFIX=\$ROOT/usr
629 \$ROOT/bin/midi2ly \$*
632 cat > $distdir/lilypond.bat <<EOF
633 bash lilypond.sh %1 %2 %3 %4 %5 %6 %7 %8 %9
636 cat > $distdir/midi2ly.bat <<EOF
637 bash midi2ly.sh %1 %2 %3 %4 %5 %6 %7 %8 %9
640 cd $distdir
641 rm -f $CYGWIN_DLL.gz
642 cp -f $PREFIX/bin/$CYGWIN_DLL .
643 rm -f rpm.gz
644 cp -f `/bin/ls -d1 $ROOT/bin/rpm* |head -1` rpm
646 rm -f bash.gz
647 cp -f `/bin/ls -d1 $ROOT/bin/bash* |head -1` bash
649 rm -f cygpath.gz
650 cp -f `/bin/ls -d1 $PREFIX/bin/cygpath* |head -1` cygpath
652 distbase=`basename $distdir`
653 rm -f RPMS
654 ln -s ../redhat/RPMS .
656 www=`dirname $distdir`
657 cd $www
658 for i in bash-2 guile-1 rpm-3 lilypond-$lilypond_version; do
659 rpm=`find_path $i*.rpm $distbase/RPMS/$tp`
660 dist_rpms="$dist_rpms $rpm"
661 done
663 rm -f $www/setup*.zip
664 cd $www && zip setup-lilypond-$lilypond_version.zip lily-w32 $distbase/* $dist_rpms
666 # make small zip dist available
668 zipdir=$www/zip
669 mkdir -p $zipdir
671 rm -f $zipdir/$CYGWIN_DLL.zip
672 cd $ROOT/bin && zip $zipdir/$CYGWIN_DLL.zip $CYGWIN_DLL
674 for i in bash-2 guile-1 rpm-3 lilypond-$lilypond_version; do
675 found=`find_path $i*.rpm $distdir/RPMS/$tp`
676 if [ "$found" = "" ]; then
677 echo "$i: no such .rpm"
678 else
679 base=`basename $found`
680 package=`echo $base | sed "s/\.$tp.rpm//"`
681 dir=/tmp/$i-rpm2zip
682 rm -rf $dir
683 mkdir -p $dir
684 cd $dir || exit 1
685 rpm2cpio $found | cpio -id
686 zip -ry $zipdir/$package.zip .
687 rm -rf $dir
689 done
691 cd $distdir
692 gzip -f $CYGWIN_DLL
693 gzip -f rpm
694 gzip -f bash
695 gzip -f cygpath