]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/distrib/makerpm
update from herbert breunung
[wxWidgets.git] / wxPython / distrib / makerpm
index 667c79fc2921a87a020bc0101ac5b5ed488bca90..194995955dd2a27ac6843f3356d24a6408c86e23 100755 (executable)
@@ -40,7 +40,7 @@ function usage {
     echo "command flags:"
     echo "   skipcopy       Don't copy the files for the tarball from the workspace"
     echo "   skiptar        Don't build the tarball"
     echo "command flags:"
     echo "   skipcopy       Don't copy the files for the tarball from the workspace"
     echo "   skiptar        Don't build the tarball"
-    echo "   skiprpm        Don't build the RPM (but why?)"
+    echo "   skiprpm        Don't build the RPM"
     echo "   skipclean      Don't do the cleanup at the end"
     echo "   gtk2           Build using wxGTK2 and Unicode"
     echo "   x11            Build using wxX11"
     echo "   skipclean      Don't do the cleanup at the end"
     echo "   gtk2           Build using wxGTK2 and Unicode"
     echo "   x11            Build using wxX11"
@@ -49,7 +49,7 @@ function usage {
 #    echo "   smp            Add SMP=2 to the envivonment to speed wxGTK build"
 }
 
 #    echo "   smp            Add SMP=2 to the envivonment to speed wxGTK build"
 }
 
-if [ $# -lt 2 ]; then
+if [ $# -lt 1 ]; then
     usage
     exit 1
 fi
     usage
     exit 1
 fi
@@ -87,7 +87,7 @@ for flag in $*; do
     case ${flag} in
        skipcopy)  skipcopy=1                          ;;
        skipclean) skipclean=1                         ;;
     case ${flag} in
        skipcopy)  skipcopy=1                          ;;
        skipclean) skipclean=1                         ;;
-       skiptar)   skiptar=1                           ;;
+       skiptar)   skiptar=1; skipcopy=1               ;;
        skiprpm)   skiprpm=1                           ;;
        gtk2)      unicode=1; port=GTK2; lcport=gtk2   ;;
        x11)       port=X11; lcport=x11                ;;
        skiprpm)   skiprpm=1                           ;;
        gtk2)      unicode=1; port=GTK2; lcport=gtk2   ;;
        x11)       port=X11; lcport=x11                ;;
@@ -152,16 +152,18 @@ if [ -z "${skipcopy}" ]; then
     done
 
     # now do the same thing for wxPython, skipping it's build dirs and such
     done
 
     # now do the same thing for wxPython, skipping it's build dirs and such
-    mkdir ${tarver}/wxPython
-    cp -pf --link ${wxdir}/wxPython/* ${tarver}/wxPython > /dev/null 2>&1
-    for d in contrib demo distrib distutils docs include licence samples scripts src SWIG wx wxPython; do
-       cp -Rpf --link ${wxdir}/wxPython/$d ${tarver}/wxPython #> /dev/null 2>&1
+    for dir in `grep -v '#' ${wxdir}/wxPython/distrib/DIRLIST`; do
+       mkdir ${tarver}/${dir}
+       ##echo "cp -pf --link ${wxdir}/${dir}/* ${tarver}/${dir}"
+       cp -pf --link ${wxdir}/${dir}/* ${tarver}/${dir} > /dev/null 2>&1
     done
 
     done
 
-#     cp -Rpf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
-#     rm -r ${tarver}/bld*
-#     rm -r ${tarver}/wxPython/build*
-#     rm -r ${tarver}/wxPython/_build_rpm
+    # using DIRLIST as above will normally skip any files starting
+    # with a dot, but there are a few .files that we do want to
+    # copy...
+    for dir in wxPython/distrib/msw; do
+       cp -pf --link ${wxdir}/${dir}/.[a-zA-Z]* ${tarver}/${dir}  > /dev/null 2>&1
+    done
 
     echo "*** Removing uneeded stuff from copy of CVS tree"
     pushd ${tarver} > /dev/null
 
     echo "*** Removing uneeded stuff from copy of CVS tree"
     pushd ${tarver} > /dev/null
@@ -177,13 +179,13 @@ if [ -z "${skipcopy}" ]; then
     rm locale/*.mo
     cleanup ".#*"
     cleanup "*~"
     rm locale/*.mo
     cleanup ".#*"
     cleanup "*~"
+    cleanup "*.orig"
+    cleanup "*.rej"
     cleanup "*.pyc"
     cleanup core
     cleanup "core.[0-9]*"
 
     rm -f wxPython/wx/*  > /dev/null 2>&1
     cleanup "*.pyc"
     cleanup core
     cleanup "core.[0-9]*"
 
     rm -f wxPython/wx/*  > /dev/null 2>&1
-    rm wxPython/demo/.setup.sh
-    rm -r wxPython/docs/xml-raw
 
     popd > /dev/null
     popd > /dev/null
 
     popd > /dev/null
     popd > /dev/null